mirror of
https://github.com/ArduPilot/ardupilot.git
synced 2026-10-11 20:59:22 +08:00
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.
GSOF Tests
A UDP packet of binary GSOF data is attached in the gsof_data file.