Randy Mackay
7c559333f5
Copter: get_throttle_rate's target_speed a float
2013-04-14 10:38:51 +09:00
Randy Mackay
ee7f40cfe9
Copter: Leonard's alt-hold feed forward
2013-04-14 10:38:37 +09:00
Randy Mackay
f82ce449d7
AC_WPNav: add angle limits and set from AC's throttle controller
2013-04-14 10:38:34 +09:00
Randy Mackay
1516972eaa
Copter: add panorama to CIRCLE mode
...
Yaw will slowly rotate if CIRCLE_RADIUS is set to zero
Circle center is projected forward CIRCLE_RADIUS from current position
and heading
2013-04-14 10:38:01 +09:00
Randy Mackay
49828eba7d
Copter: integrate AC_WPNav
2013-04-14 10:37:48 +09:00
Randy Mackay
24dd167607
Copter: ACRO bug fix from Jason
2013-04-01 11:44:28 +09:00
Andrew Tridgell
b280857025
Copter: use common angle wrap code
2013-03-29 13:14:31 +11:00
Randy Mackay
fdcb78ccf7
Copter: leonard's smoother alt-hold transition
...
Target altitude when entering alt-hold is based on a projection from
current alt and climb rate
2013-03-17 13:24:49 +09:00
Randy Mackay
37040adfaa
Copter: bug fix for auto missions over 320m
...
get_throttle_althold_with_slew's target_alt parameter defined as int16_t
(instead of int32_t) meaning missions with altitudes >320m could wrap
around and become negative.
2013-03-17 11:14:35 +09:00
Randy Mackay
f9539384a1
Copter: rename failsafe to failsafe_radio
...
Makes way for separation of failsafes for throttle, gps and gcs
2013-03-16 17:14:21 +09:00
Randy Mackay
476a6d0164
Copter: fix for acro throttle bug
2013-03-02 10:28:44 +09:00
Randy Mackay
d8515ff85e
Compass: basic compensation for motor interference
2013-03-02 00:03:16 +09:00
Randy Mackay
df1c0d92bd
Copter: manual throttle scaling fix
...
Scaling of bottom half of throttle was changed from THR_MIN ~ 500.
Previously it was from 0 ~ 500.
2013-02-01 22:37:33 +09:00
Randy Mackay
a0b65a262b
Copter: use scaled throttle for accel-throttle's I term
...
Accel throttle's I term is taken from scaled manual throttle
2013-02-01 22:37:25 +09:00
Randy Mackay
06a71af12f
Copter: THR_MID used to scale manual throttle
2013-02-01 22:37:16 +09:00
Randy Mackay
aaecc25ac7
Copter: leonard's inav2
...
Moved loiter controller to navigation.pde
2013-01-25 15:16:35 +09:00
Randy Mackay
deafbf1f56
Copter: inav loiter comment changes
...
removed unused get_loiter_vel function
2013-01-24 11:14:38 +09:00
Randy Mackay
68fc9ac1d8
Copter: add "f" to end of float constants
...
This is a small performance improvement for the px4
2013-01-23 14:51:37 +09:00
Randy Mackay
9a09f086d2
Copter: Leonard Hall's inertial nav ver 2
2013-01-23 12:34:49 +09:00
rmackay9
ab1978ad50
Copter: Leonard Hall's inertial nav based loiter
2013-01-22 18:38:00 +09:00
James Bielman
5631f865b2
Update floating point calculations to use floats instead of doubles.
...
- Allows use of hardware floating point on the Cortex-M4.
- Added "f" suffix to floating point literals.
- Call floating point versions of stdlib math functions.
2013-01-16 13:52:01 +11:00
Randy Mackay
175f69a64f
ArduCopter: smooth throttle when switching from manual throttle to alt hold
...
new set_accel_throttle_I_from_pilot_throttle function copies the
difference between the pilot's throttle and hover throttle to the
accelerometer based throttle controller's I term.
2013-01-13 20:00:59 +11:00
rmackay9
21b6c78d12
ArduCopter: added get_throttle_althold_with_slew to allow slower altitude target changes
...
Improved surface tracking by using slewed althold controller
Reduced sonar mode filter to just 3 elements to reduce lag but at the possible consequence of allowing sonar noise to creep through for people with margin sonar set-ups.
2013-01-13 19:51:47 +11:00
Andrew Tridgell
860f4b2605
Copter: merge the latest 2.9 changes into master
2013-01-08 14:37:40 -08:00
Andrew Tridgell
ead38f917f
Copter: use GRAVITY_MSS
2013-01-02 14:45:08 +11:00
Andrew Tridgell
51d987a890
Copter: removed unusued variable
2013-01-02 09:55:55 +11:00
rmackay9
677b38a48e
ArduCopter: first implementation of surface tracking using sonar
...
Note: not yet enabled as part of any flight mode
2013-01-02 09:55:37 +11:00
rmackay9
daac540e08
ArduCopter: get_throttle_althold - add check to avoid divide by zero
2013-01-02 09:55:37 +11:00
rmackay9
576af6d487
ArduCopter: bug fix to althold desired rate calculation. Fix from Jonathan.
2013-01-02 09:55:37 +11:00
rmackay9
ff40fa6aab
ArduCopter: alt hold bug fix - should use 2x linear distance when calculating the desired rate
...
Bug fix from Leonard.
2013-01-02 09:55:37 +11:00
rmackay9
393c893cdb
ArduCopter: bug fix (attempt #2 ) for accel based throttle controller
...
Thanks to Jonathan for this.
2013-01-02 09:25:58 +11:00
rmackay9
e583ade62d
ArduCopter: bug fix to accel based throttle controller (was using m/s instead of cm/s)
2013-01-02 09:24:31 +11:00
rmackay9
e850ab7ccd
ArduCopter: add AUTO_VELZ_MIN, AUTO_VELZ_MAX and PILOT_VELZ_MAX to allow better control of climb/descent rate in auto and manual throttle modes
2013-01-02 09:24:31 +11:00
rmackay9
466097b383
ArduCopter: use inertial nav for current altitude and climb rate
2013-01-02 09:22:51 +11:00
rmackay9
7a5e4b8549
ArduCopter: stop unnecessary updates of target altitude and knock-on effect of too many EV message in dataflash log
2013-01-02 09:19:17 +11:00
rmackay9
ac8af9a53f
ArduCopter: Leonard Hall's changes to alt hold including adding low pass filter to climb rate
...
get_throttle_rate_stabilized changed to simply update the target altitude instead of talking directly to the rate controller.
get_throttle_althold changed to use sqrt of distance when calculating the desired rate towards the target altitude.
added reset of accel based throttle PID's I term.
unrelated small bug fix from Randy to allow CH6 tuning of throttle rate D term.
2013-01-02 09:19:17 +11:00
rmackay9
f4c50353b9
ArduCopter: allow tuning of the Throttle Rate D term
2013-01-02 09:16:48 +11:00
rmackay9
7ea34d4fb7
ArduCopter: updated accel based throttle to use ahrs's get_accel_ef method
...
Also removed slow low pass filter meant to correct for accelerometer calibration. This is no longer required now that we have the improved calibration method.
2013-01-02 09:11:25 +11:00
Pat Hickey
7af03127f6
ArduCopter: more work
2012-12-20 14:52:28 +11:00
rmackay9
af77425636
ArduCopter: fix Failed to Init Optflow message at startup
2012-12-11 00:09:45 +09:00
rmackay9
2f1b2b70e6
ArduCopter: added ACRO_TRAINER parameter to allow enabling/disabling the acro training function which will bring the roll back to within +- 45 degrees
2012-12-10 22:27:46 +09:00
rmackay9
154e3c33f7
ArduCopter, AP_InertialNav: consolidated ThirdOrderComplementaryFilter into AP_InertialNav to save about 200bytes of RAM
2012-12-10 00:43:11 +09:00
Robert Lefebvre
0eb57bf93d
ACM: TradHeli
...
Fix to make update_throttle_cruise work with stab_throttle scaling.
2012-12-08 15:12:39 -05:00
Robert Lefebvre
1b97a92098
ACM: Code Cleanup
2012-12-08 14:49:38 -05:00
rmackay9
9dd978576b
ArduCopter: auto yaw changes to allow pilot override of yaw during missions
...
Added set_yaw_mode to better control of yaw controller changes and variable initialisation.
Replaced AUTO_YAW mode with separate yaw controllers YAW_LOOK_AT_NEXT_WP, YAW_LOOK_AT_LOCATION, YAW_LOOK_AT_HEADING.
Pilot manual override of yaw causes yaw to change to YAW_HOLD (i.e. manual yaw) until next waypoint is reached.
Added get_yaw_slew function to control how quickly autopilot turns copter
Changed YAW_LOOK_AHEAD to use GPS heading and moved to new get_look_ahead_yaw function in Attitude.pde
Renamed variables: target_bearing->wp_bearing, original_target_bearing->original_wp_bearing.
Removed auto_yaw_tracking and auto_yaw variables and update_auto_yaw function as they are no longer needed.
Simplified MAV_CMD_CONDITION_YAW handling (do_yaw). We lose ability to control direction of turn and ability to do long panorama shots but it now works between waypoints and save 20bytes.
2012-12-08 14:23:32 +09:00
rmackay9
2dd4694eef
ArduCopter: adjusted pid_throttle_accel dt to 0.01 (100hz)
2012-12-06 10:32:12 +09:00
rmackay9
39d524212f
ArduCopter: allow accel based throttle controller to be enabled/disabled with the new THR_ACC_ENABLE parameter.
...
When disabled the original velocity based throttle controller is used.
2012-12-06 10:31:57 +09:00
rmackay9
a5bb54e36e
ArduCopter: RTL clean-up and slightly improved landing sensor
...
Consolidated RTL state to be captured by rtl_state variable.
Combined update_RTL_Nav and verify_RTL functions which performed the same function but one was for missions, the other for the RTL flight mode.
Renamed some RTL parameters and global variables to have RTL at the front.
Landing detector now checks accel-throttle's I term and/or a very low throttle value
2012-12-06 10:31:52 +09:00
rmackay9
072ffec493
ArduCopter: allow INERTIAL_NAV to be enabled separately for horizontal and vertical position
2012-12-06 10:31:41 +09:00
rmackay9
bdb47c449a
ArduCopter: pass linear altitude error to throttle rate controllers.
...
Previously the requested rate used the square root of the altitude error.
Scale pilot's desired vertical rate and acceleration based on ACCELERATION_MAX_Z and VELOCITY_MAX_Z #defines
2012-12-06 10:31:31 +09:00
rmackay9
7b4ed2d227
ArduCopter: restored landing detector to landing throttle mode.
...
Added LAND_SPEED parameter to control the rate of descent for the last 10m of a landing.
Added CH6 tuning for accel based throttle controller.
2012-12-06 10:31:20 +09:00
rmackay9
a94826f182
ArduCopter: add set_throttle_mode to better control initialisation of variables
2012-12-06 10:31:04 +09:00
rmackay9
1036b35128
ArduCopter: added back in angle boost and recombined for heli and multicopter
2012-12-06 10:30:55 +09:00
rmackay9
3cbef57c64
ArduCopter: first merge of leonard's accel based altitude controller plus other changes from Randy
...
Changes include:
New low-level get_throttle_accel function takes target acceleration and compares vs earth-frame Z accelerometer values to produce output to motors.
Higher level throttle controllers modified to call new get_throttle_accel controller
Throttle_rate_stabilized controller added which maintains a desired climb/descent rate
Throttle_land controller added - descends using normal auto throttle controller to 10m then descends at 50cm/s
Multiple throttle modes added including landing mode
Land flight mode no longer needs GPS
Throttle cruise maintenance moved to update_throttle_cruise function
2012-12-06 10:30:49 +09:00
Robert Lefebvre
1d589c0b7d
ACM: TradHeli
...
Fixes for Attitude rate controllers.
2012-12-04 14:42:04 -05:00
Robert Lefebvre
07d7d90882
ACM: TradHeli
...
Bringing in Low Pass Filter for Rate Controllers
2012-11-26 21:51:23 -05:00
Robert Lefebvre
3f0e8dd358
ACM: TradHeli
...
Bringing in Low Pas Filter
Commented out because it does not build.
Needs updates to Low Pass Filter Lib
2012-11-26 21:21:12 -05:00
Robert Lefebvre
e8d619acad
ACM: Begin creation of TradHeli rate control.
...
May affect Multi-Rotors.
2012-11-26 21:02:41 -05:00
Robert Lefebvre
95eeda7cf7
ACM: TradHeli
...
Removing Angle Boost function.
Does not make sense for helis due to aerodynamics. Can cause more problems than it solves.
2012-11-26 18:58:21 -05:00
Robert Lefebvre
6ffc115236
Changes to get_throttle_rate()
...
Commented out a bit of code that is not used currently
Change the output constrains to #defines so they can be easily changed, particularly for use in TradHeli.
2012-11-21 17:11:38 -05:00
rmackay9
07a7a1acd8
ArduCopter: replaced digitalRead and digitalWrite with faster calls
...
improved performance logging to dataflash
2012-11-19 01:16:07 +09:00
Jason Short
5f57678a9c
ACM Nav_throttle- removed sign inversion
2012-11-16 17:38:57 -08:00
rmackay9
ac5dcc8d49
ArduCopter: remove last remanants of rate_d to resolve compiler warning of unused variables
2012-11-12 12:35:58 +09:00
Jason Short
69db678252
ACM: attitude.pde - adjusted the FF of the alt hold algorithm, the old way was pretty crap. increased the output range of rate controller.
2012-11-11 18:22:54 -08:00
Jason Short
5ad38a32bf
ACM : Attitude : added nav param reset
2012-11-09 22:15:15 -08:00
Jason Short
3c78c4a7a3
ACM : Attitude.pde added ap bitfield for failsafe bit
2012-11-09 22:15:15 -08:00
Jason Short
a42c6bb609
ACM : Attitude.pde removed stabilize D
2012-11-09 22:15:15 -08:00
rmackay9
14cbe37d3e
ArduCopter: remove unused get_stabilize_rate_yaw
2012-11-07 23:28:25 +09:00
rmackay9
1f801714e8
ArduCopter: incorporate new version of inertial navigation
...
Moved several navigation functions from ArduCopter.pde to navigation.pde
2012-11-07 19:21:31 +09:00
rmackay9
a1b4ec6d0e
ArduCopter: move to use new INS library instead of IMU library
2012-11-07 19:21:09 +09:00
Jason Short
8a8ed7a711
ACM : Formatting
2012-10-28 12:12:38 -07:00
rmackay9
4877348c49
ArduCopter: remove some unhelpful constraints on nav_lat and nav_lon.
...
Increase other constraints from 3200 to 32000. These constraints are there to ensure int32_t do not cause an overflow when added to an int16_t.
2012-10-24 22:04:35 +09:00
rmackay9
5e8043fd9c
ArduCopter: changed ACRO_ROLL_STABILIZE and ACRO_PITCH_STABILIZE to parameters
...
Changes on behalf of Leonard Hall
2012-10-23 21:30:50 +09:00
Jason Short
a0752dc7dc
ACM Acceleration management
...
removed unused waypoint_radius var
removed slow_wp
updated speed management system to maintain a constant acceleration or deceleration of 1m/s
changed version to 2.8.1a
2012-10-21 14:32:39 -07:00
rmackay9
583f2e49a3
ArduCopter: integrated Leonard Hall's improved ACRO mode
2012-10-18 23:24:34 +09:00
rmackay9
b944d9df26
ArduCopter: bug fix in earthframe->body frame translation.
...
Provided by Leonard Hall.
Also removed large unnecessary comments.
2012-10-17 19:15:25 +09:00
rmackay9
5fbe53a84d
ArduCopter: bug fix for get_yaw_rate_stabilized_ef
...
Provided by Leonard Hall
2012-10-17 10:18:24 +09:00
LeonardTHall
d7b7e1cefa
New Yaw controller using rate feed forward and stabilize.
...
Signed-off-by: LeonardTHall <LeonardTHall@gmail.com>
2012-10-15 11:37:49 +09:00
rmackay9
997fe85880
ArduCopter: fixed acro mode
...
Changes included:
Removing earth frame roll_rate_trim, pitch_rate_trim and yaw_rate_trim.
Switch ACRO mode to use YAW_ACRO instead of YAW_HOLD.
Changed YAW_ACRO to use stabilize yaw when axis_enabled.
Reset ACRO roll, pitch and yaw targets to current attitude when first entering ACRO.
2012-10-14 17:47:46 +09:00
rmackay9
2848bb8ee6
ArduCopter: freeze I terms if motor limits breached
2012-10-11 17:20:00 +09:00
rmackay9
7cf60e61b4
ArduCopter: bug fix in earth-frame to body-frame conversion for roll
2012-10-07 19:14:40 +09:00
rmackay9
05fd04134a
ArduCopter: fix heli build
2012-10-06 13:46:19 +09:00
rmackay9
e375a27058
ArduCopter: prioritise rate controllers, rate controller targets converted to body frame
2012-10-03 14:10:31 +09:00
rmackay9
361ff0c08f
ArduCopter: allow PID logging of throttle. Make get_angle_boost actually use parameter passed in.
2012-09-18 23:19:23 +09:00
uncrustify
f783ace0de
uncrustify ArduCopter/Attitude.pde
2012-08-21 19:19:50 -07:00
Jason Short
0a25a189eb
ACM | Attitude.pde - removed next_wp.alt reset.
2012-08-18 12:25:48 -07:00
Jason Short
bc631b656e
ACM: Added a more sane limit to Angle boost
2012-08-18 09:04:21 -07:00
rmackay9
87d5b5944d
ArduCopter: commented out get_acro_yaw2 function to reduce compiler warnings
2012-08-18 16:03:49 +09:00
rmackay9
92688a793a
ArduCopter: fixed compiler warning related to shadowing of control_roll and control_pitch in get_of_roll and get_of_pitch.
2012-08-18 11:48:12 +09:00
Jason Short
9cee1b2fa0
ACM : Upped Yaw Limit to 2200
2012-08-16 15:38:46 -07:00
rmackay9
36f947acb9
ArduCopter: changed all "int" to "int16_t" and a few "long"s to "int32_t".
...
Also moved "simple_counter" variable from global scope to the "update_simple_mode" function which is the only place that it's actually used.
2012-08-16 20:04:46 +09:00
rmackay9
a72bf6ef57
ArduCopter: replaced abs with labs as required in a few places.
...
Also fixed a small bug in the get_stabilize_pitch function in which it was using the roll (instead of pitch) to decide whether it should let the i term build-up or not.
2012-08-16 17:51:09 +09:00
Jason Short
3ad08b7ffc
ACM : Added larger WP radius for fast waypoints so we don't loose speed angling in on the WP at the last second.
2012-08-10 10:02:32 -07:00
Jason Short
132ac7d412
ACM : attitude.pde - removed unused function
2012-08-09 17:04:12 -07:00
Jason Short
5d756decd2
ACM : Attitude.pde
...
yaw limit, moved toy code out of att to it's own pre
2012-08-09 16:59:43 -07:00
Jason Short
8c47b0c087
ACM: Toy mode fix - Pitch flipped the sign on roll/Yaw coupling.
2012-07-30 15:43:05 -07:00
Jason Short
613849a8df
Arducopter: Force nav_yaw to match auto_yaw when starting a mission
2012-07-19 22:59:03 -07:00
Jason Short
610d1d1795
Arducopter: deprecated the get_nav_yaw_offset function.
...
Small Toy mode updates
2012-07-19 17:41:52 -07:00
Jason Short
aa645afe2b
Arducopter: Altitude change nav
...
Split altitude hold into two controls to parallel navigation.
2012-07-18 22:57:10 -07:00
Jason Short
584e7dcda4
Arducopter: Removed Yaw Limit for Quads
2012-07-14 14:06:34 -07:00