summaryrefslogtreecommitdiffstats
path: root/src/host/layer23/include/osmocom/bb/misc/geo.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/host/layer23/include/osmocom/bb/misc/geo.h')
-rw-r--r--src/host/layer23/include/osmocom/bb/misc/geo.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/host/layer23/include/osmocom/bb/misc/geo.h b/src/host/layer23/include/osmocom/bb/misc/geo.h
new file mode 100644
index 00000000..25e26cba
--- /dev/null
+++ b/src/host/layer23/include/osmocom/bb/misc/geo.h
@@ -0,0 +1,12 @@
+/* WGS 84 */
+#define EQUATOR_RADIUS 6378137.0
+#define POLE_RADIUS 6356752.314
+
+#define PI 3.1415926536
+
+void geo2space(double *x, double *y, double *z, double lat, double lon);
+void space2geo(double *lat, double *lon, double x, double y, double z);
+double distinspace(double x1, double y1, double z1, double x2, double y2,
+ double z2);
+double distonplane(double x1, double y1, double x2, double y2);
+