rtkpos: rework the rolling exclusion of satellites #535
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The heuristics in manage_amb_LAMBDA() select a rolling satellite to test for exclusion, to see if it improves the ambiguity ratio. This was intending to note the sats used for AR, but was also iterating over the frequencies and noting sat/freq used for AR, but the array to hold the sat mapping was only large enough for the sats, not sats*freqs, leading to OOB access when there were many observations and frequencies. It was rolling over this combination, not as intended. Further it was sensitive to changes in the set of sats used for AR, the rolling point could jump around, jump back, and not progress smoothly thought the set of sats. Rework to address these issues, to roll through that sats smoothly.
Could have addressed the OOB along by increasing arsats[]. Guessing that the bumbling roll was not an unintended key heuristic, that fixing this will be an improvement.