ok here is my video showing how I got AIRMODE working. thanks to @Leonardthall and everyone else that helped me figure this out. you guys rock and I will definitely be back with more questions as I dive deeper into this wonderful autonomous flight software.
Itās a pull request - nothing goes in without review
ah ok. I may do that then. maybe make it easier for the next guy trying to figure this out
It would be great if you can update the wiki. Iāve done it a couple times. Just copied the code and style from a working section, and edit the body of the text for what I was adding.
What is the potential consequence of increasing the mix_man parameter so much? The copter might fall if it canāt maintain its heading? I read something about possibly run away, but donāt quite understand why in manual modes. Is there a potential situation where if I lower the throttle completely, it might still keep trying to climb?
some good questions. I believe ATC_THR_MIX_MAN applies only to manual flying modes so I donāt see how it could cause the quad to loose its heading or fall. it seems like it prioritizes elevation over attitude by default to make landing easier, I know that air mode on other flight control software causes issues where the quad will bounce around erratically if you land on a hard surface while air mode is active. there may be other issues with raising it that high but I donāt know what those are.
Ok, so when using arming on a switch, airmode was active?
Sorry I have not use the switch arming but I have been meaning to reevaluate my arming procedures.
To explain what this does:
When you pull the throttle all the way to minimum, throttle wants all motors to go to minimum. Zero throttle, zero motors, zero thrust. But also zero roll, pitch and yaw.
If we want to control the aircraft in roll, pitch, and yaw while you have the throttle at zero we must give permission to the motor mixers to prioritise roll, pitch, and yaw over the throttle. We do this with ATC_THR_MIX_MAN. If we set it to 1 the aircraft can increase the thrust to hover thrust momentarily to control the other axis. If we set it to 2 we can use up to twice hover throttle to control the other axis.
So why do we set it to 0.1. This make it easy to land and prevents bounce caused by the aircraft aggressively pushing the first contact point back as it touches down. Instead the low throttle takes the athority away from roll and pitch letting the aircraft settle flat on the ground.
SAFETY FACTOR: This should always be set low during tuning. If an axis starts to oscillate on an aircraft with a low hover throttle and high ATC_THR_MIX_MAN, it can increase the thrust value above hover throttle and cause the aircraft to climb uncontrollably. During tuning you should make sure that hover throttle is set correctly or conservative low and ATC_THR_MIX_MAN = 0.1.
as long as ATC_THR_MIX_MAN value was set high .5-.9 then that would keep my quad somewhat stable even while throttle was down regardless of arming via a switch or arming with the throttle down yaw right command or using motor interlock
Thank you this thread has been A breath of fresh air,may be we need to have the ATC_THR_MIX_MAN on a switch then could use it like switching air mode on and off
No, this is not the case.
Depending on your method of arming changes the behaviour of the aircraft at minimum throttle.
For example, the default arming with the yaw stick and throttle at zero does not stabilize the aircraft at zero throttle. As soon as your throttle goes into the dead band the motors drop to spin when armed and not stabilisation is done.
When the MOTOR INTERLOCK (32 option) is used the aircraft is stabilising at all times when the motors are running.
ATC_THR_MIX_MAN only changes how much power you give roll, pitch and yaw to stabilise when you are asking for low throttle. (zero throttle in Air Mode like arming)
so
arming with switch + ATC_THR_MIX_MAN value > .1 = AIRMODE
default arming + MOTOR INTERLOCK + ATC_THR_MIX_MAN value > .1 = AIRMODE
default arming + ATC_THR_MIX_MAN value of .1 = NO AIRMODE
default arming + ATC_THR_MIX_MAN value > .1 = NO AIRMODE
is that correct?
Yes and
Anything with ATC_THR_MIX_MAN = 0.0 will feel like you donāt have airmode.
To get tight control in airmode you need to have ATC_THR_MIX_MAN set closer to 1.
The trade off with ATC_THR_MIX_MAN is:
Higher value:
- More control bandwidth for roll, pitch yaw
- Tighter response to aggressive control input
Lower value:
- Danger of uncontrolled climb during pid instability
- Bouncing on touch down
- Difficulty landing on uneven surfaces
- Aggressive control inputs can cause pulses in thrust
Based on the discussion I did this:
beautiful! thank you!
Did a brief flight with this. Works as advertised, which is great.
does this mean itās in the current beta now?
newer flown a beta so far but looking forward to do so
Itās just a PR at the moment
ok, but as Iām not familiar with firmware and commits - how could I get to know when this feature would be available?
btw is it a good idea to use a 3 pos switch to arm in the middle and airmode at the end?
So if you donāt want to build it yourself you would need to wait for the PR to get merged and then pick up one of the nightly builds. Of course the PR may never get merged - but Iām reasonably confident it will be accepted. When - no idea.
Not sure how you would use a 3-pos switch. The way this is implemented it requires its own channel.
ok, understand
but if itās not possible to mix it in AP why not setup a 3-pos switch going to 2 channels? Then each funktion would need itās own trigger point, eg. 1500 to arm and 1800 for airmode. Just a idea because I have more channels available than switches
that look good and well done for sticking with it