HKUST-Aerial-Robotics / ublox_driver

A driver for u-blox receiver (ZED-F9P) with ros support
GNU General Public License v3.0
96 stars 44 forks source link

curr_time.time is always equal to 0 #18

Closed firefly-hub closed 4 months ago

firefly-hub commented 5 months ago

@shaozu When msg_type is UBX_NAVPOS_ID, the current time curr_time.time is always equal to 0. Is this a problem with the code?

shaozu commented 4 months ago

@firefly-hub Did you check the GNSS signal in your test environment? i.e., if there is no GNSS/weak GNSS, the time will be 0.

zhh2005757 commented 3 months ago

@shaozu When msg_type is UBX_NAVPOS_ID, the current time curr_time.time is always equal to 0. Is this a problem with the code?

I think the code need your current system time to calculate gps week, so I add such a line of code to give curr_time a value and it works curr_time = sec2time(ros::Time::now().toSec());