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

Enhancement: More calibration related parameters are preserved when o… #14486

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

limhyon
Copy link
Contributor

@limhyon limhyon commented Mar 26, 2020

Describe problem solved by this pull request
Current rcS script invalidated magnetometer calibration data when SYS_AUTOCONFIG sets to 1 with AUTOSTART number given.

Describe your solution
More calibration related parameters are preserved when only autoconfig reset happened. Current setup makes magnetometer and offset data invalidated.

…nly autoconfig reset happened. Current setup makes magnetometer and offset data invalidated.
@dagar
Copy link
Member

dagar commented Mar 27, 2020

I was opposed to some of this in the past, but I think it's worth reconsidering. We have preflight checks for the estimator and sensor consistency checks. If there's an issue it's quite likely the user is going to re-calibrate at that point.

If anything I've noticed that unnecessarily resetting calibrations leads to users redoing the calibration quickly and poorly.

Does anyone else have an opinion here? @bresch @bkueng @jlecoeur

@bresch
Copy link
Member

bresch commented Mar 27, 2020

Personally, I think that only the autopilot-related parameter should be preserved, so not the bias of the external mag and not the EKF biases.
I know that it is annoying when the user knows that nothing changed and doesn't want to redo the mag calibration, but I think we should add a new SYS_AUTOCONFIG mode that preserve all the calibrations instead of adding more and more to the "reset parameters"

@jlecoeur
Copy link
Contributor

I am generally in favor of this. See #13276.
However I think that the current default makes sense: different airframe means different magnetic bias.

We may discriminate a software airframe change (no calib needed) from a hardware airframe change (calib needed).

Ideally, the user would be prompted just after selecting a new airframe:
"New airframe config selected. Has the autopilot been physically moved on the airframe or mounted on a new airframe?
[.] Yes. Perform magnetometer calibration at next startup.
[.] No.
"
Internally we can map this to SYS_AUTOCONFIG=1 for hardware airframe change (current behaviour) and SYS_AUTOCONFIG=2 for software-only airframe change.

@dagar
Copy link
Member

dagar commented Mar 27, 2020

I think we should add a new SYS_AUTOCONFIG mode that preserve all the calibrations instead of adding more and more to the "reset parameters"

Actually, one of the cases is SYS_AUTOSTART not changing (re-clicking the same airframe in QGC). It would be safe to preserve mag cal in that case.

@bresch that could work longer term, but I think in most cases it's really the QGC side driving this.

@hyonlim could you go through your particular usage? Would the special case around an unchanged SYS_AUTOSTART help?

@limhyon
Copy link
Contributor Author

limhyon commented Apr 3, 2020

If there is special case for SYS_AUTOSTART, that would help.
When airframe parameter is updated by software, the calibration is invalidated.
I think @jlecoeur 's statement is good.

@TSC21 TSC21 requested a review from dagar April 4, 2020 08:08
@stale stale bot added the stale label Jul 3, 2020
@PX4 PX4 deleted a comment from stale bot Sep 6, 2020
@stale stale bot removed the stale label Sep 6, 2020
@stale
Copy link

stale bot commented Dec 25, 2020

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

@stale stale bot added the stale label Dec 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants