Commit Graph

273 Commits

Author SHA1 Message Date
Randy Mackay
0830eaf363 Copter: added experimental LOITER_REPOSITIONING #define to config.h
APM_Config.h should be used to overriding the standard parameters but
they still require a definition in config.h or they will be undefined
when built by the mission planner.
2013-01-14 13:07:52 +09:00
Randy Mackay
cad9533398 ArduCopter: replace FS_THR_RTL_MIN_DISTANCE with wp_radius
This effectively means that an RTL kicked off by a failsafe will
immediately switch to LAND mode only if within 2 meters.  Previously the
radius was much wider (15m).
2013-01-12 11:40:03 +09:00
Randy Mackay
f3550801d1 ArduCopter: disable ITERM logging by default
This message takes 1ms to write and we are running over our limits on
some loops.
2013-01-11 16:23:54 +09:00
rmackay9
b58a89e71e 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-08 14:40:47 -08:00
rmackay9
6f0868a9f8 ArduCopter: increase throttle rate P to 6.0 (was 1.0) and alt hold P to 2.0 (was 1.0) 2012-12-31 14:42:13 +09:00
rmackay9
57702b7c31 ArduCopter: turn on INERTIAL_NAV_Z in the config.h file so that it takes effect when built for the mission planner 2012-12-27 19:33:12 +09:00
rmackay9
ecb388059e 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 2012-12-22 12:52:49 +09:00
rmackay9
ac66d7cac2 ArduCopter: on throttle failsafe, only initiate RTL if we are at least 15m from home 2012-12-21 14:39:48 +09:00
Robert Lefebvre
f48ec39cfa ACM: Precision Loiter RePositioning code.
Protected behind a #define
2012-12-17 07:42:28 -05:00
rmackay9
3be100469b ArduCopter: remove unused rc_override variables to save 21 bytes 2012-12-17 17:04:51 +09:00
rmackay9
68d6eee1e7 ArduCopter: increase accel based throttle PIDs and add D term to rate based throttle 2012-12-17 14:46:30 +09:00
Robert Lefebvre
b83049bdda ACM: Trying to set a default MPU6K filter rate of 10Hz for TradHeli. Doesn't Work. 2012-12-13 14:54:14 -05:00
rmackay9
d2c8abe491 ArduCopter: allow RTL's yaw mode to be overridden with a #define in APM_Config.h 2012-12-13 00:15:30 +09:00
rmackay9
8d75022d58 ArduCopter: allow GUIDED mode roll-pitch, yaw and throttle control modes to be overridden 2012-12-12 23:28:26 +09:00
rmackay9
770e1b97f2 ArduCopter: renamed BATT_FAILSAFE to FS_BATT_ENABLE 2012-12-10 23:47:14 +09:00
rmackay9
44773d1f2a ArduCopter: rename throttle failsafe parameters.
Switch to LAND flight mode if throttle failsafe triggers and we do not have a GPS.
THR_FAILSAFE renamed to FS_THR_ENABLE.
THR_FS_VALUE renamed to FS_THR_VALUE.
THR_FS_ACTION removed (action is now controlled by setting FS_THR parameter).
2012-12-10 23:38:43 +09:00
rmackay9
93fa3fbc69 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
29f040acba ArduCopter: added descriptions for most parameters that did not have them
Renamed loiter_radius to circle_radius to better reflect it's purpose.
Removed some unused parameters including WP_MODE, WP_MUST_INDEX, LOG_LASTFILE, AXIS_P
2012-12-10 21:45:57 +09:00
rmackay9
97153c32d0 ArduCopter: reduce Rate Roll/Pitch P to 0.150 (was 0.175) and increase I to 0.1 (was 0.01) 2012-12-09 18:08:45 +09:00
Robert Lefebvre
39013a33bc ACM: Adding Pre-Compiler Define for Stabilize Throttle Mode. 2012-12-08 20:41:05 -05:00
Robert Lefebvre
c6537ae6e3 ACM: Code Cleanup 2012-12-08 14:49:38 -05:00
rmackay9
90f9b8c076 ArduCopter: remove debug related to yaw mode used for alt hold 2012-12-08 14:24:50 +09:00
rmackay9
f62c377062 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
b973d50d79 ArduCopter: remove some unused #defines 2012-12-07 15:17:35 +09:00
rmackay9
5c3ca64c12 ArduCopter: add dataflash logging of camera events 2012-12-07 00:57:08 +09:00
rmackay9
9750c14325 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
eb3ad15843 ArduCopter: allow INERTIAL_NAV to be enabled separately for horizontal and vertical position 2012-12-06 10:31:41 +09:00
rmackay9
8a0faebb21 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
dc0b35da30 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
b26f2861ff ArduCopter: removed unused AUTO_THROTTLE_HOLD #define 2012-12-06 10:31:15 +09:00
rmackay9
c1ce0ae752 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
Andrew Tridgell
45e62add9f Copter: update ArduCopter for new ins interface 2012-11-30 07:15:18 +11:00
Robert Lefebvre
c78ecc4fd1 ACM: Creating Yaw_Look_Ahead yaw mode.
This function is not fully tested yet.
2012-11-26 21:37:13 -05:00
Robert Lefebvre
211f964553 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
Andrew Tridgell
fc72b86304 SITL: disable optical flow on the desktop build
it doesn't work yet, as no sensor emulator is available
2012-11-19 09:04:03 +11:00
rmackay9
38fdacd93b ArduCopter: replaced digitalRead and digitalWrite with faster calls
improved performance logging to dataflash
2012-11-19 01:16:07 +09:00
rmackay9
3a4d122e32 ArduCopter: low baterry failsafe 2012-11-15 23:35:41 +09:00
Jason Short
a6bda80064 ACM: Allow for user defined roll and pitch input max 2012-11-11 18:00:10 -08:00
rmackay9
41c0cee292 ArduCopter: failsafe improvements
resolves momentary throttle drop to zero before failsafe engages
resolves motor cut after 30seconds if flying in stabilize without GPS (now switches to ALT_HOLD with target altitude zero)
disables motors if throttle was zero before failsafe event
2012-11-11 22:11:12 +09:00
Jason Short
f17c63062e ACM crosstrack min distance 2012-11-09 22:15:16 -08:00
Jason Short
81b1ebd011 ACM: Added max RTL altitude 2012-11-09 22:15:15 -08:00
rmackay9
af40201b14 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
Jason Short
1e35d3d534 ACM: config.h cleanup
Added LOG_ITERM default to enabled
2012-10-27 09:59:57 -07:00
rmackay9
ab86eae860 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
rmackay9
7fb58fce87 ArduCopter: replace Serial.print with Serial.print_P to save memory.
Includes replacing flight_mode_strings with print_flight_mode function.
SendDebug macro replaced with direct Serial.print_P calls.
2012-10-22 16:45:24 +09:00
Robert Lefebvre
9a20fe32fa Fixed that last commit
#define Stupid_Mistake
2012-10-18 16:50:42 -04:00
Robert Lefebvre
5f8f53ec0a Changed RLT Yaw Mode for TradHeli. Also a few comment cleanups. 2012-10-18 16:39:05 -04:00
rmackay9
3b631f1edd ArduCopter: integrated Leonard Hall's improved ACRO mode 2012-10-18 23:24:34 +09:00
rmackay9
3a26606510 ArduCopter: reduced optical flow's I and IMAX terms 2012-10-17 17:47:43 +09:00
LeonardTHall
4203655646 New Yaw controller using rate feed forward and stabilize.
Signed-off-by: LeonardTHall <LeonardTHall@gmail.com>
2012-10-15 11:37:49 +09:00