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

Sept update2 #503

Open
wants to merge 4 commits into
base: demo5
Choose a base branch
from

Conversation

ourairquality
Copy link

Revised, using the second attempt at sigindex, removed the complexity of two passes. Probably a few other updates as a result of retesting, plus some more comments in the code in relation to the loss of lock detection which seems to be a particularly challenging area for this decoder with it's highly compressed lock time representation. Also added raw nav decoder stubs for some more signals seen explored with PocketSDR, it decodes the SBF to the nav bits at least, but does not yet decode the nav data for these signals.

@ourairquality ourairquality force-pushed the sept-update2 branch 3 times, most recently from 00bd803 to 7f1d625 Compare October 28, 2024 11:28
Rather than the signal frequency index which is still used in the
observation structure to keep that compact.

When there are many signals the set of signals can change and when the
priorities are recomputed the frequency index can change so the
frequency index is not a reliable key for this state. This is not an
issue with just one signal, or perhaps two, but with more than NFREQ
signals there were subtle issues as the priories changed and the state
was mixed up.

There are a good few structures with just one array of data for each
signal and these have been expanded from being NFREQ+NEXOBS to MAXCODE
so that the signal code can be used as the index. This is a little
wasteful of memory but simple.
Support determining the reported lock time from the lock time
indicators. Calculate the time since the last observation (per
signal). Use these to also check for a possible loss of lock. A slip
might now be reported on an outage.

Special case for receivers (Septentrio) that send a lock time
indicator of zero on a half cycle ambiguity. Consider these as an
outage deferring the decision to flag a slip until the signal
returns. For a short period of half cycle ambiguity that recovers, a
slip report might now be avoided.

The functions for converting the lock time indicator to a time also
support returning the time increment to the next indicator value. This
was not found to be needed.

Fix the observation flushing after a sync, which had been guarded by
the max obs overflow check so that once the max obs limit was reached
it was stuck.
The frequency index returned by code2idx() is not unique and conflicts
need to be resolved. There were different implementations across the
code, RINEX, RTCM, and the raw receiver decoders. Add a common
exported function to implement this resolution.

sigindex(..., opt) allocates an frequency index given a signal code,
returning the allocated signal index on success of -1 on failure.
Conflicts are resolved using the signal priorities that can be
modified by the options in the opt argument, moving an existing
allocation if necessary.

sigindex(..., NULL) uses the same search algorithm as sigindex() but
does not allocate a new entry or check the consistency of code
priorities. Without the signal priorities, with the opt argument NULL,
the allocation ordering could not be determined, so this case is used
for this non-allocating variant.

Apply this resolution per satellite as the set of signals can vary
between satellites.

Update the RINEX, RTCM3, Unicore and Novatel format decoders to use
this new common function.
* add bounds checked raw accessor functions

* update measepoch and meas3ranges, to use the common sigindex
  function, and rework the slip loss handling.

* add Galileo CNAV raw decoding stub.

* add BeiDou B-CNAV1, B-CNAV2, B-CNAV3 raw decoding stubs.

* add QZSS L6 raw nav decoding stub.

* use a time tolerance when comparing time differences to zero.
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.

1 participant