Commit Graph

104 Commits

Author SHA1 Message Date
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 31fd9a22a3 ArduCopter: restore YAW to default AUTO_YAW mode instead of YAW_LOOK_AT_NEXT_WP mode 2012-12-12 23:27:45 +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 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 6cdcf5e737 ArduCopter: add YAW_OVR_BEHAVE to allow control of when autopilot takes back control of yaw after pilot overrides it during a mission 2012-12-09 18:04:31 +09:00
rmackay9 ea80a2d0c8 ArduCopter: add comments at the top of many navigation functions 2012-12-09 15:50: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 8378de6d8c ArduCopter: do_set_servo fix to resolve -1 being assigned to uint8_t 2012-12-07 12:58:44 +09:00
rmackay9 5c3ca64c12 ArduCopter: add dataflash logging of camera events 2012-12-07 00:57:08 +09:00
rmackay9 2cff551891 ArduCopter: allow triggering of camera from a mission 2012-12-06 23:48:30 +09:00
rmackay9 bfb033c52b ArduCopter: fix do_set_servo so that it works again 2012-12-06 20:18:33 +09:00
rmackay9 e1a351552f ArduCopter: maintain loiter control even below 1m while landing 2012-12-06 12:40:53 +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 e629fe2eb0 ArduCopter: add set_throttle_mode to better control initialisation of variables 2012-12-06 10:31:04 +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 76e9adb8d4 ACM: make it possible to run CLI on radio port in ArduCopter 2012-11-21 21:41:34 +11:00
Jason Short 3e905ec750 Ap state updates 2012-11-09 22:15:15 -08:00
Andrew Tridgell 61f85d05cc ACM: save another 20 bytes 2012-10-22 18:59:51 +11: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 9d5d9ce3fc ArduCopter: bug fix to ROI when no camera mount is specific 2012-10-08 12:31:10 +09:00
rmackay9 8f993cde2b ArduCopter: bug fix for ROI not working if user did not have a camera mount
Changed verify_nav_roi command to attempt to point at the target if our camera mount type is not pan_tilt nor pan_tilt_roll
2012-09-10 02:03:32 +09:00
uncrustify 1d56079ba2 uncrustify ArduCopter/commands_logic.pde 2012-08-21 19:19:50 -07:00
rmackay9 bd84f58f83 ArduCopter: removed unused icount variable from commands_logic.pde to reduce compiler warnings. 2012-08-18 16:04:23 +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 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 3432030f7f ACM : Commands Logic
Altitude cleanup
2012-08-09 16:59:43 -07:00
Andrew Tridgell 295a9ce39c ACM: change to use get_bearing_cd() instead of get_bearing() 2012-08-08 12:12:30 +10:00
rmackay9 40839fdea2 ArduCopter: Dan Gray's fix for Condition_Yaw
command_yaw_dir is an unsigned byte but was being set to a -ve number leading to very incorrect yaw target heading for counter clockwise turns.
command_yaw_end (i.e. turn's end target) was not being set if turn was of type "relative"
2012-08-07 06:43:10 -07:00
rmackay9 5318da9e0e ArduCopter: add support for MAVLink's MAV_CMD_NAV_ROI command
do_nav_roi and verify_nav_roi functions added to turn the copter and/or mount in response to a MAV_CMD_NAV_ROI way point
2012-07-25 11:02:54 +09:00
Jason Short 35144ccbf2 Arducopter: Added Slow_WP setting to regular wp navigation 2012-07-19 09:48:54 -07:00
Jason Short 16adaf12db Arducopter
increased landing authority
2012-07-18 22:57:10 -07:00
Jason Short c0a0e834e5 Arducopter:
Loiter unlimited can now travel to a WP and then loiter.
set_altitude for landing now set to 0
2012-07-18 22:57:10 -07:00
Jason Short bfce0ad9c5 Arducopter: Fix circle_WP 2012-07-12 09:22:20 -07:00
Jason Short 1a62d84288 Arducopter: Loiter unlimited fix 2012-07-12 08:52:49 -07:00
Jason Short 9de2c00d93 Arducopter: WP_radius
Switching to stored WP_radius in meters, just like Arduplane
2012-07-10 21:53:38 -07:00
Jason Short cf6082fc44 Arducopter : Force home alt to 0 2012-07-10 21:53:37 -07:00
Amilcar Lucas 8e14ebbc10 Merge the changes from APM_Camera branch into ArduCopter
Conflicts:

	ArduCopter/Camera.pde
	ArduCopter/Parameters.pde
2012-07-11 00:39:13 +02:00
Jason Short 8a2df85ee8 commands_logic: Removed some old unused code 2012-07-03 17:19:19 -07:00
Jason Short 9cd9dd168e RTL: Commands.pde
Removed do_approach function - now redundant
2012-07-01 13:40:11 -07:00
Jason Short 8c8f44e6f7 Arducopter: enabled RTL_altitude, renamed function to be more accurate 2012-07-01 13:40:11 -07:00
Jason Short 5b31f3ba27 moved detector to run until the throttle is low, then stop running. 2012-05-30 09:44:59 -07:00
Jason Short 42032f9845 Missed a Semicolon 2012-05-30 09:36:16 -07:00
Jason Short e6ee50f53d Altered the ground detector logic to no continuously run when landed 2012-05-30 09:34:31 -07:00
Robert Lefebvre df4246597f Updates to CopterLEDS
Creation of Nav Blink Function.
2012-05-22 09:58:37 -04:00
Adam M Rivera 3146c22ea8 commands_logic.pde: Added write to constrained value to EEPROM. 2012-04-16 14:03:33 -05:00
Adam M Rivera 03e11cf893 commands_logic: Allowed for an approach alt as low as 1m. Added a check to make sure we are currently above our target approach alt. 2012-04-16 10:11:50 -05:00
Adam M Rivera f27b5d538b ArduCopter, commands_logic: Updated logic to allow as low as 5m. 2012-04-15 19:50:05 -05:00
Adam M Rivera 0027c9253b commands_logic: Added check to make sure the do_approach method is not being used to land. 2012-04-15 16:57:49 -05:00
Adam M Rivera d12bf86876 commands_logic: Added do_approach() to set the new target alt based on the user defined value. 2012-04-15 16:53:25 -05:00
Jason Short 4b52dde882 set Slow WP option for RTL in Auto mode 2012-02-19 13:12:23 -08:00