Switch arming & AirMode [long discussion]

If you follow the Facebook group you may have seen some of this discussion already, but I’m hoping that by collating the findings of that thread into a properly structured forum post we might promote a more critical conversation.

Please note that I do not want this to sound like a brash ‘Betaflight does this, why can’t Ardupilot?!’ complaint. Instead my aim is to logically reason through some features which have been very widely adopted & tested within the Betaflight community over the course of many years, but which are seemingly quite rarely used & in a more nascent stage of development & testing in the Ardupilot scene, to highlight where the Ardupilot implementation is slightly confusing (to somebody who has used both platforms for ~5 years).

Background
I have been building & flying racing quads with Betaflight since 2016 & larger copters/planes with Ardupilot since 2017.

Betaflight uses switch arming & this is widely acknowledged as an important safety feature, both for the safety of the pilot/observer(s) & the safety of their equipment. Being able to reliably & near instantly cut power to the motors, especially in the event of a crash or failed landing, is critical.

When I first started working commercially with DJI drones in 2016, stick arming was something I really didn’t like. Back then the Phantom 3 was slightly notorious for how its top-heavy nature combined with the relatively small footprint of its landing gear could lead it to topple/flip when attempting to land on even just slightly uneven ground or in slightly windy conditions. When this happened, there was nothing the pilot could do but frantically hold the stick disarm command while watching the motors trying to dig the propellers into the ground (often breaking them).

Incident
A few days ago I unfortunately experienced a similar incident with Arducopter on my latest Y6 build. I gently landed the copter & began holding down throttle/left rudder. I now know that landing detection failed & this stick input was interpreted as a flight input rather than as the disarm command. The copter throttled up & took off with the throttle still held fully down, then rapidly yawed to the left before the down throttle took over & the copter hit the ground & bounced upside down. All I could do was continue holding down & left, hoping that landing/crash detection would now kick in & the copter would disarm.

Solution
When beginning to troubleshoot this incident, I discovered that Ardupilot does in fact support switch arming, via RCx_OPTION = 41.

Now at this point I will mention that I am well aware that the ‘correct’ way to respond to this incident in the opinion of the wider Ardupilot community would be to investigate & fix whatever caused landing detection to fail in the first place. However, even if this incident hadn’t happened, knowing as I do now that switch arming is an option, I would still want to move to using switch arming instead of stick arming. Switch arming is the method that I am personally more comfortable with & confident in, while overloading multiple commands onto a single physical control, as is the case with stick arming, is something I have never liked.

If you want to contribute to the conversation about the cause of the failed landing & how to address it, please do so in this earlier thread, leaving this new thread specifically for the topic of switch arming & AirMode.

New Problem
I now have switch arming enabled, along with stick arming disabled via ARMING_RUDDER = 0. However I am now encountering another problem which is related to AirMode. I am very well accustomed to AirMode from flying Betaflight & in fact I keep AirMode permanently enabled on all of my Betaflight quads - it is a huge quality of life improvement for FPV acro flying.

However Ardupilot’s approach to AirMode is causing me problems on two counts -

  1. Airmode raises the motors idle throttle from MOT_SPIN_ARM to MOT_SPIN_MIN

  2. Switch arming automatically enables AirMode in Acro & Stabilize modes, with no option to disable it

The purpose of AirMode is to allow the pilot to completely cut the throttle, to the point that the motors do not produce any effective thrust (eg MOT_SPIN_ARM), but while still allowing the flight controller to spin up the motors as & when required to perform attitude adjustments (whether to maintain attitude instead of tumbling, or in response to pilot commands).

Thus the fact that AirMode raises the motors idle throttle to MOT_SPIN_MIN, which by definition is the “point at which the thrust starts”, seems rather curious to me. Is this simply a workaround to prevent unintentional mid-air disarms when stick arming is still enabled & the throttle is held low for extended periods, potentially while also giving left rudder inputs? Or is it perhaps just a workaround to keep stabilization active, which would normally be inactive at MOT_SPIN_ARM?

Regardless of the design decision, the unfortunate outcome is that switch arming a copter in Stablize results in it idling on the ground with the motors spinning overly fast, at “the point at which thrust starts” rather than at the ‘true’ idle speed.

I have been unable to find any way to disable AirMode in this situation. The wiki says that RCx_OPTION = 84 can be used to directly enable/disable AirMode in Acro & Stabilize modes, even though devoting an entire RC channel to this purpose would be quite unfortunate. The wiki doesn’t confirm whether this option actually overrides the automatic enabling of AirMode by switch arming & I have been unable to test it as my Y6B running stable Copter 4.0.7 on an Orange Cube does not have 84 in the list of supported options. If I set a switch to 84 anyway, the flight controller unsurprisingly responds with an invalid option error.

tl;dr

  1. Why does AirMode raise the motors idle speed from MOT_SPIN_ARM to MOT_SPIN_MIN? This seems counterproductive with regards to the ultimate goal of AirMode & leads to overly high idling behaviour on the ground.

  2. Why is it not possible to prevent switch arming from automatically enabling AirMode, or to have a global parameter to enable/disable it?

I don’t quite understand why you’re expecting MOT_SPIN_ARM to be the lower value.
As I know the primary goal of AirMode is to always maintain vehicle attitude. So how it will be possible with MOT_SPIN_ARM throttle value? It is allowed for MOT_SPIN_ARM to be zero.

MOT_SPIN_MIN, which by definition is the “point at which the thrust starts”

This could mean not “when vehicle start lifts off” but “props are able to change/maintain desired pitch and roll”

So why can’t you just decrease your MOT_SPIN_MIN?

The problem with reducing MOT_SPIN_MIN is that this goes against how the documentation tells you to set up your motors & it ignores the actual problem - that AirMode cannot be disabled when using switch arming.

I should be able to enable switch arming without being forced to use AirMode, or being forced to go against the documentation for setting up MOT_SPIN_MIN.

Ideally, the idle throttle in AirMode should be MOT_SPIN_MIN, so that the motors continue spinning but the extra 3% of MOT_SPIN_ARM does not contribute to the copter’s altitude (however small this contribution may be). AirMode keeps the stabilization routine active, allowing the flight controller to change motor speeds as & when required to maintain attitude. However this does not require the motors to always spin at a faster rate.

I suppose much of this is just semantic confusion with Ardupilot using two different ‘idle’ values when something like Betaflight uses just one. If this Y6 build was running Betaflight, it’s one & only idle value would be 4%. If I then enabled AirMode, the idle value would still be 4%. On the ground, it would idle at 4%. In the air with the throttle at zero, it would idle at 4%, until the flight controller actually needed more speed from a motor in order to maintain attitude, then it would increase it above 4%. But when more speed wasn’t needed, the motor would drop back down to 4%, it wouldn’t stay at a higher 7% just because AirMode was active.

Airmode as an option is only in 4.1. There is also ACRO_OPTIONS that allows you to permanently associate air mode with acro (hence not using a switch) again only in 4.1. As to whether you can disable it when doing arming on a switch - I don’t know. I agree it should be possible, maybe raise an issue for this - I implemented the option because I wanted to use air mode with stick arming, not the other way round.

1 Like

Ah, well this would explain why I was unable to try RCx_OPTION = 84 & why I don’t have ACRO_OPTIONS in my full parameter list.

You see now this is the reasonable & to the point sort of response that I was expecting, rather than a dozen people all telling me to ignore the root cause of the issue by changing something else.

Edit: https://github.com/ArduPilot/ardupilot/issues/17836

你可以单独使用一个遥控器上的拨档开关来启用或者关闭 airmodel 功能,这个方式和你目前使用拨档开关解锁不冲突,并且可以关闭airmodel 功能 ,你可以试试,逻辑上是可以的。
You can use a gear switch on the remote control to enable or disable the airmodel function alone. This method does not conflict with your current use of the gear switch to unlock, and you can turn off the airmodel function. You can try it, and it is logically possible.

Yes, this is true - however it would require an additional switch/RC channel just to disable something which should not have been enabled to begin with.