From 5e63abf431776ae174b424f0190b4565e18f70e8 Mon Sep 17 00:00:00 2001 From: Michael Oborne Date: Fri, 28 Oct 2016 17:21:56 +0800 Subject: [PATCH] AP_GPS_SBF: change reported altitude from geoid to MSL --- libraries/AP_GPS/AP_GPS_SBF.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_GPS/AP_GPS_SBF.cpp b/libraries/AP_GPS/AP_GPS_SBF.cpp index a3ae275e72..cbd2e631b1 100644 --- a/libraries/AP_GPS/AP_GPS_SBF.cpp +++ b/libraries/AP_GPS/AP_GPS_SBF.cpp @@ -237,7 +237,7 @@ AP_GPS_SBF::process_message(void) if (temp.Latitude > -200000) { state.location.lat = (int32_t)(temp.Latitude * RAD_TO_DEG_DOUBLE * 1e7); state.location.lng = (int32_t)(temp.Longitude * RAD_TO_DEG_DOUBLE * 1e7); - state.location.alt = (int32_t)((float)temp.Height * 1e2f); + state.location.alt = (int32_t)(((float)temp.Height - temp.Undulation) * 1e2f ); } if (temp.NrSV != 255) {