mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
GPS driver: Fixed implicit cast causing time logic errors. Found by @Zefz
This commit is contained in:
parent
470d35aca1
commit
48a8ea7f19
@ -828,8 +828,8 @@ UBX::payload_rx_done(void)
|
||||
ts.tv_nsec = _buf.payload_rx_nav_timeutc.nano;
|
||||
clock_settime(CLOCK_REALTIME, &ts);
|
||||
|
||||
_gps_position->time_gps_usec = (uint64_t)epoch * 1000000; //TODO: test this
|
||||
_gps_position->time_gps_usec += (uint64_t)(_buf.payload_rx_nav_timeutc.nano * 1e-3f);
|
||||
_gps_position->time_gps_usec = ((uint64_t)epoch) * 1000000ULL;
|
||||
_gps_position->time_gps_usec += _buf.payload_rx_nav_timeutc.nano / 1000;
|
||||
}
|
||||
|
||||
_gps_position->timestamp_time = hrt_absolute_time();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user