Skip to content

Commit

Permalink
AP_GPS: don't consider uBlox PVT time correct unless we have 2D fix
Browse files Browse the repository at this point in the history
the time may be set by an offline assistance client and may not be
accurate
  • Loading branch information
tridge committed Jul 2, 2024
1 parent 39e75c5 commit 681e2d7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions libraries/AP_GPS/AP_GPS_UBLOX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1719,8 +1719,10 @@ AP_GPS_UBLOX::_parse_gps(void)
state.hdop = _buffer.pvt.p_dop;
state.vdop = _buffer.pvt.p_dop;
}

state.last_gps_time_ms = AP_HAL::millis();

if (_buffer.pvt.fix_type >= 2) {
state.last_gps_time_ms = AP_HAL::millis();
}

// time
state.time_week_ms = _buffer.pvt.itow;
Expand Down

0 comments on commit 681e2d7

Please sign in to comment.