-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
Add support for calculating GPS Lag over DroneCAN #25732
base: master
Are you sure you want to change the base?
Conversation
a35fc10
to
f398f45
Compare
2422eca
to
0e2a46e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm pretty sure this will fail for several cases:
- a GPS module that doesn't have the leap seconds yet when we first get GPS lock and lockin the RTC base time
- a large crystal drift leading to large drift between GNSS time and AP_HAL::micros64()
The fundamental problem is the assumption that the two time domains are equivalent
0e2a46e
to
e75e1a5
Compare
Explanation of procedure on how the Lag is being Calculated: Key Time Domains: On Periph Side for Time Synchronisation Message:
Finally: Ublox Message Timestamp[GPS Time Domain] - Ublox Message Timestamp[Periph Time Domain] is the Conversion Time Delta between Periph Local Time and GPS Time. On Periph Side for GPS Fix Message and GPS RelPosNed Message:
On Ardupilot Side:
Benefit of using Time Synchronisation Message: Furthermore:
|
62c0f28
to
da592ad
Compare
da592ad
to
c34cdca
Compare
You say "precisely synchronize GPS Time" But what people really want is PPS. Does this help create a path for that? |
a5cd0af
to
92daac1
Compare
It extends the PPS through dronecan, yes. |
a31ea57
to
c0c9216
Compare
@bugobliterator how did the tests code with the artificial clock drift? |
53cf0c1
to
c5a1f6a
Compare
Jitter in sample time: This is done simply by finding delta between subsequent GPS Times as seen by GPS: The Values were within 200 +/- 1ms. The Plot is of c5a1f6a#diff-8f617a403545351808c8bf54a6d9fc310593075737558480ca2dcc4f12cb4f46R576-R587 |
it was being used to correct the time of message arrival. The signal is actually in line with time the solution is calculated for. The fix is to calculate the lag instead.
c5a1f6a
to
1801bdd
Compare
Following image shows the calculation of GPS message rx lag.