diff options
author | Mattias Andrée <m@maandree.se> | 2024-10-20 00:01:25 +0200 |
---|---|---|
committer | Mattias Andrée <m@maandree.se> | 2024-10-20 00:01:25 +0200 |
commit | 6ac74a858b8f9ff122c8494dd4590fe1e5678a24 (patch) | |
tree | deb9423a156ce1b3aad6815da0ce15e0eadfb443 /libtellurian_distance.3 | |
parent | m doc (diff) | |
download | libtellurian-6ac74a858b8f9ff122c8494dd4590fe1e5678a24.tar.gz libtellurian-6ac74a858b8f9ff122c8494dd4590fe1e5678a24.tar.bz2 libtellurian-6ac74a858b8f9ff122c8494dd4590fe1e5678a24.tar.xz |
Third commit
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to '')
-rw-r--r-- | libtellurian_distance.3 | 109 |
1 files changed, 109 insertions, 0 deletions
diff --git a/libtellurian_distance.3 b/libtellurian_distance.3 new file mode 100644 index 0000000..47e0ee1 --- /dev/null +++ b/libtellurian_distance.3 @@ -0,0 +1,109 @@ +.TH LIBTELLURIAN_DISTANCE 3 libtellurian +.SH NAME +libtellurian_distance \- Calculate distance between two locations + +.SH SYNPOSIS +.ni +#include <libtellurian.h> + +double libtellurian_distance(double \fIlatitude1\fP, double \fIlongitude1\fP, + double \fIlatitude2\fP, double \fIlongitude2\fP, + double *\fIazimuth1_out\fP, double *\fIazimuth2_out\fP); + +double libtellurian_distance_radians(double \fIlatitude1\fP, double \fIlongitude1\fP, + double \fIlatitude2\fP, double \fIlongitude2\fP, + double *\fIazimuth1_out\fP, double *\fIazimuth2_out\fP); + +void libtellurian_azimuth(double \fIlatitude1\fP, double \fIlongitude1\fP, + double \fIlatitude2\fP, double \fIlongitude2\fP, + double *\fIazimuth1_out\fP, double *\fIazimuth2_out\fP); + +void libtellurian_azimuth_radians(double \fIlatitude1\fP, double \fIlongitude1\fP, + double \fIlatitude2\fP, double \fIlongitude2\fP, + double *\fIazimuth1_out\fP, double *\fIazimuth2_out\fP); +.fi +.PP +Link with +.I -ltellurian +.IR -lm . + +.SH DESCRIPTION +The +.BR libtellurian_distance () +function models the Earth as an oblate +spheroid and calculates a good approximate +distance between two locations +.RI ( latitude1 ", " longitude1 ) +and +.RI ( latitude2 ", " longitude2 ), +along the ellipsoid. +.PP +The coordinates shall be specified according +to GPS and in degrees. +.PP +At negligible cost, the function can also +calculate the forward azimuths. The forward +azimuth for the first point will be calculated +and stored, in degrees, in +.I *azimuth1_out +unless +.I azimuth1_out +is +.IR NULL , +and the forward azimuth for the second point +will be calculated and stored, in degress, in +.I *azimuth2_out +unless +.I azimuth2_out +is +.IR NULL . +.PP +The +.BR libtellurian_distance_radians () +function is identical to the +.BR libtellurian_distance () +function except that +.IR latitude1 , +.IR longitude1 , +.IR latitude2 , +and +.I longitude2 +shall be specified in radians, and +.I *azimuth1_out +and +.I *azimuth2_out +will be in radians. +.PP +The +.BR libtellurian_azimuth () +and +.BR libtellurian_azimuth_radians () +functions are identical to the +.BR libtellurian_distance () +and +.BR libtellurian_distance_radians () +functions, respectively, except that do not +calculate the distance between the points, +they only calculate the azimuths. + +.SH RETURN VALUE +The +.BR libtellurian_distance () +and +.BR libtellurian_distance_radians () +functions return the distance, along the Earth's +surface, between the two points measured in +meters. +.PP +The +.BR libtellurian_azimuth () +and +.BR libtellurian_azimuth_radians () +functions do not return any value. + +.SH ERRORS +None. + +.SH SEE ALSO +.BR libtellurian (7), +.BR libtellurian_coarse_distance (3) |