Commit Graph

157 Commits

Author SHA1 Message Date
Randy Mackay aa8e5b0aef Copter: constrain auto roll and pitch to 45 degrees 2013-01-14 14:26:26 +09:00
Randy Mackay bd05ea84cc Copter: constrain loiter so that it never commands more than 45 degrees of lean in lat or lon directions 2013-01-14 13:30:25 +09:00
rmackay9 c10af02c4a ArduCopter: bug fix to althold desired rate calculation. Fix from Jonathan. 2012-12-23 11:17:26 +09:00
rmackay9 c2b01e0d63 ArduCopter: bug fix to GUIDED mode. Now checks that desired altitude was reached before deciding the waypoint is complete. 2012-12-22 14:04:47 +09:00
Craig@3DR ae72238beb Removed 2 more degree symbols from comments 2012-12-18 13:42:42 -08:00
Robert Lefebvre f48ec39cfa ACM: Precision Loiter RePositioning code.
Protected behind a #define
2012-12-17 07:42:28 -05:00
rmackay9 c8c13046e3 ArduCopter: stop unnecessary updates of target altitude and knock-on effect of too many EV message in dataflash log 2012-12-17 16:34:20 +09:00
rmackay9 ee164b6073 ArduCopter: remove weird character from navigation.pde 2012-12-12 11:05:16 +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 34724719d9 ArduCopter: remove unused functions do_target_yaw, do_loiter_at_location, get_altitude_error and clear_new_altitude 2012-12-10 17:30:50 +09:00
rmackay9 b65f050b8a ArduCopter, AP_InertialNav: consolidated ThirdOrderComplementaryFilter into AP_InertialNav to save about 200bytes of RAM 2012-12-10 00:43:11 +09:00
rmackay9 8be1f9d9b8 ArduCopter: code clean-up. Changed update_nav_wp to use a switch statement and relocated to navigation.pde 2012-12-09 15:24:19 +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 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 ea9f357dc0 ArduCopter: remove unused get_desired_climb_rate function 2012-12-06 10:31:09 +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
Robert Lefebvre 6f8958289f ACM: Small fix to Yaw Look Ahead 2012-12-04 14:50:14 -05:00
Robert Lefebvre fdcf966df7 ACM: Yaw Look Ahead Changes 2012-12-04 13:26:41 -05:00
Andrew Tridgell 76e9adb8d4 ACM: make it possible to run CLI on radio port in ArduCopter 2012-11-21 21:41:34 +11:00
rmackay9 dab975301b ArduCopter: remove some variables no longer required with introduction of AP_state 2012-11-12 12:41:25 +09:00
Jason Short 1049381dbe ACM: Added fast descent with Bill P's equation for managed accerlation 2012-11-11 18:23:45 -08:00
Jason Short b10975baaf ACM : climb rate option using Bill P's equation 2012-11-09 22:15:16 -08:00
Jason Short 3e905ec750 Ap state updates 2012-11-09 22:15:15 -08:00
rmackay9 fabc149f45 ArduCopter: remove unused functions wrap_360f, wrap_180f and wrap_PI 2012-11-08 15:20:08 +09: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 158c4f8d14 ACM : Formatting 2012-10-28 12:12:38 -07:00
Jason Short 4eeaf4c984 ACM: Added notes, credit to decel code. added speed_min to calc. 2012-10-27 14:13:24 -07:00
rmackay9 e780bfd4c1 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
Jason Short fb9fe2c9a5 ACM : fix compiler warning on non returning function 2012-10-21 14:37:42 -07:00
Jason Short 97d3134ff0 ACM : Cast to int32_T
Don't think it really needs it, but I feel better with the cast.
2012-10-21 14:36:05 -07:00
Jason Short 96f0a32cd3 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 0299e2b51e ArduCopter: removed deprecated mag offset routine.
Also removed commented-out block of code from navigation.pde.
2012-10-17 19:47:21 +09:00
rmackay9 5e6951d3f4 ArduCopter: position lead filters modified to use lag which varies by gps 2012-09-20 15:49:09 +09:00
uncrustify a3f6cdc0bd uncrustify ArduCopter/navigation.pde 2012-08-21 19:19:50 -07:00
Jason Short 1e546b54be ACM : Nav rate limit lowered to prevent bad oscillations due to GPS latency. 2012-08-18 09:04:22 -07:00
rmackay9 1a2dd5b74b ArduCopter: renamed "_new_alt" parameter to just "new_alt" in force_new_altitude and set_new_altitude functions 2012-08-18 21:46:48 +09:00
Jason Short 1a1987b810 ACM : removed old note 2012-08-17 17:03:40 -07:00
Jason Short 7ac4d06d3f ACM: made target bearing the lead filtered location
Had some major nav trouble from crosstrack if I used the laggy position.
2012-08-16 15:38:25 -07:00
rmackay9 48b7d26c5d 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 5f2c662fc9 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 2cc27b9804 ACM: Switched to filtered loc 2012-08-14 14:11:52 -07:00
Jason Short 0688eee9bc 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 1980e0464c ACM: navigation - Alt cleanup, fast corner support 2012-08-09 16:59:44 -07:00
Andrew Tridgell 295a9ce39c ACM: change to use get_bearing_cd() instead of get_bearing() 2012-08-08 12:12:30 +10:00
Jason Short 6177a1f5de Added minimum speed for RTL 2012-07-20 13:27:35 -07:00
Jason Short 676f02da7c Arducopter: Adjusted speed of climb to not stall out before hitting peak 2012-07-19 17:53:49 -07:00
Jason Short 05a2d3ae35 Arducopter: Fix compile issue 2012-07-19 10:09:16 -07:00
Jason Short ec1d400adf Arducopter: Slower WP deceleration for RTL and WP navigation
Slower descent and slightly faster ascent
2012-07-19 09:50:18 -07:00
Jason Short f29aa0dc25 Arducopter
upped nav max to 32deg from 30
renamed calc_desired_speed to get_desired_speed
Added get_desired_climb_rate function to do smooth transitions in altitude
modified get_altitude_error to override the older altitude manager.
2012-07-18 22:57:11 -07:00