AP_GPS: Fix bug in calculation of blended GPS delay

This commit is contained in:
priseborough 2017-05-22 11:05:40 +10:00 committed by Randy Mackay
parent 87abccef6c
commit aafacd0f8e

View File

@ -1450,7 +1450,7 @@ void AP_GPS::calc_blended_state(void)
if (_blend_weights[i] > 0.0f) {
temp_time_1 += (double)timing[i].last_fix_time_ms * (double) _blend_weights[i];
temp_time_2 += (double)timing[i].last_message_time_ms * (double)_blend_weights[i];
_blended_lag_sec += get_lag(i) * _blended_lag_sec;
_blended_lag_sec += get_lag(i) * _blend_weights[i];
}
}
timing[GPS_BLENDED_INSTANCE].last_fix_time_ms = (uint32_t)temp_time_1;