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

The EKF2_MAG_DECL parameter is not being saved in disarm #10023

Closed
priseborough opened this issue Jul 24, 2018 · 0 comments
Closed

The EKF2_MAG_DECL parameter is not being saved in disarm #10023

priseborough opened this issue Jul 24, 2018 · 0 comments
Assignees
Labels

Comments

@priseborough
Copy link
Contributor

priseborough commented Jul 24, 2018

Describe the bug

The option to save the initial declination loaded from the geo library to the EKF2_MAG_DECL parameter on disarm so that it can be loaded as the startup default for the next power cycle is supposed to be controlled via setting of the EKF2_DECL_TYPE parameter. However inspection of the code shows that this capability is now missing from ekf2_main.cpp

It is supposed to save the value obtained from the copy_mag_decl_deg(float *val) accessor function to the EKF2_MAG_DECL parameter if bit position 1 in EKF2_DECL_TYPE is set to true.

Additionally the comment and function name on that accessor function is misleading. It should read

// Get the value of magnetic declination in degrees to be saved for use at the next startup
// At the next startup, set param.mag_declination_deg to the value saved
void get_mag_decl_deg(float *val)

A separate PR will be raised against the ecl library to fix that.

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

No branches or pull requests

1 participant