-
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: mag control cleanup mag reset #21305
Conversation
94a11bf
to
d37a927
Compare
not sure about the first one will have to look through the log once more but for |
@Sidzeppelin95 I don't think I'm following what you're saying, but can you please open a new dedicated issue and add more detail? |
d37a927
to
5276a72
Compare
7054ed4
to
7d4defb
Compare
acb6e3d
to
aefcdf8
Compare
Squashed, rebased and f-puched |
@bresch we need to take a closer look (large change indication diff). |
I had a look at the diffs in the change indicator; they are related to the earth field states and with the prints I found what's happening:
In summary, the earth field state is different in the replay because the measured field doesn't match the WMM (or the GNSS coordinates are incorrect). |
|
||
resetMagCov(); | ||
// mag_I: reset to WMM | ||
_state.mag_I = mag_earth_pred; |
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.
If you change this line by
_state.mag_I = _R_to_earth * mag;
the whole change indicator diff disappears. So I'm pretty sure it's all good.
There is some actual changes because the earth mag field states are now reset using the WMM when available. In the replay log, the measured mag field does not match the WMM and this is why there is a large diff. It is however more correct now than before.
8ad9069
to
906fc0b
Compare
Added unit test for mag earth field reset to WMM. Will add an additional check on the inclination in a next PR. |
current/old
PR
This was broken out of #21212 (somewhat).