Skip to content
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

Merged
merged 1 commit into from
Sep 3, 2019

Conversation

bresch
Copy link
Member

@bresch bresch commented Sep 2, 2019

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).
2019-09-02_13-41-05_01_plot

@jkflying This should also fix the glitches you see on the Eiger

position/velocity aiding sensor.
Until now, it was alway resetting if the vehicle does not have gps or
external vision. This caused a reset/glitch at every stop (when range data gets
valid)
@bresch
Copy link
Member Author

bresch commented Sep 2, 2019

A flight with that fix:
2019-09-02_17-39-27_01_plot

@jkflying
Copy link
Contributor

jkflying commented Sep 2, 2019

This is awesome! We've seen those twitches for a while but never tracked it down. Didn't think to look for resets!

Copy link
Member

@MaEtUgR MaEtUgR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Was probably in there for a long time... The tests show success 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants