# Huge timestamp difference (INVALID TIMESTAMP)

**URL:** <https://community.stereolabs.com/t/huge-timestamp-difference-invalid-timestamp/8754>\
**Category:** Python\
**Tags:** python, sdk\
**Created:** [May 7, 2025, 4:57pm UTC](https://community.stereolabs.com/t/huge-timestamp-difference-invalid-timestamp/8754 "2025-05-07T16:57:27Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![nathanL](https://community.stereolabs.com/letter_avatar_proxy/v4/letter/n/3bc359/32.png) [@nathanL](https://community.stereolabs.com/u/nathanL)\
**Post date:** [May 7, 2025, 4:57pm UTC](https://community.stereolabs.com/t/huge-timestamp-difference-invalid-timestamp/8754/1 "2025-05-07T16:57:27Z")

</div>

Setup: ZED 2i, Zbox Orin

Hello,

I used to have the error “GNSS DATA COVARIANCE MUST VARY” when ingesting my gnss data into the fusion, even though it was varying when looking at the data. I couldn’t solve the issue and I’ve read somwhere that it was moved from an error to a warning in the version 4.2.4 of the zed sdk.

So I updated mine from v4.1.3 to 4.2.5, but now I have the error “INVALID TIMESTAMP, The timestamp of the GNSS data you are attempting to ingest for [GeoTracking] is different from the camera timestamp.”.

It says the difference is of -1494893472 ms.  
As you can see, when I calculate the difference myself, it is of only 126 ms, which is good, but it seems that it gets one value from somewhere else to calculate his own difference ? What could it be ?

I’ve noticed that the difference goes from -1494894472 ms to -1494893472 ms, which is exactly one second, which corresponds to my gnss timestamp as it is updated every second. So does it not use the ZED Timestamp ? And also, it goes from -1494894472 to -1494893472, which sounds weird to me as it’s heading to 0 and not to -infinity.

Is it a problem with the OS clock not being synchronized ? I’m so lost…

Here is how I set the GNSSData ts:

```auto
if "time" in gpsd_data:
                    timestamp_microseconds = int(gpsd_data["time"].timestamp() * 1000000)
                    ts = sl.Timestamp()
                    ts.set_microseconds(timestamp_microseconds)
                    current_gnss_data.ts = ts

```

And here is how I get the timestamps and log them :

```auto
if fusion is not None:
                    last_image_timestamp = zed_camera.get_timestamp(sl.TIME_REFERENCE.IMAGE)
                    current_timestamp = zed_camera.get_timestamp(sl.TIME_REFERENCE.CURRENT)
                    print("Latest image timestamp: ", last_image_timestamp.get_nanoseconds(), "ns from Epoch.")
                    print("Current timestamp: ", current_timestamp.get_nanoseconds(), "ns from Epoch.")

                    # Ingest GNSS data - EXACT match to recording.py
                    ingest_error = fusion.ingest_gnss_data(input_gnss)
                    logger.info(f"GNSS data ingested with status: {ingest_error}")
                    
                    if ingest_error == sl.FUSION_ERROR_CODE.SUCCESS:
                        logger.info("✓ GNSS data ingested successfully!")
                        # Save GNSS data into JSON:
                        gnss_data_saver.addGNSSData(input_gnss)
                    else:
                        logger.warning(f"Fusion ingest error: {ingest_error}")
                         # Get GNSS timestamp
                        gnss_timestamp = input_gnss.ts.get_milliseconds() # GNSS timestamp in milliseconds

                        # Get ZED camera timestamp
                        zed_timestamp = zed_camera.get_timestamp(sl.TIME_REFERENCE.CURRENT).get_milliseconds()

                        # Log and compare the timestamps
                        print(f"ZED Timestamp: {zed_timestamp} ms, GNSS Timestamp: {gnss_timestamp} ms, Difference: {zed_timestamp - gnss_timestamp} ms")
                        print("Image Timestamp: ", zed_camera.get_timestamp(sl.TIME_REFERENCE.IMAGE).get_milliseconds())
                        print("------------------------------")

```

```auto
INFO:gpsd-reader-rtk:GNSS Position: lat=50.620069, lon=4.615719, alt=99.2m, mode=3
INFO:gpsd-reader-rtk:GNSS Status: 2
INFO:gpsd-reader-rtk:Horizontal precision (EPH): 10.577
INFO:gpsd-reader-rtk:Vertical precision (EPV): 18.046
INFO:zed-camera-server:GNSS data received with timestamp: 1746556795.000s, lat/lon: 50.620069/4.615719
Latest image timestamp: 1746556795007094481 ns from Epoch.
Current timestamp: 1746556795101533404 ns from Epoch.
[2025-05-06 18:39:55 UTC][ZED][WARNING] The timestamp of the GNSS data you are attempting to ingest for [GeoTracking] is different from the camera timestamp. Timestamp difference: -1494894472 ms.
INFO:zed-camera-server:GNSS data ingested with status: INVALID TIMESTAMP
WARNING:zed-camera-server:Fusion ingest error: INVALID TIMESTAMP
ZED Timestamp: 1746556795102 ms, GNSS Timestamp: 1746556795000 ms, Difference: 102 ms
Image Timestamp: 1746556795007

INFO:gpsd-reader-rtk:GNSS Position: lat=50.620069, lon=4.615722, alt=99.0m, mode=3
INFO:gpsd-reader-rtk:GNSS Status: 2
INFO:gpsd-reader-rtk:Horizontal precision (EPH): 10.112
INFO:gpsd-reader-rtk:Vertical precision (EPV): 17.207
INFO:zed-camera-server:GNSS data received with timestamp: 1746556796.000s, lat/lon: 50.620069/4.615722
Latest image timestamp: 1746556796040503481 ns from Epoch.
Current timestamp: 1746556796125982301 ns from Epoch.
[2025-05-06 18:39:56 UTC][ZED][WARNING] The timestamp of the GNSS data you are attempting to ingest for [GeoTracking] is different from the camera timestamp. Timestamp difference: -1494893472 ms.
INFO:zed-camera-server:GNSS data ingested with status: INVALID TIMESTAMP
WARNING:zed-camera-server:Fusion ingest error: INVALID TIMESTAMP
ZED Timestamp: 1746556796126 ms, GNSS Timestamp: 1746556796000 ms, Difference: 126 ms
Image Timestamp: 1746556796040

```

---

<div class="post-metadata">

**Author:** ![TanguyHardelin](https://community.stereolabs.com/user_avatar/community.stereolabs.com/tanguyhardelin/32/1298_2.png) [@TanguyHardelin](https://community.stereolabs.com/u/TanguyHardelin)\
**Post date:** [May 12, 2025, 8:26am UTC](https://community.stereolabs.com/t/huge-timestamp-difference-invalid-timestamp/8754/2 "2025-05-12T08:26:15Z")

</div>

Hello @nathanL,  
It seems to be an error related to timestamp unit. Could you print `current_gnss_data.ts` in micro\_seconds to confirm it ?

Regards,  
Tanguy

---

<div class="post-metadata">

**Author:** ![nathanL](https://community.stereolabs.com/letter_avatar_proxy/v4/letter/n/3bc359/32.png) [@nathanL](https://community.stereolabs.com/u/nathanL)\
**Post date:** [May 12, 2025, 10:23am UTC](https://community.stereolabs.com/t/huge-timestamp-difference-invalid-timestamp/8754/3 "2025-05-12T10:23:37Z")

</div>

Hi @TanguyHardelin,

Thank you for your reply.

I have added a log as follows :

 ![image](https://community.stereolabs.com/uploads/default/original/2X/0/03c4c5628a147fbc973e39d957996b59bffbbd62.png)

And this is what I get :

 ![image](https://community.stereolabs.com/uploads/default/original/2X/7/71cd35b55cfb86cfd8b520f83e4ac61ee741031f.png)

The timestamp in microseconds seems fine to me…

---

<div class="post-metadata">

**Author:** ![nathanL](https://community.stereolabs.com/letter_avatar_proxy/v4/letter/n/3bc359/32.png) [@nathanL](https://community.stereolabs.com/u/nathanL)\
**Post date:** [May 12, 2025, 12:52pm UTC](https://community.stereolabs.com/t/huge-timestamp-difference-invalid-timestamp/8754/4 "2025-05-12T12:52:54Z")

</div>

Some additional information:

I have logged the value of `sl.get_current_timestamp()` as well, and there is no difference either.

Where does the ingest\_gnss\_data() get the timestamps from ?

I’ve checked `zed_camera.get_timestamp(sl.TIME_REFERENCE.IMAGE)`, `zed_camera.get_timestamp(sl.TIME_REFERENCE.CURRENT)`, `input_gnss.ts` and `sl.get_current_timestamp()` and they all have reasonable values.

I updated my zed sdk to version 5 and I have the same issue. As stated before, I had no timestamp issue in version 4.1.3, only a covariance one, which to me seems less severe but I don’t know which error is treated first in the sdk…

From what I understand, the camera timestamp treated by the fusion is 11 days in the future from now (-997924472 ms). At the time of posting, it was 17 days (-1494893472 ms). So the “camera” timestamp used by the fusion is a fixed value in the future which corresponds to :  
Sat May 24 2025 01:54:49 GMT+0000 (1748051689472 ms).

---

<div class="post-metadata">

**Author:** ![TanguyHardelin](https://community.stereolabs.com/user_avatar/community.stereolabs.com/tanguyhardelin/32/1298_2.png) [@TanguyHardelin](https://community.stereolabs.com/u/TanguyHardelin)\
**Post date:** [May 14, 2025, 4:13pm UTC](https://community.stereolabs.com/t/huge-timestamp-difference-invalid-timestamp/8754/5 "2025-05-14T16:13:09Z")

</div>

Hello @nathanL,  
Could you please share SVO2 with the GNSS data so that we can reproduce the issue? It might be related to another problem that is currently being addressed. If that is the case, it will be fixed in the next release.

Regards,  
Tanguy

---

<div class="post-metadata">

**Author:** ![nathanL](https://community.stereolabs.com/letter_avatar_proxy/v4/letter/n/3bc359/32.png) [@nathanL](https://community.stereolabs.com/u/nathanL)\
**Post date:** [May 14, 2025, 6:32pm UTC](https://community.stereolabs.com/t/huge-timestamp-difference-invalid-timestamp/8754/6 "2025-05-14T18:32:55Z")

</div>

Hi @TanguyHardelin

Thank you for the follow up. Here is the SVO2:  
[ZED\_SN37668145\_14-05-2025\_20-18-40.svo2](https://community.stereolabs.com/uploads/short-url/wKxnVm49faXt5KHJpPm5jAjAll4.svo2) (2.6 MB)

I’ve used the recording and playback samples and I had the same error. Interestingly, I’ve also had issues before I could run them.

First issue (recording sample) :

 ![image](https://community.stereolabs.com/uploads/default/original/2X/f/f2a7308b370570330f371d18891e0e7947bc3f01.png)

Second issue (playback sample)

 ![image](https://community.stereolabs.com/uploads/default/original/2X/5/5411cfb78c40c972936b323443df5c97231d03d0.png)

I’ve simply changed M\_PI to math.pi and commented the imshow function so that I could send you the svo2 file, but now I’m thinking these issues might give a hint of why the “invalid timestamp” error happens ?

Also, when is the next release planned for ?  
I want to make sure that it is not an issue with the current release as I don’t have much time and it is blocking me on other things…

---

<div class="post-metadata">

**Author:** ![nathanL](https://community.stereolabs.com/letter_avatar_proxy/v4/letter/n/3bc359/32.png) [@nathanL](https://community.stereolabs.com/u/nathanL)\
**Post date:** [May 19, 2025, 8:29am UTC](https://community.stereolabs.com/t/huge-timestamp-difference-invalid-timestamp/8754/7 "2025-05-19T08:29:23Z")

</div>

@TanguyHardelin I went through the topics and this seems similar to my issue : “[Global Localization Playback Mode - GNSS Ingest Error and Termination (Initial X not PSD) - #9 by karthikreddy157](https://community.stereolabs.com/t/global-localization-playback-mode-gnss-ingest-error-and-termination-initial-x-not-psd/8604/9)”  
They also have the “INVALID TIMESTAMP” error even though the actual difference is less than 4 seconds. The only difference with me is that the error doesn’t solve itself when switching from NEURAL to PERFORMANCE depth mode…

---

<div class="post-metadata">

**Author:** ![nathanL](https://community.stereolabs.com/letter_avatar_proxy/v4/letter/n/3bc359/32.png) [@nathanL](https://community.stereolabs.com/u/nathanL)\
**Post date:** [May 21, 2025, 2:26pm UTC](https://community.stereolabs.com/t/huge-timestamp-difference-invalid-timestamp/8754/8 "2025-05-21T14:26:26Z")

</div>

Update:  
I switched from the SDK version 5.0.0 to 5.0.1 and I only had the “INVALID TIMESTAMP” message twice and then the status changed to “SUCCESS” for 15 seconds, to finally change to “GNSS DATA COVARIANCE MUST VARY”.

I do get “SUCCESS” again every so often but as I tried in an immobile setup, it makes sense to have the covariance message.

Also, if I’m not mistaken the covariance message is a warning instead of an error now, so it shouldn’t be an issue for the fusion.

Thank you for your help !

---

<div class="post-metadata">

**Author:** ![karthikreddy157](https://community.stereolabs.com/user_avatar/community.stereolabs.com/karthikreddy157/32/3555_2.png) [@karthikreddy157](https://community.stereolabs.com/u/karthikreddy157)\
**Post date:** [May 22, 2025, 6:01am UTC](https://community.stereolabs.com/t/huge-timestamp-difference-invalid-timestamp/8754/9 "2025-05-22T06:01:53Z")

</div>

Hi @nathanL

Thanks for sharing your results — really helpful!

I’m currently using **SDK 4.2** , and I’ve been seeing the **“INVALID TIMESTAMP”** issue as well during GNSS fusion for Depth mode NUERAL.

Planning to upgrade to **5.0.1** soon — just wanted to check:  
Is it working reliably for you when using **DEPTH\_MODE.NEURAL**?  
Or do you still see timestamp issues in that mode?

Would be great to know before I make the switch. Appreciate your insights!  
Thank you

---

<div class="post-metadata">

**Author:** ![nathanL](https://community.stereolabs.com/letter_avatar_proxy/v4/letter/n/3bc359/32.png) [@nathanL](https://community.stereolabs.com/u/nathanL)\
**Post date:** [May 22, 2025, 7:48am UTC](https://community.stereolabs.com/t/huge-timestamp-difference-invalid-timestamp/8754/10 "2025-05-22T07:48:59Z")

</div>

Hi @karthikreddy157,

So it turns out that I had switched to DEPTH\_MODE.PERFORMANCE previously, which didn’t help in v5.0.0 but works in 5.0.1 for me, and indeed it doesn’t work in DEPTH\_MODE.NEURAL even in v5.0.1 🥲

---

<div class="post-metadata">

**Author:** ![nathanL](https://community.stereolabs.com/letter_avatar_proxy/v4/letter/n/3bc359/32.png) [@nathanL](https://community.stereolabs.com/u/nathanL)\
**Post date:** [May 23, 2025, 9:17am UTC](https://community.stereolabs.com/t/huge-timestamp-difference-invalid-timestamp/8754/11 "2025-05-23T09:17:54Z")

</div>

@TanguyHardelin any update on this ?

---

<div class="post-metadata">

**Author:** ![nathanL](https://community.stereolabs.com/letter_avatar_proxy/v4/letter/n/3bc359/32.png) [@nathanL](https://community.stereolabs.com/u/nathanL)\
**Post date:** [June 2, 2025, 8:37am UTC](https://community.stereolabs.com/t/huge-timestamp-difference-invalid-timestamp/8754/12 "2025-06-02T08:37:10Z")

</div>

@TanguyHardelin @BenjaminV @Myzhar  
Hi everyone, I’m circling back on this question as I’m working against some project deadlines. Any guidance or timeline for when someone might be able to take a look would be really appreciated.

---

<div class="post-metadata">

**Author:** ![TanguyHardelin](https://community.stereolabs.com/user_avatar/community.stereolabs.com/tanguyhardelin/32/1298_2.png) [@TanguyHardelin](https://community.stereolabs.com/u/TanguyHardelin)\
**Post date:** [June 12, 2025, 8:20am UTC](https://community.stereolabs.com/t/huge-timestamp-difference-invalid-timestamp/8754/13 "2025-06-12T08:20:16Z")

</div>

Hello @nathanL,

We were unable to reproduce the issue you reported. However, we have enhanced the log message for the “INVALID TIMESTAMP” error to make it more informative. This improvement is scheduled for release in version 5.0.2.

Regarding the warning message “GNSS DATA COVARIANCE MUST VARY,” please note that this is just a warning and should not affect the performance of the entire fusion algorithm.

Best regards,  
Tanguy

---

<div class="post-metadata">

**Author:** ![nathanL](https://community.stereolabs.com/letter_avatar_proxy/v4/letter/n/3bc359/32.png) [@nathanL](https://community.stereolabs.com/u/nathanL)\
**Post date:** [June 12, 2025, 8:55am UTC](https://community.stereolabs.com/t/huge-timestamp-difference-invalid-timestamp/8754/14 "2025-06-12T08:55:48Z")

</div>

Thank you @TanguyHardelin, looking forward to the next release then 🙂
