Implemented automatic ranging of Alt Hold gains. Works well in simulator and testing.
- alt hold estimation moved to 50 hz
- simple fixed observer calc for smooth and accurate climb rates useful for derivative calcs
- auto-reset of the I term by moving I value into throttle value. This recalcs the gain every 20seconds for battery drainage compensation in long flights.
- remove filtering for Nav_throttle
- added a way to lower the gain on nav_throttle for descents by / climb_rate error by 2 - seems to work OK and keeps copter from dropping like a rock when the Baro drifts quickly lower.
- removed old throttle hold set point code
- made throttle override for alt hold +- 200 vs 250
* Not needed, but we can always checkout an old version if it is.
Hi Pat,
This may have been my WIP for the Mavlink 1.0 conversion. I tried to
give Tridge a head start on it. I've made small updates to it in
parallel to the current Mavlink. You can delete it as he would have used
it by now if he felt it was helpful.
Jason
On Feb 28, 2012, at 4:08 PM, Pat Hickey wrote:
It looks like this file was checked in by accident, possibly, but you've
made a few small changes to it since creating it.
Is it important? Should we get rid of it?
Git log of file below.
Thanks
Pat
...
The first is to remove the filter on the throttle output for alt_hold.
The second was to open up the constraint on climb rate. This is to deal with larger than expected disturbances causing altitude changes.
this disables the compass in DCM if MAG_ENABLE is changed in
flight. Without this we would use a fixed yaw once the compass is
disabled
This also makes sure we don't pass the compass to DCM till we have
done a read. This ensures we have a good compass fix for the initial
DCM heading
after discussion with Randy, we don't want ArduCopter to fall back to
GPS for yaw when the compass becomes unhealthy. So we shouldn't pass
the gps object to the DCM code at all.
We would like to be able to use Vector3f as a parameter while exposing
the individual elements of the vector as MAVLink parameters. This
change to AP_Param makes that possible, by giving AP_Vector3f a dual
personality