Position.SphericalIf one wants to hide the fact that Meters.t and Degrees.t are floats, one can cast it by locally defining module Spherical = Position.(Spherical : SphericalType).
module Meters = Units.Metersmodule Degrees = Units.Degreesmodule Radians = Units.RadiansThe (longitude, latitude) coordinates of each point, in degrees (following WGS 84's ellipsoid). North and East are positive.
Return an angle between -180 and 180 equivalent (modulo 360) to its argument.
normalise_angle_around a0 a returns an angle between a0 - 180 and a0 + 180 equivalent to its argument.
Similar functions but for radians instead of degrees.
val north_pole : tSome specific coordinates.
val south_pole : tval null_island : tval test_coordinates : t listSome specific coordinates, distances, and angles, for tests.
val test_angles : Degrees.t listval test_distances : Meters.t listval test_latitudes : Degrees.t listval antimeridian : Degrees.tValue of the longitude of the Antimeridian (that is, the 180th meridian).
Shortest distance between two points (around the world, as a great circle), in meters. In other words, the length of the geodesic between the provided two points. Several algorithms with various precision and computation speed can be used: it is assumed that long-distance measurements are rare and short-distance measurements frequent.
Computing the distance can be quite costly, despite the fact that we try to use appropriate algorithms depending on the situation. This function is less accurate than distance, but is faster.
In the rare cases in which precision is absolutely necessary, this function will choose the most appropriate algorithms to compute the distance without taking computation speed into account. It will always be slower than distance.
State whether the distance between two points is within the provided interval (bounds included). This should typically be faster than calling distance and comparing it to the associated bounds.
val longitude_meters_to_radians :
lat:Units.Degrees.t ->
Units.Meters.t ->
Units.Radians.tConversion of a distance in meters to the (assuming spherical Earth) corresponding angle of coordinates at the provided latitude, assuming it is taken parallel to the equator. The latitude is always expressed in degrees, even when converting to radians.
val longitude_meters_to_degrees :
lat:Units.Degrees.t ->
Units.Meters.t ->
Units.Degrees.tval latitude_meters_to_radians :
?lat:Units.Degrees.t ->
Units.Meters.t ->
Units.Radians.tSimilar, but with a distance taken perpendicular to the equator. The latitude is here optional as it doesn't change that much the result. Note that it must always be expressed in degrees, even in the conversion to radian.
val latitude_meters_to_degrees :
?lat:Units.Degrees.t ->
Units.Meters.t ->
Units.Degrees.tval longitude_radians_to_meters :
lat:Units.Degrees.t ->
Units.Radians.t ->
Units.Meters.tThe inverse functions.
val longitude_degrees_to_meters :
lat:Units.Degrees.t ->
Units.Degrees.t ->
Units.Meters.tval latitude_radians_to_meters :
?lat:Units.Degrees.t ->
Units.Radians.t ->
Units.Meters.tval latitude_degrees_to_meters :
?lat:Units.Degrees.t ->
Units.Degrees.t ->
Units.Meters.tval print : t -> stringPrint-out the coordinates, mainly for debugging purposes.