File tree Expand file tree Collapse file tree 2 files changed +42
-42
lines changed
Expand file tree Collapse file tree 2 files changed +42
-42
lines changed Original file line number Diff line number Diff line change 3434#include "Zend/zend_exceptions.h"
3535#include "ext/spl/spl_exceptions.h"
3636
37+ /**
38+ * The WGS84 elipsoid semi major axes
39+ */
40+ const geo_ellipsoid wgs84 = {6378137.000 , 6356752.3142 , 1.0 /298.257223563 };
41+
42+ /**
43+ * The Airy 1830 elipsoid semi major axes
44+ */
45+ const geo_ellipsoid airy_1830 = {6377563.396 , 6356256.910 , 1.0 /299.3249646 };
46+ /**
47+ * The GRS 80 elipsoid semi major axes
48+ */
49+ const geo_ellipsoid grs80 = {6378137.000 , 6356752.314140 , 1.0 /298.257222101 };
50+
51+ /**
52+ * The values of the 7 variables for performing helmert transformation between
53+ * wgs84 and osgb36
54+ */
55+ const geo_helmert_constants wgs84_osgb36 = {
56+ -446.448 ,
57+ 125.157 ,
58+ -542.060 ,
59+ 0.0000204894 ,
60+ -0.1502 ,
61+ -0.2470 ,
62+ -0.8421
63+ };
64+
65+ /**
66+ * The values of the 7 variables for performing helmert transformation between
67+ * osgb36 and wgs84 -1 * the values for the reverse transformation
68+ */
69+ const geo_helmert_constants osgb36_wgs84 = {
70+ 446.448 ,
71+ -125.157 ,
72+ 542.060 ,
73+ -0.0000204894 ,
74+ 0.1502 ,
75+ 0.2470 ,
76+ 0.8421
77+ };
78+
3779ZEND_BEGIN_ARG_INFO_EX (haversine_args , 0 , 0 , 2 )
3880 ZEND_ARG_INFO (0 , geoJsonPointFrom )
3981 ZEND_ARG_INFO (0 , geoJsonPointTo )
Original file line number Diff line number Diff line change @@ -65,48 +65,6 @@ typedef struct {
6565 double rotation_z ;
6666} geo_helmert_constants ;
6767
68- /**
69- * The WGS84 elipsoid semi major axes
70- */
71- const geo_ellipsoid wgs84 = {6378137.000 , 6356752.3142 , 1.0 /298.257223563 };
72-
73- /**
74- * The Airy 1830 elipsoid semi major axes
75- */
76- const geo_ellipsoid airy_1830 = {6377563.396 , 6356256.910 , 1.0 /299.3249646 };
77- /**
78- * The GRS 80 elipsoid semi major axes
79- */
80- const geo_ellipsoid grs80 = {6378137.000 , 6356752.314140 , 1.0 /298.257222101 };
81-
82- /**
83- * The values of the 7 variables for performing helmert transformation between
84- * wgs84 and osgb36
85- */
86- const geo_helmert_constants wgs84_osgb36 = {
87- -446.448 ,
88- 125.157 ,
89- -542.060 ,
90- 0.0000204894 ,
91- -0.1502 ,
92- -0.2470 ,
93- -0.8421
94- };
95-
96- /**
97- * The values of the 7 variables for performing helmert transformation between
98- * osgb36 and wgs84 -1 * the values for the reverse transformation
99- */
100- const geo_helmert_constants osgb36_wgs84 = {
101- 446.448 ,
102- -125.157 ,
103- 542.060 ,
104- -0.0000204894 ,
105- 0.1502 ,
106- 0.2470 ,
107- 0.8421
108- };
109-
11068#define GEO_DEG_TO_RAD 0.017453292519943295769236907684886
11169/**
11270 * Calculate the radius using WGS-84's equatorial radius of
You can’t perform that action at this time.
0 commit comments