Not sure if my answer is helpful. But, if you get the data through the brain and its service, the timestamp can be monotonic or something else. I only use monotonic, so I am not sure.
Then, you can also specify at what event you want take the time measurement using this proto message.
I am using both monotonic time and GPS time data. However, I’m having trouble converting either of them into actual timestamps (i.e., year, month, day).
Is there a way to convert monotonic time into real-world time? I understand that monotonic time is based on system uptime, but I’m not sure how to determine or set the reference point to map it to a wall-clock time.
As for the GPS timestamp, it is documented to be in ‘POSIX format’, but the values seem surprisingly low. While the time intervals look consistent (so I can see how many seconds were measured), the absolute values do not match any real-world time. I’m wondering if I might be missing a base epoch or offset value when interpreting this data.
Hi, sean
Sorry for the delayed response. and it seems I misunderstood your issue.
For the conversion from monotonic to wall clock, personally I don’t really want to do it because finding out where the monotonic time starts is tricky. As far as I know, the staring point can be when the system boots up, but it can be some other events too. So, I personally won’t take this approach.
For the POSIX, although I am not familiar with it, it seems even POSIX time stamps can be either monotonic or real time according to my google search.
Yes, I was able to obtain the real-time timestamp using the utc_stamp, so that part is working now.
However, I’m still unsure why the GPS time, which is described as being in POSIX format, does not match the actual time — that remains a question for me.
That said, since I can use the UTC time, it’s not a big issue for me.