-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EKF2: reset position by fusion #23279
base: main
Are you sure you want to change the base?
Conversation
Could you do this depending on the context (state of the filter, provided accuracy, etc) and then either use it as a correction if you can (with an appropriate gate), otherwise fallback to a hard position reset? |
8318382
to
c9197b2
Compare
c9197b2
to
1f8c15d
Compare
8e1a104
to
c6634c6
Compare
fd4e113
to
c5290d1
Compare
f383042
to
6c6660d
Compare
I added two things:
|
} else { | ||
_time_last_horizontal_aiding = _time_delayed_us; | ||
if (_time_delayed_us > _params.no_aid_timeout_max) { | ||
_time_last_horizontal_aiding = _time_delayed_us - _params.no_aid_timeout_max; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you find this was still necessary? I didn't think it was because isTimedOut() is handling when it's zero and now checking the elapsed time without subtraction.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Define necessary ;)
If we want that valid_timeout_max defines the maximum time where we're using inertial dead reckoning then yes. Because after the last measurement, the system is already dead reckoning with IMU data, but we only label it as such after no_aid_timeout_max, which is correct.
The question is:
Where does one define the starting point of the inertial dead reckoning? After the last sensor-measurement or after the last sensor timed out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, we could probably change it to use the actual timestamps (but it hardly matters).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs testing, but otherwise looks good to go from my perspective.
Solved Problem
When the external position reset gets triggered we can now fuse the new position as a "normal" measurement. Therefore the position error (estimate-position on map) gets included in the other states and mainly the wind can be better estimated. For large jumps we still reset the position to ensure we dont induce a really strong wind estimate.
Also adjusted the "set global origin" possibility before takeoff during GNSS denied conditions.
Alternatives
We could also, reset the position and fuse the "measurement" with a high variance. The estimated position would then perfectly align with the sent measurement position but the effects on the other states would not be as harsh for large position jumps (previous estimate / sent measurement).