Repository navigation
Conversation
4.1 to 4.6 logged RRNH's ground clearance and maximum distance as int16 centimetres and RRNI's distance as a uint16 in centimetres. 4.7 made them floats in metres, and Replay copies the log's bytes into the current structures, so an older log's sensor count is garbage and the EKF sees no range finder: on a 4.6 flow log the replayed cores read no range all flight while the vehicle's own fused 0.4 to 1.4 m. Read the old layout by field and convert. The replayed range and height then follow the vehicle's to within a centimetre or two in flight.
This was referenced Nov 20, 2026
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.
Summary
If you replay a log recorded on 4.1 to 4.6 through 4.7 or master, the EKF sees no range finder. The replayed cores read no range all flight while the vehicle's own fused it, so a replay of any flow or range finder vehicle from before 4.7 is not the flight it claims to be, and nothing warns that it is not.
c681bb4 made RRNH's ground clearance and maximum distance, and RRNI's distance, floats in metres where they had been integer centimetres. Replay copies the log's bytes into the current structures, so an older log's sensor count is garbage. This reads those two records by field when the log carries the old format, and converts.
Classification & Testing (check all that apply and add your own)
A 4.6 optical flow log replayed through master: before, the replayed core's XKF5.rng is 0 throughout; after, it follows the vehicle's in flight (0.83 m against 0.83 m, height 0.81 m against 0.79 m). Across 423 flight logs, 175 carry the old format; 84 of those now replay their range finder, and the other 89 have none. Logs recorded on 4.7 are unchanged.
Description
The DAL's first range finder layout, "hhH" with a sensor bitmask, lasted 20 days on master in November 2020 and never shipped, so only the 4.1 to 4.6 layout is handled. No other replay record changed layout between 4.6 and 4.7; the records 4.7 added are simply absent from older logs.