AP_GPS_GSOF-NOVA: fix last_gps_time_ms

This commit is contained in:
Michael Oborne 2017-03-08 17:31:36 +08:00 committed by Tom Pittenger
parent 1bd863e36b
commit e4ff445ea7
2 changed files with 3 additions and 3 deletions

View File

@ -298,7 +298,7 @@ AP_GPS_GSOF::process_message(void)
state.location.lng = (int32_t)(RAD_TO_DEG_DOUBLE * (SwapDouble(gsof_msg.data, a + 8)) * (double)1e7);
state.location.alt = (int32_t)(SwapDouble(gsof_msg.data, a + 16) * 100);
state.last_gps_time_ms = state.time_week_ms;
state.last_gps_time_ms = AP_HAL::millis();
valid++;
}

View File

@ -194,7 +194,7 @@ AP_GPS_NOVA::process_message(void)
state.time_week = nova_msg.header.nova_headeru.week;
state.time_week_ms = (uint32_t) nova_msg.header.nova_headeru.tow;
state.last_gps_time_ms = state.time_week_ms;
state.last_gps_time_ms = AP_HAL::millis();
state.location.lat = (int32_t) (bestposu.lat * (double)1e7);
state.location.lng = (int32_t) (bestposu.lng * (double)1e7);
@ -270,7 +270,7 @@ AP_GPS_NOVA::process_message(void)
}
// ensure out position and velocity stay insync
if (_new_position && _new_speed && _last_vel_time == state.last_gps_time_ms) {
if (_new_position && _new_speed && _last_vel_time == state.time_week_ms) {
_new_speed = _new_position = false;
return true;