I just pushed Arducopter 2.2 to the Mission planner. This version went through extensive testing by a brave group of flyers and with both HIL and SIL testing.
See this link for more:
If you run into any problems please let me know here. If you find a reproducible bug, please add it to the issues list.
If you run into Loiter issues, try adjusting LOITER_P. It's 2.0 right now which may or may not be to aggressive for your copter. Nav is no longer used in Loiter control, which should make tuning easier.
If you run into a circling issue, try lowering LOITER_I to 0 and see if it goes away. If not, check your compass declination. A negative error will produce CCW rotations, a positive error CW.
If you have issues with alt hold, try lowering your THROTTLE_P, it may be too high for higher thrust copters.
If you have wobbles and can't seem to get rid of them, there is a new term called STAB_D, which is a derivative term used to tune out the wobbles. You can increase it until they stop, but just like driving a cadillac, you loose some performance and handling. In the CLI "tune 16" in setup will let you control this in flight, and "tune" in test menu will let you see the value printed out interactively before flight. See the wiki for more detail.
Many testers gave me a thumbs up on the code, so if you have an issues please post the flash log from the copter. The tLog isn't that much help to me for debugging as it doesn't capture the needed values at high enough rates.
(Remember, if you'd rather pull the code from the repository and load it with Arduino, you must use the "relaxpatch" version of Arduino in our downloads section.)
I believe I found the simple mode error. It was a bug that was working OK until Tridge fixed it so it was declared properly. Then the bug became active. I made the Simple mode function internal variables static and this should fix it hopefully.
I updated alt hold to not use dampener for now until we get more testing. Some folks saw a latency induced oscillation which was pumped up by the D term.
I added the automatic throttle cruise or hold value as a compile time option for testers. This basically looks at your throttle and climb rate while in stabilize or acro and determines your optimal hover value. This means you can enter any autopilot mode and not have to worry about your throttle position. It should make alt hold more reliable if it works. This is off by default until we get good field tests back.
Update pushed to GIT.
Just some refinements. I added JLN's throttle curve mod for landing. Hopefully that's correctly implemented.
Made the landing delay from RTL user settable
removed the ADC gyro filter, I was doing a lot of testing and determined it wasn't worth it.
Enabled the auto-throttle control by default. Please test in the sim
Altitude no longer resets when flying in Loiter mode
Pitch and roll dampening is smoother now. try values up to .08 for very dampened flight.
Mavlink can now trigger auto-land
I'll push a hex when I hear some good news from HIL testers.
OK, 2.2b6 is on GIT. The Mission planner is going to be out of sync until the release code. until then you can use the APM_Config.h or the parameters list in the Mission planner.
STAB_D : This is the gyro accretion dampener. This can remove small wobbles during sharp changes in angle commands. Making this too high can have a negative effect in performance and add a memory effect that can cause temporary loss in control. The in flight tuning is ranged so you are just below that effect.
If you haven't noticed before the control loops are in two stages. The first is a PI stage that converts some sort of position or angle error into a desired rate. These generally do not need to be tuned. They are more of a user preference on how fast you want the copter to perform a motion.
The second stage is the actual PID loop that needs to be tuned for the copter. This converts the desired rate into a motor command of some sort. I added a D term based on Igor's recommendation to the PI's for each rate controller. These should show up soon in the mission planner for the release. I cannot give you a concrete answer for how to tune the D terms, because they each depend on their function such as alt hold or loiter, etc.
Still, the absolute most important term is always the Rate_P term for each loop. Start tuning here.
The default PIDs are in the what flies great for a stock jDrones/3DR Quad with the purple motors in X mode.
Thx Johann, been flying for about 5 months, love it :)
I agree with you Marco, I fly a big octo, and not just hover around, I fly the thing, fast and proper, and as you say, which I've noticed for a long time now as well, when I do a long forward movement pretty fast, and then stop and hover it always wants to 'counter act' thus pushing in the opposite direction i was flying in, for a few seconds then only levels out, very strange effect, I've come to live with it, but would, noticed that .40 does not have this effect, perhaps this is parts of the stability patch brought in around .55 ???
I would love to see a log where you could point out this effect. It's always bothered me and i've never been able to put my finger on it. I think it's the DCM and linear acceleration, but I've not proved it yet or had enough time to dedicate to it.
If it were and you were flying GPS, I could tell the DCM to stop drift correction until you came to a stop. That could remove the problem entirely if this were the case.
The other possibility is an iterm windup in the stability loop. you could set this to 0 to find out.
Some flash logs would really be to useful to nail this.
If you mean if I've done any redundance test, I once had one of the top props flying away, and although it wasn't as stable, I did not loose control of the Y6, and managed to land without problems.
I'm not to clued up on the logs, but I could get you one from a test flight. It's almost like the copter tries to re-balance itself after a long movement, like over compensating for the forward movement, then it tries to move back to stop/balance it self, but it's far too much, if I fly forward pretty quick and leave sticks, it comes back at almost the same speed for a second or two, very weird, I just kinda fight it level, but would be great if this could be removed, I think Marco and the mods the guys have in the xp2 version are on the right track in terms of this, as Marco mentioned, if the copter flies correctly before we bring in gps, the gps results will also just work much better, as we can see in his video.
you think ?
I corrected this by using very small I-terms (0.001 Stab I). But it does not resist wind that well anymore.
Hi Marco, I get a number of compile errors if I try upload this code, am I missing something?
This is complicated stuff, more so than I ever imagined. I'm skeptical the mods are on the right track, and I've not seen code that is robust and different yet to prove anything conclusively.
One other factor is the aerodynamics. The faster you go the more the copter is tipped flat by the air currents. Can you compare this to other quad controllers you've used in the past?
The mission planner can dump logs for you. Please give it a go, I'd love to check them out.
Im slao getting compile errors ??
Will check now, hold on...
Duran: Did you copy the libraries in the fw folder to the libraries directory in arduino?
um, yip ;)