My agentic slop goes here. Not intended for anyone else!
at jsont 1.3 kB view raw
1(** Coordinate pair module *) 2 3type t 4 5(** {2 Construction} *) 6 7val create : lat:float -> lon:float -> t 8 9val of_lat_lon : Lat.t -> Lon.t -> t 10 11(** {2 Accessors} *) 12 13val lat : t -> Lat.t 14val lon : t -> Lon.t 15val lat_float : t -> float 16val lon_float : t -> float 17 18(** {2 Distance calculations} *) 19 20val distance_haversine : t -> t -> float 21(** Great circle distance in km using Earth radius 6371.0 *) 22 23val distance_vincenty : t -> t -> float 24(** WGS84 ellipsoid distance in km *) 25 26(** {2 Bearing calculations} *) 27 28val bearing : t -> t -> float 29(** Initial bearing in degrees (0, 360) *) 30 31val bearing_final : t -> t -> float 32(** Final bearing in degrees *) 33 34(** {2 Geographic operations} *) 35 36val offset : t -> heading:float -> distance:float -> t 37(** New point from heading (degrees) and distance (km) *) 38 39val midpoint : t -> t -> t 40 41val interpolate : t -> t -> float -> t 42(** Linear interpolation: 0.0 = first, 1.0 = second *) 43 44(** {2 Comparison} *) 45 46val equal : t -> t -> bool 47val ( = ) : t -> t -> bool 48 49val almost_equal : ?epsilon:float -> t -> t -> bool 50(** Default epsilon = 0.000001 km *) 51 52(** {2 Formatting} *) 53 54val to_string : t -> string 55(** "lat, lon" in decimal degrees *) 56 57val to_dms_string : t -> string 58 59val format : ?lat_precision:int -> ?lon_precision:int -> t -> string