summaryrefslogtreecommitdiff
path: root/latlong.h
diff options
context:
space:
mode:
authorDave Hibberd <d@vehibberd.com>2023-09-12 21:38:15 +0100
committerDave Hibberd <d@vehibberd.com>2023-09-12 21:38:15 +0100
commit3cdcbeea3e2891f4a10c79b272da144f37ff24f3 (patch)
treedc2daaabc2ba68cc125fc21bd35f8e67bdb0499e /latlong.h
parentf7fc865d93f8448779d320ce152f0fa44a64fcad (diff)
New upstream version 0.67upstream/0.67
Diffstat (limited to 'latlong.h')
-rw-r--r--latlong.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/latlong.h b/latlong.h
new file mode 100644
index 0000000..ae98fe6
--- /dev/null
+++ b/latlong.h
@@ -0,0 +1,24 @@
+
+/* latlong.h */
+
+
+/* Use this value for unknown latitude/longitude or other values. */
+
+#define G_UNKNOWN (-999999)
+
+
+void latitude_to_str (double dlat, int ambiguity, char *slat);
+void longitude_to_str (double dlong, int ambiguity, char *slong);
+
+void latitude_to_comp_str (double dlat, char *clat);
+void longitude_to_comp_str (double dlon, char *clon);
+
+void latitude_to_nmea (double dlat, char *slat, char *hemi);
+void longitude_to_nmea (double dlong, char *slong, char *hemi);
+
+double latitude_from_nmea (char *pstr, char *phemi);
+double longitude_from_nmea (char *pstr, char *phemi);
+
+double ll_distance_km (double lat1, double lon1, double lat2, double lon2);
+
+int ll_from_grid_square (char *maidenhead, double *dlat, double *dlon); \ No newline at end of file