-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
Allow to keep mag calibration after airframe change #13276
Conversation
The magnetometer calibration is erased when the airframe config is updated. This is based on the assumption that a different airframes have different magnetic influence. This commit adds the parameter CBRK_KEEP_CALMAG to preserve the magnetometer calibration on airframe change. Use it if you do not change the physical airframe (only the software airframe config), and do not want to recalibrate.
I'm wondering about resetting the rotation of external sensors regardless. |
I am not sure to understand, do you want to exclude all CAL_* sensors ? |
Possibly if we were confident in the preflight checks (not yet). It's more of a development scenario, but at the moment I wouldn't be surprised if the current behavior often results in worse results overall. People get frustrated (and/or lazy) and recalibrate indoors with usb connected just to get through it. |
if param compare CBRK_KEEP_MAGCAL 382716 | ||
then | ||
# Wipe out params except RC*, flight modes, total flight time, next flight UUID, accel cal, gyro cal, AND mag cal | ||
param reset_nostart RC* COM_FLTMODE* LND_FLIGHT_T_* TC_* COM_FLIGHT_UUID CAL_ACC* CAL_GYRO* CAL_MAG* |
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.
I'm wondering if CAL_MAGx_ROT should still be reset.
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.
Hum, this circuit breaker is to avoid any sensor config when you know that nothing but software airframe will change.
For this reason, I think it is best not to reset external mag rotation when the circuit breaker is set.
On the contrary, in the normal case, external mags are probably mounted differently on the new airframe, so it is safer to reset CAL_MAGx_ROT.
Does that make sense?
Exactly, it is more for developers use. I have faced the problem in two scenarios:
|
This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions. |
This solves a minor annoyance I encountered when switching between airframe configs.
The magnetometer calibration is erased when the airframe config is updated. This is based on the assumption that a different airframes have different magnetic influence.
This commit adds the parameter CBRK_KEEP_MAGCAL to preserve the magnetometer calibration on airframe change.
Use it if you do not change the physical airframe (only the software airframe config), and do not want to recalibrate.
Describe possible alternatives
The alternative is to always keep the magnetometer calibration, but I think the current default makes sense.