geo_coords_1.0.0_564bd7a2/src/geo_coords_types.ads

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
with Interfaces;
with Ada.Text_IO;
with Ada.Numerics.Generic_Elementary_Functions;

--  Contains all the required types

package Geo_Coords_Types is

   type Float_Digits_15 is new
      Interfaces.IEEE_Float_64;

   package Math is new
      Ada.Numerics.Generic_Elementary_Functions (Float_Digits_15);

   package Float_Digits_15_IO is new
      Ada.Text_IO.Float_IO (Float_Digits_15);

   type Geo_Location is record
      Latitude : Float_Digits_15;
      Longitude : Float_Digits_15;
   end record;

   type Distance_Bearing_type is record
      Distance : Float_Digits_15;  --  Distance in Metres
      Bearing : Float_Digits_15;  -- Bearing in Degrees
   end record;

   --  Radius of Earth (m)
   Radius_Of_Earth : constant Float_Digits_15 := 6.371E6;

end Geo_Coords_Types;