Commit Graph
7 Commits
Author SHA1 Message Date
Andrew Tridgell 02948c05b4 AP_GSOF: fix GPS week field decoding
The GSOF position-time record encodes GPS week as a 16-bit big-endian value. Reading 32 bits folded the following satellite-count and flag bytes into the reported week. Guard optional logging so a packet-level regression test can exercise the parser without a logger singleton.
2026-09-05 06:26:33 +10:00
aashrithbandaru c6b614f6ff AP_GSOF: add unit tests for VEL record velocity_flags parsing
Adds two gtest cases to test_gsof.cpp that catch the class of regression
described in issue #32457, where a change could accidentally drop the
assignment of vel.velocity_flags from the raw packet byte.

vel_flags_parsed: feeds a hand-crafted DCOL/GSOF packet containing a VEL
(type 8) record with flags=0x05 (VELOCITY_VALID|HEADING_VALID) and known
float values, then asserts velocity_flags, horizontal_velocity, heading, and
vertical_velocity are all parsed correctly.

vel_flags_not_valid: same packet with flags=0x00, pre-loads sentinel values
into the velocity fields, and asserts they are NOT overwritten when the
VELOCITY_VALID bit is absent.
2026-04-16 10:52:56 +10:00
Ryan Friedman a586dfa4e6 AP_GSOF: Add GSOF packets for PX-1 EAHRS 2026-03-19 09:57:16 +11:00
Ryan Friedman 20c77ae762 AP_GSOF: refactor GSOF to expect packets by ID
Signed-off-by: Ryan Friedman <25047695+Ryanf55@users.noreply.github.com>
2025-01-08 08:52:21 +11:00
Ryan Friedman d859e9aa55 AP_GSOF: Disable packet1 test for now
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2024-08-20 14:50:05 +10:00
Ryan Friedman 724e61fa70 Tools: factor out common library for GSOF
* Add tests too

Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2024-08-20 14:50:05 +10:00
Ryan Friedman 921ef6cd36 AP_GSOF: factor out common library for GSOF
* Add tests too

Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2024-08-20 14:50:05 +10:00