# GPS as a continuous time source for SYSTEM\_TIME

**URL:** <https://discuss.px4.io/t/gps-as-a-continuous-time-source-for-system-time/38655>\
**Category:** PX4 Autopilot\
**Created:** [May 9, 2024, 4:52pm UTC](https://discuss.px4.io/t/gps-as-a-continuous-time-source-for-system-time/38655 "2024-05-09T16:52:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![william.henderson](https://discuss.px4.io/letter_avatar_proxy/v4/letter/w/f4b2a3/32.png) [@william.henderson](https://discuss.px4.io/u/william.henderson)\
**Post date:** [May 9, 2024, 4:52pm UTC](https://discuss.px4.io/t/gps-as-a-continuous-time-source-for-system-time/38655/1 "2024-05-09T16:52:18Z")

</div>

Hi, I am trying to see if there is a configuration I can set to have the system time of the pixhawk be continuously set by GPS time. I have done some testing with a M9N GPS, and on boot up I am able to get the system time of the pixhawk to be accurate with GPS time within 20ms. However, there appears to be a constant drift of ~2ms/minute from this initial time.

Does anyone know of a way to correct this? I would like to either continuously poll the GPS to have it update its system time every minute, or have a way to sync the onboard clock to the GPS clock.

Here is a plot of the time drift from my testing.

 ![Screenshot 2024-05-06 at 5.09.52 PM](https://discuss.px4.io/uploads/default/original/3X/f/0/f0d7f1f16495afcb0001693ebeee868dc42bca13.png)

---

<div class="post-metadata">

**Author:** ![sibujacob](https://discuss.px4.io/user_avatar/discuss.px4.io/sibujacob/32/9673_2.png) [@sibujacob](https://discuss.px4.io/u/sibujacob)\
**Post date:** [September 3, 2024, 11:21am UTC](https://discuss.px4.io/t/gps-as-a-continuous-time-source-for-system-time/38655/2 "2024-09-03T11:21:11Z")

</div>

Hi,

how did you get the GPS time syncing with the flight controller.
