mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
AP_GPS_GSOF-NOVA: fix last_gps_time_ms
This commit is contained in:
parent
1bd863e36b
commit
e4ff445ea7
@ -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++;
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user