Skip to content

Wrong sign for time correction  #8

@minecraft2048

Description

@minecraft2048

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions