Hi All,
I just uploaded the last version of 2.5.0(3) I wanted this one to be rock solid before 2.5.1 came out.
I got a few hours today to tweak code and gains for my EZ Star. I implemented the derivative term in the heading/navigation loop and all the other loops used just the p term. The derivative term helped reduce overshoot by about 50%. I'm not kidding about the wind. The plane was flying at a 30° angle to fight the wind.
Altitude hold was working very well. Pitch_comp reduced to .1 was about all I needed. The airspeed control needs work, but Doug is tackling that.
I have my own personal ground station in Flash and I added uploading of all of the major variables in order to tune the aircraft in flight. This worked great so I'll leave the code included for the GCS team to check out. I didn't use error checking, I had the plane echo back the values so I could see if the uploaded values worked correctly before re-entering AP. It was far less complicated to do it that way than to try and implement errror-checking through code.
I've also implemented a simple dampening system for flying into the wind based on ground speed. Doug has a much more complex version, but this one worked remarkably well. Here you can see the loiter pattern. Please note that I was flying into a terrific headwind. The plane was moving 12 mph upwind and over 40MPH downwind. Sometimes the wind would pick up and the plane would virtually stand still, hence the strange patterns. Overall the snaking was minimal and far better than before. I was able to hold the 45m radius no problem. I could have cut that down to 30.
Altitude hold with 15 loops around home, then a landing.
Comments
here's my code:
Roll output is scaled down if we are under 30mph. It definitely works! I need to adjust it a bit as I made an educated guessed about the scaler values.
It's a version of 2.4 with extras.
That's great to hear. I want to try it on my aileron trainer, but the motor is busted. My goal is for it to work OK on any airframe without gain adjustment. If you want high performance, you'll have to continue to tweak.
How was the startup sequence for you? That was a big change.
Jason
I think the next release of the ground station could do it. On Mega we have plenty of Flash, on the 328 we only can write 512bytes. :(
- Connect Arduino serial window to your Xbee.
- you should see the telemetry stream
- put the plane in manual control
- upload your values with this format: "!!h|80" (then hit return to send)
- you should see that the plane received it, and get the value echoed back (actually all values will be sent back)
Set Heading P to .8
!!h|80
Set Heading I to .01
!!H|01
Set the Rudder/Aileron P (the control surface response) to .65
!!r|65
Also change this code in Ardupilot_25_03.pde
from
#if GROUNDSTATION == 1
readCommands_GS();
#endif
to
//#if GROUNDSTATION == 1
readCommands_GS();
//#endif