-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Kaplan & Hegarty defines PVT problem as this:
so ξ[4] (https://github.com/JuliaGNSS/PositionVelocityTime.jl/blob/master/src/PositionVelocityTime.jl#L170) is equal to -c*Δt.
So time correction from reference time Δt should be ξ[4]/(-c)
https://github.com/JuliaGNSS/PositionVelocityTime.jl/blob/master/src/PositionVelocityTime.jl#L171 have the wrong sign, time correction is positive instead of negative:
corrected_reference_time = reference_time + time_correction / SPEEDOFLIGHT
It should be
corrected_reference_time = reference_time + time_correction / (-SPEEDOFLIGHT)
The result of this bug is that we have a position solution accurate to ~3m as expected (when stationary), but the time solution (as in PVTSolution output) is ~130ms earlier then the actual time. This doesn't show up in stationary scenarios, but if the receiver is moving very fast, like in low Earth orbit, this results in 500m position error
This is a plot of position error before this fix:
and after:
Input signal was generated using Skydel software defined GNSS simulator, on the default low Earth orbit satellite scenario (~400km orbit), then we check position error by comparing position outputs that Skydel generates and JuliaGNSS PVTSolution


