Airspeed offset calibration by switch

It has always annoyed me that you had to have a ground control station with you to repeat
the preflight airspeed offset calibration if you forgot to cover the pitot tube or if it is a sensor that delivers significantly different zero point values after a few minutes of warm-up time.
Without GCS the option is to reboot by disconnecting and reconnecting the battery.

Since this commit from @tridge a few days ago, it is possible to trigger MAVLINK commands with a simple LUA command gcs:run_command_int(command, params).

My small script does nothing more than trigger the command MAV_CMD_PREFLIGHT_CALIBRATION (241) with parameter p3=1 (means ground pressure calibration) by a switch (assigned to script via RCx_OPTION 300).

If an airspeed sensor is connected, an offset calibration is performed.

Arduplane 4.6.0 dev is currently still required. Given the power of the possibilities of using Mavlink-commands, I hope that this feature will soon find its way into beta and stable versions.

PreflCal.lua (979 Bytes)