File tree Expand file tree Collapse file tree 6 files changed +16
-8
lines changed
Expand file tree Collapse file tree 6 files changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ RUN arduino-cli lib install "SparkFun BQ40Z50 Battery Manager Arduino Library"@1
8181RUN arduino-cli lib install "ArduinoMqttClient" @0.1.8
8282RUN arduino-cli lib install "SparkFun u-blox PointPerfect Library" @1.11.4
8383RUN arduino-cli lib install "SparkFun IM19 IMU Arduino Library" @1.0.1
84- RUN arduino-cli lib install "SparkFun UM980 Triband RTK GNSS Arduino Library" @1.0.9
84+ RUN arduino-cli lib install "SparkFun UM980 Triband RTK GNSS Arduino Library" @1.0.10
8585RUN arduino-cli lib install "SparkFun LG290P Quadband RTK GNSS Arduino Library" @1.0.8
8686RUN arduino-cli lib install "SparkFun I2C Expander Arduino Library" @1.0.1
8787RUN arduino-cli lib install "SparkFun Apple Accessory Arduino Library" @3.0.9
Original file line number Diff line number Diff line change @@ -593,7 +593,10 @@ uint8_t GNSS_LG290P::getActiveRtcmMessageCount()
593593double GNSS_LG290P::getAltitude ()
594594{
595595 if (online.gnss )
596- return (_lg290p->getAltitude ());
596+ // See issue #809
597+ // getAltitude returns the Altitude above mean sea level (meters)
598+ // For Height above Ellipsoid, we need to add the the geoidalSeparation
599+ return (_lg290p->getAltitude () + _lg290p->getGeoidalSeparation ());
597600 return (0 );
598601}
599602
Original file line number Diff line number Diff line change @@ -855,6 +855,8 @@ uint8_t GNSS_MOSAIC::getActiveMessageCount()
855855// ----------------------------------------
856856double GNSS_MOSAIC::getAltitude ()
857857{
858+ // _altitude contains the Ellipsoidal height (meters) from SBF Block 4007
859+ // We don't need to adjust for the Geoidal Separation (Undulation)
858860 return _altitude;
859861}
860862
Original file line number Diff line number Diff line change @@ -510,7 +510,10 @@ uint8_t GNSS_UM980::getActiveRtcmMessageCount()
510510double GNSS_UM980::getAltitude ()
511511{
512512 if (online.gnss )
513- return (_um980->getAltitude ());
513+ // See issue #809
514+ // getAltitude returns the Height above mean sea level (meters) from BESTNAVB
515+ // For Height above Ellipsoid, we need to add the the geoidalSeparation
516+ return (_um980->getAltitude () + _um980->getGeoidalSeparation ());
514517 return (0 );
515518}
516519
Original file line number Diff line number Diff line change @@ -892,6 +892,8 @@ uint8_t GNSS_ZED::getActiveRtcmMessageCount()
892892// ----------------------------------------
893893double GNSS_ZED::getAltitude ()
894894{
895+ // _altitude contains the Height above ellipsoid from NAV-PVT height
896+ // We don't need to adjust for the Geoidal Separation (Undulation)
895897 return _altitude;
896898}
897899
Original file line number Diff line number Diff line change @@ -241,11 +241,9 @@ void stateUpdate()
241241 settings.fixedLong = gnss->getLongitude ();
242242
243243 // See issue #809
244- // Strictly we should implement this inside each GNSS class / instance
245- double fixedAltitude = gnss->getAltitude ();
246- if ((present.gnss_lg290p ) || (present.gnss_um980 ))
247- fixedAltitude += gnss->getGeoidalSeparation ();
248- settings.fixedAltitude = fixedAltitude;
244+ // gnss->getAltitude() will always return Height above ellipsoid
245+ // even if the underlying library getAltitude does not
246+ settings.fixedAltitude = gnss->getAltitude ();
249247
250248 systemPrint (" Switching to Fixed Base mode using:" );
251249 systemPrint (" Lat: " );
You can’t perform that action at this time.
0 commit comments