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

Beidou: avoid passing corrupt ephemeris and TOW measurements to observables #649

Open
wants to merge 6 commits into
base: next
Choose a base branch
from

Conversation

vladisslav2011
Copy link
Contributor

@vladisslav2011 vladisslav2011 commented Aug 9, 2022

I've done some tests with real world signal and found, that BeiDou B1I/B3I telemetry decoders do not work correctly when run for some time or signal quality is far from perfect. This results in position jumps, no PVT when many satellites are tracked, completely wrong PVT using 4 satellites and weird periodic tracking shown by GNSS-SDR-Monitor.
This PR contains following fixes:

  1. Correct first word second half ECC calculation as official documentation suggests
  2. ECC error counting and ECC error count based ephemeris rejection
  3. Stricter preamble sync checking and resynchronization on sync loss
  4. SOW period checking and restart on SOW sync loss
  5. Ephemeris validation by comparing to a previous set/last valid set
  6. Configuration parameters to control all that new things

Merging this PR should fix #631
The next PR would implement similar improvements to Glonass telemetry decoder.
Documentation update pending.

@vladisslav2011 vladisslav2011 force-pushed the beidou_tlm_ecc branch 2 times, most recently from 4ec96e9 to 1c73ecf Compare August 9, 2022 17:57
@vladisslav2011
Copy link
Contributor Author

vladisslav2011 commented Aug 9, 2022

volk-gnsssdr-macos-xcode CI job is failing again. Is this some sort of curse?
Let's sign commits with gpg and try it again...

@vladisslav2011 vladisslav2011 marked this pull request as draft August 22, 2022 20:18
@vladisslav2011 vladisslav2011 force-pushed the beidou_tlm_ecc branch 5 times, most recently from f7e80b6 to 0f98b97 Compare August 25, 2022 23:50
@vladisslav2011
Copy link
Contributor Author

vladisslav2011 commented Aug 26, 2022

Demonstration: https://www.youtube.com/watch?v=q4kNYVTMV3Y
GPS+Galileo for comparison: https://www.youtube.com/watch?v=WA-wMrXQyWg

@vladisslav2011 vladisslav2011 marked this pull request as ready for review August 26, 2022 11:39
@vladisslav2011 vladisslav2011 changed the title Beidou: avoid passing corrupt ephemeris and TOW measurements to an observables Beidou: avoid passing corrupt ephemeris and TOW measurements to observables Aug 26, 2022
@vladisslav2011 vladisslav2011 force-pushed the beidou_tlm_ecc branch 2 times, most recently from fc3db41 to d0767c3 Compare August 26, 2022 13:56
Implement generic ephemeris validator:
Keep previous and last valid ephemeris.
Compare received ephemeris to previous and last valid.
Count successful comparisions.
Update last valid ephemeris if count reaches threshold.

Add telemetry decoder configuration parameters:

int32_t TelemetryDecoder_B1.ecc_reject - reject ephemeris if the ECC error
counter reaches this value

int32_t TelemetryDecoder_B1.ecc_resync - resync telemetry decoder if the ECC
error counter reaches this value

int32_t TelemetryDecoder_B1.validator_thr - number of equal ephemeris
received, after that the ephemeris would be passed to observable. Set to
1 to disable validation

bool TelemetryDecoder_B1.validator_accept_first - an option to always pass
the first received ephemeris, bypassing the validator for one time. This
may speed up first PVT solution at cost of higher probability of getting
incorrect PVT in case, the first epehemeris would be corrupt.

Signed-off-by: Vladislav P <vladisslav2011@gmail.com>
Signed-off-by: Vlad P <vladisslav2011@gmail.com>
Simplified telemetry decoder with better preamble synchronization.

Resynchronize on bad TOW update.

New telemetry decoder ecc resync/reject functionality:
Count ECC errors. Reject subframe when ECC counter reaches certain
threshold, defined in a configuration.

New configuration parameters:

TelemetryDecoder_XX.ecc_reject

If the ECC error count grows past this value, reject subframe/word as
corrupt

TelemetryDecoder_XX.ecc_resync

If the ECC error count grows past this value, reject subframe/word and
restart telemetry decoder

Signed-off-by: Vladislav P <vladisslav2011@gmail.com>
1. Check SOW period
2. Compare received ephemeris to last received and last valid
3. Count successful comparisions and pass ephemeris to observables only
when count reaches defined threshold
4.Add BeiDou ephemeris validation configuration options:

uint32_t TelemetryDecoder_B1.validator_thr = 2 - minimum number of matching ephemeris sets
received before passing it to observables

bool TelemetryDecoder_B1.validator_accept_first = true - always pass first ephemeris
set to observables to speed up first fix at cost of possible invalid
solution or delayed solution in case of weak signals/interference/jamming.

Signed-off-by: Vladislav P <vladisslav2011@gmail.com>
Change incorrect log messages, mentioning GPS L2 in BeiDou telemetry
blocks to correctly mention BeiDou B1I/B3I.

Signed-off-by: Vlad P <vladisslav2011@gmail.com>
Signed-off-by: Vladislav P <vladisslav2011@gmail.com>
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.

None yet

1 participant