Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sigindex: common function to resolve the frequence index
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.
- Loading branch information