From 9e37e9ee82f34085d1cdfaf4eb96d7356a2551a6 Mon Sep 17 00:00:00 2001 From: Michael du Breuil Date: Tue, 9 Jan 2018 13:00:09 -0700 Subject: [PATCH] AP_GPS: Remove unused blending function. Thanks to ender-chen for noticing, closes #7510 --- libraries/AP_GPS/AP_GPS.cpp | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/libraries/AP_GPS/AP_GPS.cpp b/libraries/AP_GPS/AP_GPS.cpp index 8d2e5d3d77..969dd19337 100644 --- a/libraries/AP_GPS/AP_GPS.cpp +++ b/libraries/AP_GPS/AP_GPS.cpp @@ -1457,16 +1457,6 @@ void AP_GPS::calc_blended_state(void) corrected_location[i].alt += (int)(_hgt_offset_cm[i]); } - // Calculate the weighted sum of horizontal and vertical position offsets relative to the blended location - blended_alt_offset_cm = 0.0f; - blended_NE_offset_m.zero(); - for (uint8_t i=0; i 0.0f) { - blended_NE_offset_m += location_diff(state[GPS_BLENDED_INSTANCE].location, corrected_location[i]) * _blend_weights[i]; - blended_alt_offset_cm += (float)(corrected_location[i].alt - state[GPS_BLENDED_INSTANCE].location.alt) * _blend_weights[i]; - } - } - // If the GPS week is the same then use a blended time_week_ms // If week is different, then use time stamp from GPS with largest weighting // detect inconsistent week data