Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SFY variant with external UBLOX GPS #173

Merged
merged 14 commits into from
Oct 1, 2024
Merged

SFY variant with external UBLOX GPS #173

merged 14 commits into from
Oct 1, 2024

Conversation

gauteh
Copy link
Owner

@gauteh gauteh commented Sep 26, 2024

Implements #170 .

image

@gauteh gauteh changed the title init ublox ext rtk SFY variant with external UBLOX GPS Sep 26, 2024
@gauteh
Copy link
Owner Author

gauteh commented Sep 27, 2024

@gauteh
Copy link
Owner Author

gauteh commented Sep 27, 2024

@edwinrainville (and also @jerabaul29 if you are interested? :)), I'm trying to think of a sub-millisecond sync algorithm:

  • Ublox PVT updated ( 20 Hz)
  • Ublox PPS -> ext-gps-mod
  • pps_time = ext-gps-mod.micros()
  • ext-gps-mod PPS -> SFY
  • SFY: stores sfy_pps_time: for incoming PVT telegram
  • read_time = ext-gps-mod.micros()
  • ext-gps-mod reads PVT related to PPS. Is the T updated or is it fixed to the
    PPS? maybe all of this is fast enough to ignore.
  • ext-gps-mod push PVT to SFY + (read_time - pps_time)
  • sfy_read_time = sfy.micros()/RTC
  • SFY reads PVT related to PPS
  • SFY sets local time to T + (sfy_read_time - sfy_pps_time)

Does that make sense? I have PPS working on the arduino-code, not yet on SFY. We need the synchronization to match IMU and GPS timeseries.

https://github.com/gauteh/sfy/tree/sfy-rtk/sfy-buoy/sfy-ext-gps#sfy-with-rtk-relay

@gauteh
Copy link
Owner Author

gauteh commented Sep 29, 2024

According to 12.1.8 the maximum jitter of the RTC is 1 ms for XR crystal, or 8 ms for LFRC, which is good enough.

@gauteh gauteh merged commit cd6a683 into main Oct 1, 2024
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant