This repository has been archived by the owner on May 1, 2024. It is now read-only.
Flow aiding - Reset state when flow is enabled only if it is the only position/velocity aiding sensor #637
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.
I'm currently working on a drone with an optical flow sensor and is has a nasty attitude glitch at each stop. After analyzing the log, I found out that the vxy and xy reset counters are incremented every time the drone stops. The reset occurs at each stop because it goes in and out of flow aiding and that the condition for a reset is always true "if the vehicle doesn't have GPS or external vision aiding" (my vehicle has GPS but no EV); the correct check should be "if it doesn't have gps and doesn't have external vision aiding" or -as I implemented it here- "if flow is the only velocity/position aiding source".
Below a log showing that the reset counter is incremented every time the height source switches from baro (during motion) to range aid (after a stop).
@jkflying This should also fix the glitches you see on the Eiger