added some missing message types - #70
Merged
Merged
Conversation
joe-saronic
commented
Jul 15, 2026
joe-saronic
commented
Jul 15, 2026
joe-saronic
commented
Jul 15, 2026
joe-saronic
force-pushed
the
more-messages
branch
from
July 15, 2026 23:43
87d8b1d to
bdc8d97
Compare
joe-saronic
force-pushed
the
more-messages
branch
3 times, most recently
from
July 16, 2026 06:35
99665c5 to
b2a05f9
Compare
There was a problem hiding this comment.
Pull request overview
This PR expands libsbf’s SBF parsing/writing coverage by adding several additional message/block types and by formalizing nested/sub-block handling so more block families can be round-tripped using binrw.
Changes:
- Added parsing support for additional message kinds (e.g.,
SatVisibility,ChannelStatus,BaseVectorGeod,DiskStatus,RxMessage,ReceiverTime,EndOfAtt,EndOfPVT,Comment,XPPSOffset). - Introduced
SubBlock/NestedBlockinfrastructure to correctly pad and round-trip nested and fixed-length sub-block arrays. - Converted many existing message structs from
BinRead-only to#[binrw]+ explicit#[bw(map=...)]so sentinel-basedOptionfields serialize back to SBF.
Reviewed changes
Copilot reviewed 33 out of 33 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| Cargo.toml | Bumps crate version to 0.16.0. |
| src/lib.rs | Adds SubBlock/NestedBlock infrastructure and registers new message kinds. |
| src/parser.rs | Adds parsing branches for newly supported message kinds (stream + datagram). |
| src/reader.rs | Minor doc/test cleanup. |
| src/mega_test.rs | Extends mega-file tests for new message kinds + roundtrip harness. |
| src/messages/mod.rs | Exposes new message modules and re-exports new types. |
| src/messages/att_cov_euler.rs | (Not changed in provided diff). |
| src/messages/aux_ant_positions.rs | Moves to #[binrw] and uses SubBlock for padded sub-block arrays. |
| src/messages/base_vector_cart.rs | Moves to #[binrw] and uses SubBlock for vector sub-block arrays. |
| src/messages/base_vector_geod.rs | New: BaseVectorGeod block support (LLA/ENU baseline). |
| src/messages/bds_ion.rs | (Not changed in provided diff). |
| src/messages/channel_status.rs | New: ChannelStatus with nested sub-block structure. |
| src/messages/comment.rs | New: Comment block. |
| src/messages/disk_status.rs | New: DiskStatus and DiskData sub-block. |
| src/messages/end_of_att.rs | New: EndOfAtt framing block. |
| src/messages/end_of_pvt.rs | New: EndOfPVT framing block. |
| src/messages/ext_event.rs | Moves to #[binrw] + #[bw(map=...)] for sentinel options. |
| src/messages/ext_event_ins_nav_cart.rs | Moves to #[binrw] + #[bw(map=...)] for sentinel options. |
| src/messages/ext_event_ins_nav_geod.rs | Moves to #[binrw] + #[bw(map=...)] for sentinel options. |
| src/messages/ext_sensor_meas.rs | Uses SubBlock for padded sub-block arrays + adds missing #[bw(map=...)]. |
| src/messages/ins_nav_cart.rs | Moves to #[binrw] + #[bw(map=...)] for sentinel options. |
| src/messages/ins_nav_geod.rs | Moves to #[binrw] + #[bw(map=...)] for sentinel options. |
| src/messages/meas_epoch.rs | Formalizes nested sub-block parsing/writing via NestedBlock. |
| src/messages/meas_extra.rs | Uses SubBlock for padded sub-block arrays and removes per-item align padding. |
| src/messages/nav_cart.rs | Moves to #[binrw] + #[bw(map=...)] for sentinel options. |
| src/messages/pos_cart.rs | Moves to #[binrw] + #[bw(map=...)] for sentinel options. |
| src/messages/pvt_cartesian.rs | Moves to #[binrw] + #[bw(map=...)] for sentinel options. |
| src/messages/pvt_geodetic.rs | Moves to #[binrw], adds Datum/PvtError write conversions, and sentinel #[bw(map=...)]. |
| src/messages/quality_ind.rs | Adds QualityIndicator -> u16 encoding and round-trip support. |
| src/messages/receiver_status.rs | Moves to #[binrw] and uses SubBlock for padded sub-block arrays. |
| src/messages/receiver_time.rs | New: ReceiverTime timing block. |
| src/messages/rf_status.rs | Moves to #[binrw] and uses SubBlock for padded sub-block arrays. |
| src/messages/rx_message.rs | New: RxMessage diagnostic block. |
| src/messages/sat_visibility.rs | New: SatVisibility and SatInfo sub-block. |
| src/messages/x_pps_offset.rs | New: XPPSOffset timing block. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
joe-saronic
force-pushed
the
more-messages
branch
3 times, most recently
from
July 16, 2026 09:50
0190ff6 to
3db2d2f
Compare
therishidesai
approved these changes
Jul 27, 2026
joe-saronic
force-pushed
the
more-messages
branch
from
July 27, 2026 16:09
3db2d2f to
8eea2c7
Compare
joe-saronic
force-pushed
the
more-messages
branch
from
July 27, 2026 16:24
8eea2c7 to
e0cdaf7
Compare
joe-saronic
force-pushed
the
more-messages
branch
from
July 27, 2026 16:27
e0cdaf7 to
e37e2c6
Compare
joe-saronic
force-pushed
the
more-messages
branch
from
July 27, 2026 16:32
e37e2c6 to
342122e
Compare
joe-saronic
force-pushed
the
more-messages
branch
from
July 27, 2026 16:38
342122e to
a5bd19c
Compare
joe-saronic
force-pushed
the
more-messages
branch
from
July 27, 2026 16:40
a5bd19c to
0dfab06
Compare
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.
Adds support for some message types I am messing with for possible state estimation use:
SatVisibility: predicted sat positionsChannelStatus: actual sats positionsBaseVectorGeod: same as *Cart, but in LLADiskStatus: random diagnosticRxMessage: random diagnosticXPPSOffset: timing insightsReceiverTime: timing insightsEndOfAtt: framingEndOfPVT: framingCommentOnly
XPPSOffsetis not found in the mega message dump: everything else is tested.This PR introduces some other small changes:
OutputLinkmuch more simply later). This also allows round-tripping nested arrays, which was not a thing beforebinrwinstead of justbr. This makes everything correctly round-trippable. Only types present in the mega dump are tested. This uses the same approach as chore: fix fuzzing #50 (which is why I felt free to add it here), with the addition of the relatively transparent nested block handling.