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

Remove vestiges of LearnType::LEARN_INTERNAL #29150

Merged
merged 5 commits into from
Jan 28, 2025

Conversation

peterbarker
Copy link
Contributor

57a3bc1 changed the code from "internal" to "in-flight

It seems the old value of "1" was no longer valid

It also changed things so that the learning system saved the offsets.

We have two sorts of compass learning:

  • in-flight compass learning, type=3
  • copy-values-from-EKF, type=2

Copy-values-from-EKF sets-and-saves offsets on a per-vehicle basis at the moment, eg. https://github.com/ardupilot/ardupilot/blob/master/ArduCopter/AP_Arming.cpp#L814 so it doesn't want or need this code.

The in-flight learning system sets-and-saves the offsets via a called to fixed-mag-cal-yaw code here: https://github.com/ardupilot/ardupilot/blob/master/libraries/AP_Compass/Compass_learn.cpp#L65 (https://github.com/ardupilot/ardupilot/master/libraries/AP_Compass/AP_Compass_Calibration.cpp#L566)

This does seem to have been some sort of back-door for saving compass offsets on Rover, Plane and Tracker, bypassing "forcecal" requirements.

57a3bc1 changed the code from "internal" to "in-flight

It seems the old value of "1" was no longer valid

It also changed things to that the learning system saved the offsets.
57a3bc1 changed the code from "internal" to "in-flight

It seems the old value of "1" was no longer valid

It also changed things to that the learning system saved the offsets.
57a3bc1 changed the code from "internal" to "in-flight

It seems the old value of "1" was no longer valid

It also changed things to that the learning system saved the offsets.
57a3bc1 changed the code from "internal" to "in-flight

It seems the old value of "1" was no longer valid

It also changed things to that the learning system saved the offsets.
@peterbarker peterbarker force-pushed the pr/compass-remove-vestiges branch from a31a54b to 05d0953 Compare January 27, 2025 11:01
@rmackay9
Copy link
Contributor

I'm personally happy with this. Looking at our advanced compass setup wiki page it says the following which is still correct after this change

Setting COMPASS_LEARN to 1 or 2 is not recommended. These modes are deprecated and are either non-functional, or still in development.

@peterbarker
Copy link
Contributor Author

I'm personally happy with this. Looking at our advanced compass setup wiki page it says the following which is still correct after this change

Setting COMPASS_LEARN to 1 or 2 is not recommended. These modes are deprecated and are either non-functional, or still in development.

Any idea what the "copy offsets from EKF" code's status is? Still in dev or is it deprecated?

@tridge tridge merged commit a405c67 into ArduPilot:master Jan 28, 2025
100 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants