My copter is the default Arducopter frame and setup (motors, escs, etc, from DIY Store!). I had my initial flights over the last few days and today i focused mainly on trying to get Alt-Hold and Loiter working.
I have the "MB1260 XL-MaxSonar-EZL0 High Performance Ultrasonic Range Finder" installed on the quad. There is nothing in its way and on the bench i see a height of 20cm to 100+ or so cm when pointing at the ceiling.
Running the latest SVN of Arducopter2, 2.0.28
My initial test flight today were not recorded however they went well. The copter is very very stable with the exception that YAW takes full rudder to yaw very slowly around. However, with sonar enabled both alt-hold and loiter end up with the quad going skywords and not stopping (its not shooting like a rocket like others have expressed but it never did seem to work. I aborted every attempt before it got to far up).
The video shows the results of my later flight tests. The first two clips are of a crazy yaw issue and the final piece is loiter mode hunting.
As i said my yaw is very slow and spongy, it takes full rudder to yaw around and it hunts (goes back and forth) at the end of a yaw (i even see some hunting during slow forward flight and hovering). The default P is like 0.35 or 0.4, i cant recall. I adjusted P to 0.8 and D proportionally. The end result is shown in the first two segments of the video. After a short bit of forward flight the copter will let go of the rudder and yaw around CW, anywhere from 90 to 180 degrees. I repeated it several times.
Future flights I adjusted the P to 0.6 and the no longer happens but it still takes allot of rudder to command a yaw change. My questin is, what other parameters can i change to get more yaw out of this thing.
Finally loiter. With sonar disabled loiter somewhat works. As the video shows it hunts around the loiter point until i take over as the circle its flying gets bigger with each pass. If i am not mistaken the lat/lon loiter D is what i increase to help this?
Thanks for reading/watching.
Replies
Also, Switch to
#define YAW_OPTION 0 // 0 = hybrid rate approach, 1 = offset Yaw approach, 2 = simple hybrid
You'll be much happier. The 180° swing is the Yaw error. The copter wants to hold 0°. It swings around past 180 and decides to go the rest of the way since it's the fastest way back to 0°.
You want to increase your D term for loiter. It will slow you down when traversing to the Loiter target.
Would you have a log of the Alt hold rising?
If you can't read the logs for some reason, dump 0 will dump the entire log contents.