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

Wrong sign for time correction #8

Open
minecraft2048 opened this issue Nov 21, 2023 · 0 comments
Open

Wrong sign for time correction #8

minecraft2048 opened this issue Nov 21, 2023 · 0 comments

Comments

@minecraft2048
Copy link

minecraft2048 commented Nov 21, 2023

Kaplan & Hegarty defines PVT problem as this:

image

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:

broken

and after:

error-good

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

minecraft2048 added a commit to minecraft2048/PositionVelocityTime.jl that referenced this issue Nov 21, 2023
Previously calc_pvt applies time correction factor with the wrong
sign, which results in correct position solution at wrong time.
For more information look at
JuliaGNSS#8
minecraft2048 added a commit to minecraft2048/PositionVelocityTime.jl that referenced this issue Jun 3, 2024
Previously calc_pvt applies time correction factor with the wrong
sign, which results in correct position solution at wrong time.
For more information look at
JuliaGNSS#8
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

No branches or pull requests

1 participant