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.
Ok so I am not 100% sure but this is what I found. Pretty sure it is not related to new 2.2 or new MP.
running MP through Fusion on Mac. Sometimes the compass is reading wrong sometimes not...Shutdown, restarted, reloaded firmware again, now seems OK....can't explain but when I plugged in old APM with older firmware it read OK, updated to new (got some errors and redid it) then all OK on old, then tried new APM and OK this time (restarted Windows though).
Put it down to ...go figure?
Bill and Brian,
As I remember it the declination value used in MP is in degrees, not radians.
ArduCopter compass function will improve after first flight with 360 degrees pirouettes, where the AC collects magnetometer cablibration data used for flights thereafter.
Anyway, I suppose you have installed the board in a way that so that the magnetometer will not be disturbed by mag fields from metal objects, high current wires, etc... (actually I just realized that the radio receiver in my own installation might have a steel screw located a bit too close to the sensor... :-/).
Internal calibration software attempts takes care of residual fields, but it cannot do miracles.
Ok, I loaded the latest last night (that MP does anyway ), and I regretfully have to say "Loiter" doesn't even looks like it's trying to work anymore.
I double checked, MP says "Loiter" IS engaging.
Waited 5 minutes, AFTER gps showed lock.
Stab is working, yaw is very stable, my mag points in the correct direction, but no "Loiter"
Gustav: Are you using a standard quad frame (3DR or Jdrones) on APM 1? If not, you're going to have to do some PID tuning.
At some point relatively soon, we'd like to have a library of config files for known airframe types, as we have with planes. But given that the code has is just coming out of beta now, and new control laws have required different PIDs, it's been premature until now.
Standard jDrones quad, APM1.
Loiter was much better with the code MP loaded on Saturday.
I would like to contribute the config on my ST Models Discovery.
Other than upping the airspeed, default configs :-)
I'm trying to load the old Pirates code again, apparently I'm doing it wrong, will try again over the next day or two.
We are having a heatwave, not conducive to thinking hard, 33 degrees C, in my house.
And it is 19H30 already............
OK, I managed to install the last Pirates release.
I had completely forgotten how to set up the different modes :-(
A bit cooler this morning, but windier.
And reading the Wiki helped, note to self, read the Wiki......
Unfortunately I have to say, even in windier conditions, without any tuning on the PID's,
The quad is much more stable Loiter, or "Position Hold", as it is called in Pirates.
Altitude is held to within <1.5 meters, position <4 meters.
And it is somewhat turbulent in my yard.....
A pity I'm at the end of my leave, I really would have liked to run more tests, videos, and comparisons.
And I have to concentrate on my 2.5 meter wing UAV now :-)
Right, drove out to my favorite field, light wind, but a bit switchy.
Definitely better "position hold" in Pirates, sorry.
Motors sound to be working a lot harder too.
It seems our heatwave will dissipate as of tomorrow, I'll try to make some videos, with the different firmware.
Gustav, which Pirates firmware are you talking about?
The one I have says:
File : ArducopterNG.pde
Version : v1.0, 11 October 2010
Author(s): ArduCopter Team
Ted Carancho (AeroQuad), Jose Julio, Jordi Muñoz,
Jani Hirvinen, Ken McEwans, Roberto Navoni,
Sandro Benigno, Chris Anderson
Author(s) : ArduPirates deveopment team
Philipp Maloney, Norbert, Hein, Igor, Emile, Kidogo
I'm a bit confused here, looking into the code you linked to.
Jason is the author, must be fairly recent, there is optflow libraries in there ?????
When I use CLI it normally connects after pressing return only one time. Or maybe even none.