Skip to content

Commit d847f15

Browse files
author
Marcus Deglos
committed
Changed Earth radius definition to match that used by equatorial WGS-84.
1 parent 8f614ed commit d847f15

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

php_geospatial.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,11 @@ extern zend_module_entry geospatial_module_entry;
3737
#endif
3838

3939
#define GEO_DEG_TO_RAD 0.017453292519943295769236907684886
40-
#define GEO_EARTH_RADIUS_IN_METERS 6372.797560856
40+
/**
41+
* Calculate the radius using WGS-84's equatorial radius of
42+
* 6378137m
43+
*/
44+
#define GEO_EARTH_RADIUS_IN_METERS 6378.137
4145

4246
PHP_MINIT_FUNCTION(geospatial);
4347
PHP_MINFO_FUNCTION(geospatial);

0 commit comments

Comments
 (0)