From: tsteven4 <13596209+tsteven4@users.noreply.github.com> Date: Tue, 6 Aug 2024 19:12:58 +0000 (-0600) Subject: correct WGS84 semi minor axis value. (#1310) X-Git-Tag: archive/raspbian/1.10.0+ds-2+rpi1~1^2~12^2^2~79 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=e5c26fb2805e2f9abcea7ba52e42fff5fdb574a0;p=gpsbabel.git correct WGS84 semi minor axis value. (#1310) It appears the GSR80 value was used instead of the WGS84 value, which is a very small error. However, there was a typo in the value in GPS_Math_XYZ_To_WGS84LatLonH that resulted in an order of magnitude error! This could lead to GPS_Math_XYZ_To_WGS84LatLonH never converging. This may be why skytraq created their own function to convert ECEF to WGS84. --- diff --git a/jeeps/gpsmath.cc b/jeeps/gpsmath.cc index 8da383fa5..c97b6ad48 100644 --- a/jeeps/gpsmath.cc +++ b/jeeps/gpsmath.cc @@ -457,7 +457,7 @@ void GPS_Math_WGS84LatLonH_To_XYZ(double phi, double lambda, double H, double* x, double* y, double* z) { double a = 6378137.000; - double b = 6356752.3141; + double b = 6356752.314245; GPS_Math_LatLonH_To_XYZ(phi,lambda,H,x,y,z,a,b); @@ -510,7 +510,7 @@ void GPS_Math_XYZ_To_WGS84LatLonH(double* phi, double* lambda, double* H, double x, double y, double z) { double a = 6378137.000; - double b = 66356752.3141; + double b = 6356752.314245; GPS_Math_XYZ_To_LatLonH(phi,lambda,H,x,y,z,a,b);