Issue with UTM_GLOBAL_POSITION Timestamp Always Zero

I am working with the MAVLink UTM_GLOBAL_POSITION message and have encountered an issue where the time field is always reported as zero. All other fields in the message appear correct, including the latitude, longitude, and altitude data.

Interestingly, when I use the sensor_gps command in a shell connected to the vehicle system, I can obtain the correct GPS time without issues.

I would appreciate any insights on why the time field in the UTM_GLOBAL_POSITION message remains zero despite the GPS providing a correct time.

Which PX4 version is this, and what GPS?

PX4 version : 1.14.3
GPS : here4

Thanks for that.

So this is where the time is sent out:

You can see that it takes the time/date from the OS.

One thing to check would be to type date in the MAVLink shell (QGC → Analyze tools).

Now, I assume your Here 4 is connected with DroneCAN, so then the question is why the time is not set in there. Looking at the code it should be:

Can you give me the output of listener sensor_gps? That way we can check whether valid_pos_cov is true or not.

Sure, this is the output of listener sensor_gps, everything include the time seems correct.

Indeed that all looks correct.

What’s the output of date? Does it show the time and date?

1 Like

From the output of date, time field seems to start from the beginning of the UNIX epoch time.

That’s confusing, because the time should be set using px4_clock_settime.

What board are you using? Could it be that the RTC clock isn’t correctly set up?

We’re using a Cube Orange+ board. Could you guide me on how to ensure the RTC clock is correctly set up?