-
Notifications
You must be signed in to change notification settings - Fork 17.6k
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
EKF3: allow earth-frame fields to be estimated with an origin but no GPS #25666
Conversation
4c08398
to
b1d3986
Compare
Hi, if the issue is the earth magnetic field (aka WMM) is not being estimated then the EKF also shouldn't be trying to use the WWM to reject the compass, instead it should accept it I think. As a side note, it's naughty that the EKF is using the GPS status at all when estimating the WWM. This presumably means the same problem could happen when using a non-GPS navigation source while also using a compass which is very possible (e.g. Beacons). |
@rmackay9 You can view all the latest version logs to see if this is sometimes very large, and normally it should not exceed 0.3 |
As discussed on the dev call we should investigate why the EKF3 is unable to fuse the compass when it doesn't have a position estimate. It really should be able to although it won't be as accurate. |
b1d3986
to
55f3dd7
Compare
f0b04d2
to
19a9ac5
Compare
049a447
to
6418137
Compare
6418137
to
bdb281f
Compare
if (!stateStruct.quat.is_zero()) { | ||
alignMagStateDeclination(); | ||
const auto &compass = dal.compass(); | ||
if (compass.have_scale_factor(magSelectIndex) && |
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.
could be a common function with the code in readGpsData()
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.
maybe setEarthFieldFromLocation()
We discussed on the July 2nd dev call and decided that we should move the shared code to a new function and then call it from within setOrigin and readGPSData. |
bdb281f
to
15484e0
Compare
This is my attempt at fixing #18229
Here's a log using it:
00000228.zip
I am using a script to set the origin so we can use the earth field database.
I can see that XKF2 fields are all populated for magnetic field in body frame and earth frame.
I am not sure of what else to look at, though. magnetic field innovations seem bad, but at least they exist?