Skip to content

Map Septentrio SBF blocks to the device-independent GPS model#346

Open
jclark wants to merge 16 commits into
sbfbinfrom
septentrio-msg
Open

Map Septentrio SBF blocks to the device-independent GPS model#346
jclark wants to merge 16 commits into
sbfbinfrom
septentrio-msg

Conversation

@jclark

@jclark jclark commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Convert decoded SBF blocks into device-independent gpsprot messages: the real gps/internal/septentrio PacketProcessor, the per-epoch navigation model, and the signal-number and SVID mapping tables. It produces TimeMsg, LeapSecondMsg, position and velocity, per-epoch solution quality (NavEpochMsg), SatellitesMsg, SurveyMsg, and CorReportMsg from the SBF stream, and adds NavEpochManager.EndOfProtocolEpoch so an SBF EndOfPVT marker cooperates with a concurrently active NMEA processor rather than flushing its epoch early.

Stacked on the sbfbin PR (base branch sbfbin), whose decode structs it consumes. Independent of the message-file PR.

Part of #340.

Design: https://github.com/jclark/satpulse/blob/septentrio-msg/plan/septentrio-msg.md

jclark added 5 commits July 3, 2026 21:31
…poch ends

A processor whose own epoch has ended but which cannot assert the epoch
is over for the whole receiver (Septentrio's EndOfPVT marks the end of
the PVT family, not the epoch) needs a flush signal distinct from
EpochStarted/EndOfEpoch. EndOfProtocolEpoch flushes now only when the
caller is the sole active processor and no other protocol took part in
the last epoch; otherwise it defers to the next whole-receiver boundary,
so a concurrently-active protocol such as NMEA (whose sentences may trail
EndOfPVT) is not flushed mid-epoch. Participation is tracked in a new
lastEpoch set captured by flush. EpochStarted/EndOfEpoch semantics are
unchanged, so all existing protocols behave exactly as before.

Claude-Session: https://claude.ai/code/session_01Giuwab4jijWsXtiKimJDqr
Build the real gps/internal/septentrio.PacketProcessor: it parses each
packet via sbfbin.ParseMsg, converts recognized blocks into gpsprot.Msg
values, accumulates one NavEpochMsg per PVT-family epoch, runs an
independent SatellitesMsg stream, and falls back to NativeMsg for every
unmapped block.

Message families:
- TimeMsg from ReceiverTime, PVTGeodetic/PVTCartesian, and xPPSOffset,
  all on the GPS week/TOW convention (no per-constellation whole-second
  shift); LeapSecondMsg from GPSUtc/GALUtc/BDSUtc.
- PosGeo/PosECEF/VelGeo/VelECEF from PVTGeodetic/PVTCartesian.
- NavEpochMsg quality accumulation from PVTGeodetic/PVTCartesian, DOP,
  and the PosCov*/VelCov* covariance blocks.
- SatellitesMsg as a three-way combine of ChannelStatus, MeasEpoch, and
  SatVisibility, with the shared SVID and signal-number tables.
- SurveyMsg (from PVT Mode bits) and CorReportMsg (from DiffCorrIn).

Epoch flushing keys on the (TOW, WNc) block header. EndOfPVT calls the
new EndOfProtocolEpoch so an SBF-only receiver flushes promptly while a
concurrent NMEA stream is merged at the next whole-receiver boundary.

sbfbin gains msgaccess.go with the wire-level constants, masks, and
accessors this layer needs (signal numbers, SVID ranges, slot-status
values, Mode/WACorrInfo bitfields), so the conversion layer inlines no
raw wire value. Also fixes a pre-existing off-by-one in the PPSTimescale
enum (a stray DNU constant shared the iota block, making PPSTimescaleGPS
2 instead of 1) and adds the missing gpsprot.SigIDQZSSL5S SignalID.

Claude-Session: https://claude.ai/code/session_01Giuwab4jijWsXtiKimJDqr
# Conflicts:
#	docs/_includes/NEWS.md

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d075ea6578

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread gps/internal/septentrio/sbfnavepoch.go Outdated
// ChannelStatus contributed (haveBase), it only updates matching slots; when
// it is the base, it adds one SignalInfo per measurement.
func (c *satCombiner) overlayMeasEpoch(meas *sbfbin.MeasEpoch, haveBase bool) {
for i := range meas.Type1 {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Include MeasEpoch type-2 observations in satellite signals

For multi-frequency SBF MeasEpoch blocks, additional observations for the same satellite are carried in the Type2 slave sub-blocks, but this loop only visits Type1. In streams where L2/L5/etc. measurements are encoded as type-2 entries, SatellitesMsg either omits those signals entirely when MeasEpoch is the base, or leaves their ChannelStatus slots without the MeasEpoch CN0/precise SignalID overlay. Please iterate the per-Type1 Type2 entries as measurements too.

Useful? React with 👍 / 👎.

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