I've just released ArduPlane 2.60
The main new features in this release are:
For a description of the first 3 new features have a look at my previous post. All of these features have been test flown on my PulseXT 40 and have performed very well.
The new roll/pitch/yaw controllers from Jon can be enabled by building with
#define APM_CONTROL ENABLED
in your APM_Config.h. If you enable the new controllers then I strongly suggest you read Jons blog post about the new controllers and how to tune them. These controllers are still experimental, but if we get good feedback on them from users we will quite likely adopt them as the standard controllers in a future release.
Other changes in 2.60 include:
Happy flying!
Tags:

A small errata ... the wheeled takeoff code doesn't work in 2.60 if you enable Jons controllers with APM_CONTROL=ENABLED. I've fixed that in master for the next release.
Permalink Reply by Jonathan Challinger on August 22, 2012 at 1:03am Quick guide to tuning my controllers. Looks complex, but each step is individually easy:
Gain names:
Instructions:
Also note that my blog post is inaccurate regarding stabilize mode. Stabilize mode works now, and there is an additional "STAB_GAIN" on the controllers, which controls how strongly they stabilize when you switch to stabilize mode. It has no other function.
Permalink Reply by Jonathan Challinger on August 22, 2012 at 2:06am Oh, it is no longer PTCHCTL_RLL_FF, it is just PTCH_RLL_FF
Additionally, there are YWCTL_P and YWCTL_I gains. To tune yaw (somewhat important for dead reckoning during GPS outages, also helps to prevent stalls), graph the rudder output and increase YWCTL_P until the rudder seems to oscillate or get too noisy, then cut it down to maybe a third to half of that value, then set YWCTL_I about 20% higher than YWCTL_P. Set YWCTL_IMAX to maybe 2000 (or 20 degrees).
You'll also want to tune KFF_RDDRMIX. There are 2 ways:
- Graph the turn rate of the plane and increase KFF_RDDRMIX until it doesn't spike in the opposite direction when you initiate a roll. This can be graphed with mavproxy
- Graph the y accelerometer (RAW_IMU.yacc) and increase KFF_RDDRMIX until it doesn't spike when you initiate a roll.
- I guess there is a third way: just make a wild-ass guess.
Permalink Reply by James Court on August 22, 2012 at 2:45am Great work!
Iam using an APM2 on an Easyglider with a Futaba 7C 2.4.
Please could someone explain how i would go about using the RST_MISSION_CH?
Iam not really sure where to start.
Thank you
Permalink Reply by Jonathan Challinger on August 22, 2012 at 2:50am I would imagine, just set it to a channel number that is a momentary switch, and press the button when you want the mission to reset.
Permalink Reply by Omar Achraf on August 22, 2012 at 3:40am Great work Andrew!
About OBC new features, it is possible to set the number of attempts for GPS Loss as well for COMMS Hold if GPS signal returned as well GCS Heart Beats regained?
If time out on GPS Loss it will trigger that Pin you created in the past for Geofence crossed?
Kind regards

Hi Omar,
I didn't put a counter on the GPS loss in the OBC module. It is possible to implement a counter via the JUMP counters in the mission if you want to, or you could manually override the target waypoint if needed.
The geofence pin does indeed still work with the OBC module, but you can also setup a heartbeat pin using the FS_HB_PIN parameter. If you get a dual failure (GPS loss and comms loss) the heartbeat will stop changing (it normally changes at 10Hz). If just the GPS fails, it will start dead-reckoning, as well as jump to the FS_WP_GPS_LOSS waypoint. You can setup that waypoint with a 30s loiter followed by navigation to airfield home.
Good luck for your D3! Have you posted your D3 video somewhere?
Cheers, Tridge
Permalink Reply by Omar Achraf on August 22, 2012 at 5:22am Thank you Tridge!
Interesting combination of the features. For the GCS failure detection, it is taking in account those 10 seconds to start the jump to COMMS Hold?
I asking these questions because I have the rules in my mind as I did some changes in Arduplane according with OBC rules for our team.
Unfortunatelly our plane crashed on the weekend before the delivery so was not possible to complete the logs for D3 :-(.
keep us posted with your advances,
kind regards,
Omar

Hi Omar,
For the GCS failure detection, it is taking in account those 10 seconds to start the jump to COMMS Hold?
yes, it doesn't trigger comms failure until it has not seen a HEARTBEAT message from the ground station for 10 seconds.
Unfortunatelly our plane crashed on the weekend before the delivery so was not possible to complete the logs for D3 :-(.
oh, I'm sorry to hear that!
Cheers, Tridge
Permalink Reply by jim C. on August 22, 2012 at 9:51am Thank you Tridge, great work
test it next weekend ...
Permalink Reply by Jake Stew on August 22, 2012 at 10:10am Nice work John! Glad to have a PID controller that works well. How long before this gets set as the default control scheme?
I'm also a little confused by your terminology. I'm not exactly seeing how it is different from the PID terms. If you're using a PI controller that works on the rate then isn't that the same as the derivative?
Are you also working on making this an adaptive control scheme? Eliminating tuning entirely sure would be nice, especially for moving the controller from airframe to airframe.
Permalink Reply by Jonathan Challinger on August 22, 2012 at 2:30pm It is a cascaded PID. Yes, the RP gain basically the D gain. The controller is based on a cascaded PID, but has an additional feedforward gain and all of the unnecessary gains are left out.
The reason this is better is the rate is a faster process. The IMAX is fixed at full servo throw, so this control scheme should easily withstand an aileron servo failure, for example.
No plans for making it adaptive, but I've dabbled in trying to learn the FF gain. I think it is doable.
Season Two of the Trust Time Trial (T3) Contest has now begun. The fourth round is an accuracy round for multicopters, which requires contestants to fly a cube. The deadline is April 14th.24 members
249 members
43 members
8 members
51 members
© 2013 Created by Chris Anderson.
Powered by
