Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Added estimation of compass scale factor #12899
This adds new COMPASS_SCALE, COMPASS_SCALE2 and COMPASS_SCALE3 parameters, which give the sensor scaling factor. It is used to compensate for an incorrect scaling in a compass.
This needs as a minimum an opt in that makes requiring having a position a hard prerequisite for passing the calibration, and for actually arming the vehicle. From a commercial use case users need to be only using the vehicle with a single code path for how their compass calibrations are managed.
I did a test of this branch vs master on my ancient IRIS and found that it came up with these values:
Overall the magfield strength was larger for both compasses but also a bit more consistent with each other.
compass1 before: 429 after: 459
Nose Down (biggest change I could find in mag field length)
compass1 before: 452 after: 490
So I think this is an improvement
Here are some mag field lengths for a couple of orientations
I found the length reported for each compass had increased.
this adds new COMPASS_SCALE, COMPASS_SCALE2 and COMPASS_SCALE3 parameters, which give the sensor scaling factor. It is used to compensate for an incorrect scaling in a compass. The 3D compass calibration process will set the correct value automatically, otherwise users can set the value to a known value for an existing compass