Skip to content
This repository has been archived by the owner on Apr 13, 2021. It is now read-only.

Handle invalid SIDs #596

Open
ljbade opened this issue Jan 8, 2016 · 0 comments
Open

Handle invalid SIDs #596

ljbade opened this issue Jan 8, 2016 · 0 comments

Comments

@ljbade
Copy link
Contributor

ljbade commented Jan 8, 2016

The gnss_signal_t is often initialised to {0, 0, 0}

For example in the tracking channel state.

All PRN values for all constellations start at some number >0. E.g. 1 for GPS. Thus PRN = 0 is invalid.

When this invalid value is passed to sid_to_sbp the SBP wire values become {0, 0, 65535}. This is because for CONSTELLATION_GPS (which is 0) we subtract 1 from the PRN for compatibility with old Piksi's and consoles.

We discovered a bug in the SBP log analysis tool where this 65535 value caused a crash.

Improvements needed:

  • define in the SBP documentation that {0, 0, 0} is invalid
  • possibly add asserts that {0, 0, 0} or {0, 0, 65535} is not sent in SBP wire

/cc @swift-nav/firmware @swift-nav/hitl @jacobmcnamee

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant