inav icon indicating copy to clipboard operation
inav copied to clipboard

Enable Compass calibration via Inav programming/flight mode

Open sdellava opened this issue 1 year ago • 1 comments

Current Behavior

Compass calibration can be done only using the configurator or via OSD Stick Menù.

Desired Behavior

Enable to call the calibration via dedicated programming function or flight mode.

Suggested Solution

Compass calibration under certain conditions can produce random results. This can happen when the drone is close to large metal masses. In a previous feature request, I asked for the compass calibration procedure to be carried out during flight, so that we are certainly far away from metal masses and can calibrate the compass considering the weak magnetic fields generated by the drone's electronics. However, there was no activity and I think this stems from the fact that it is difficult to define a valid procedure for any type of drone, aircraft, etc.

However, the solution is very simple: allow any pilot to activate the compass calibration procedure with a fligth mode or a programming task.

The procedure is exactly the same as that performed manually on the ground with the drone unarmed, so nothing new needs to be developed. Devs only need to create a task or fight mode to be associated with an AUX. This allows to activate the calibration procedure, simulating the pressing of the "compass calibration" button on the configurator.

Obviously, to achieve a good calibration, the pilot will have to fly the aircraft by performing looping and tonneau in all axes. Each pilot will decide how to perform this manoeuvre in the allotted time, choosing an appropriate altitude.

So, INAV fw is not responsible of the calibration procedure and to keep the drone safe in the air.

This solution should be simple to implement and leave the pilots free to decide whether to use it or not.

Who does this impact? Who is this for?

All Inav pilots that use compass (RTH and Navigation)

sdellava avatar Oct 23 '23 14:10 sdellava

added a PR: https://github.com/iNavFlight/inav/pull/9411

sdellava avatar Oct 25 '23 17:10 sdellava

Nice one, closing as merged

b14ckyy avatar Mar 22 '24 10:03 b14ckyy