Repository navigation
GPS: one fix per receiver epoch from standard sentences; Unicore INSPVAX - #300
Merged
Merged
Conversation
Phase 2 of Plans/GPS_RECEIVER_SENTENCES_PLAN.md.
- NmeaEpochAssembler takes GGA/GNS, VTG, HPR, HDT and THS and emits one
fix per receiver epoch. Sentences with a UTC belong to that epoch;
those without attach to the open one. The receiver's per-epoch set is
learned from three alike epochs (one epoch of lag until then); once
learned the fix is emitted on the set's last member, with no timer. A
member that never comes is marked absent (heading invalid, roll 0,
speed 0, nothing carried over) and counted as incomplete; a changed
set is relearned. A heading from an IMU talker (IN, HE) goes to the
IMU slot, as $PANDA's does; HPR's pitch is the roll, taken when fixed.
- The parser dispatches $<talker><type> sentences to the assembler and
frames Unicore / NovAtel '#' and '%' logs with their CRC-32; INSPVAXA
and INSPVAA (UM981) decode as one fused fix, checked against the
manual's example line and its printed CRC. The frame minimum no longer
rejects short sentences such as $GPHDT,h,T.
- The monitor keeps a slot per sentence type and counts members apart
from fixes and refusals; the status bar shows the learned family
("GGA+VTG+HPR"); the System Data card counts incomplete epochs; KSXT
and INSPVAX leave HDOP and age unreported.
- Docs/GPS_RECEIVERS.md: transport, bridge contract, families, card
rows, per-receiver setup.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The first real fixture: 10 s from Chris's T1-FD behind the AiO v26 passthrough (one sentence per datagram, 100 epochs, RTK float while the position reconverged after the output change, heading fixed), with two of a stranger's binary datagrams that the capture tool now logs. Replayed through the ingest path: the family is learned, every epoch gives one fix with the receiver's own values, nothing is incomplete, dropped or refused, and the same fixes come out whether the datagrams are replayed one per line, one per epoch, or cut every 37 bytes. NmeaCapture reads the capture format; fixtures under Fixtures/nmea are copied beside the test assembly. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Collaborator
Author
|
Bench-confirmed and now covered by a real fixture. The T1-FD behind the AiO passthrough, switched to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Phase 2 of
Plans/GPS_RECEIVER_SENTENCES_PLAN.md, on top of #298's ingest. Receivers that spread a fix over standard sentences now work, and the UM981's fused INS log does too.Epoch assembler (
Services/Gps/NmeaEpochAssembler)Takes
GGA/GNS,VTG,HPR,HDTandTHSand emits one fix per receiver epoch:GGA,GNS,HPR) belong to the epoch with that UTC; those without (VTG,HDT,THS) attach to the open one; a repeated kind starts a new epoch. Members printed before the position sentence belong to its epoch.GGA/GNSgive position, fix, satellites, HDOP and the correction age$KSXTlacks (GNSmode letters map to the GGA scale).VTGgives speed; its track is only used through fix-to-fix.HPR/HDT/THSfrom the receiver are the dual heading (HPRheading when fixed or float, its pitch as the roll only when fixed); the same sentences from an IMU talker (IN,HE) go to the IMU slot like$PANDA's. Roll goes through the AHRS calibration.Unicore logs
#(long header) and%(short header) logs are framed with their CRC-32;INSPVAXA/INSPVAAdecode as one fix: azimuth as the heading (no IMU fusion on the host), speed from the north and east velocities, INS roll and pitch, fix quality from the position type and none while the INS is inactive. Checked against the UM981 manual's example line and the CRC it prints.One finding on the way: the v26 firmware's INSPVAXA decoder reads the velocities one field early (it skips the undulation), so it computes speed from undulation and north velocity. Worth a fix there; the app follows the manual.
Also
$GPHDT,275.5,T.GGA+VTG+HPR); the System Data card counts incomplete epochs;INSPVAXleaves HDOP and age unreported like$KSXT.Docs/GPS_RECEIVERS.md: transport, the bridge contract, what each family yields, the card's rows, setup for the Bynav/UM982, the UM981 and an AiO.Tests
NmeaEpochAssemblerTests(18: warm-up lag, learning, emission on the last member, dropped member, speed not carried over, reconfigured smaller and larger, roll and heading quality rules, AHRS calibration, IMU talker, HDT/THS, GNS modes, UTC and repeat-kind boundaries, members before the position sentence, position-less epochs dropped, zero allocation),UnicoreLogTests(10: the manual's CRC and line, short header, INSPVAA, inactive INS, position types, calibration, unknown logs and bad frames, zero allocation), chunking determinism throughAutoSteerServicefor a three-sentence receiver. Services 1501 / ViewModels 308 / Models 167 pass; desktop builds.Bench: your T1-FD switched to
GPGGA 0.1+GPVTG 0.1+GPHPR 0.1should showGGA+VTG+HPRin the status bar after three epochs, with the age now populated; a UM981 printingINSPVAXA 0.1through the passthrough should showINSPVAX. Both still without captures, so the first real run is the test.🤖 Generated with Claude Code