@@ -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
@@ -952,6 +954,14 @@ uint8_t GNSS_MOSAIC::getFixType()
952954 return _fixType;
953955}
954956
957+ // ----------------------------------------
958+ // Returns the geoidal separation in meters or zero if the GNSS is offline
959+ // ----------------------------------------
960+ double GNSS_MOSAIC::getGeoidalSeparation ()
961+ {
962+ return _geoidalSeparation;
963+ }
964+
955965// ----------------------------------------
956966// Returns the hours of 24 hour clock or zero if not online
957967// ----------------------------------------
@@ -2527,7 +2537,8 @@ void GNSS_MOSAIC::storeBlock4007(SEMP_PARSE_STATE *parse)
25272537{
25282538 _latitude = sempSbfGetF8 (parse, 16 ) * 180.0 / PI; // Convert from radians to degrees
25292539 _longitude = sempSbfGetF8 (parse, 24 ) * 180.0 / PI;
2530- _altitude = (float )sempSbfGetF8 (parse, 32 );
2540+ _altitude = sempSbfGetF8 (parse, 32 ); // Ellipsoidal height
2541+ _geoidalSeparation = (double )sempSbfGetF4 (parse, 40 ); // Geoid undulation
25312542 _horizontalAccuracy = ((float )sempSbfGetU2 (parse, 90 )) / 100.0 ; // Convert from cm to m
25322543
25332544 // NrSV is the total number of satellites used in the PVT computation.
0 commit comments