-
Notifications
You must be signed in to change notification settings - Fork 13.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
ekf2: Reinstate saving of mag declination for use next start #10024
Conversation
This capability was removed unintentionally by previous changes. Requires ecl version with updated declination accessor function
Any idea when (or why) this disappeared? |
You can actually still use _params.mag_declination_deg directly. All you need to do is decide when to commit the parameter ekf2 side. The internal value of _mag_declination_deg is a reference to _params.mag_declination_deg. |
No idea when or why the functionality was lost. I don't understand your second comment about using _params.mag_declination_deg directly. |
It's not critical, but you wouldn't have to actually copy the declination back to ekf2_main, and ecl/EKF side you wouldn't need _mag_declination_to_save_deg. In ekf2_main |
We should also set EKF2_MAG_DECL volatile (parameters automatically changed vehicle side). |
So you are saying we should modify ecl to write the value retrieved from the geo library directly to the parameter value rather than provide it via an accessor function? I will give you a call to clarify the use of the volatile attribute. |
Let's merge as-is and follow up to this PR if needed. |
@priseborough ECL updated. |
Fixes #10023
The capability and parameter selected default behaviour to save the magnetic declination for the last location had been removed unintentionally by previous changes. This PR reinstates the behaviour.
Requires PX4/PX4-ECL#486 to be merged first.
Reported here
Test data / coverage