make_geo_deg added

This commit is contained in:
Pascal Brisset
2008-08-12 14:56:03 +00:00
parent 83cfd1b86b
commit 41734b9567
2 changed files with 8 additions and 1 deletions
+4
View File
@@ -65,6 +65,10 @@ let piradian = function
Semi -> 2. ** 31. | Rad -> pi | Deg -> 180. | Grd -> 200.
let (>>) u1 u2 x = (x *. piradian u2) /. piradian u1;;
let make_geo_deg = fun lat long ->
{ posn_long = norm_angle ((Deg>>Rad)long); posn_lat = ((Deg>>Rad)lat) }
let deg_string_of_rad = fun r -> Printf.sprintf "%.6f" ((Rad>>Deg)r)
let decimal d m s = float d +. float m /. 60. +. s /. 3600.;;
+4 -1
View File
@@ -77,7 +77,10 @@ val norm_angle : float -> float
val valid_geo : geographic -> bool
val make_geo : float -> float -> geographic
val make_geo : radian -> radian -> geographic
(** [make_geo lat long] *)
val make_geo_deg : degree -> degree -> geographic
(** [make_geo lat long] *)
val string_degrees_of_geographic : geographic -> string