Commit Graph

187 Commits

Author SHA1 Message Date
Randy Mackay 1ee825ee9a Copter: move alt and wp checking to AC_WPNAV
RTL fix so that if it starts rtl-ing from above 80m it returns home
while descending instead of descending at initial position.
add get and set_target_alt_for_reporting
2013-04-14 10:39:23 +09:00
Randy Mackay a65960a009 Copter: use velocity based set_loiter_target 2013-04-14 10:38:28 +09:00
Randy Mackay 4de5f67a91 Copter: replace wp_nav.get_target_alt with get_destination_alt 2013-04-14 10:38:17 +09:00
Randy Mackay 5b93990e41 Copter: removed next_WP
Use the wp_nav.get_target_alt or controller_desired_alt in it's place
2013-04-14 10:38:07 +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 58ed8cd544 Copter: replace set_next_WP with direct call to wp_nav 2013-04-14 10:37:55 +09:00
Randy Mackay 49828eba7d Copter: integrate AC_WPNav 2013-04-14 10:37:48 +09:00
Randy Mackay cdb532a594 Copter: bug fix for loiter target 2013-04-11 18:24:20 +09:00
Randy Mackay 95d944f610 Copter: Jason's bug fix for loiter's set_next_WP_latlon 2013-04-05 13:46:07 +09:00
Randy Mackay 777c6a308e AP_InertialNav: use shared GRAVITY_MSS constant 2013-04-05 11:48:41 +09:00
Andrew Tridgell b280857025 Copter: use common angle wrap code 2013-03-29 13:14:31 +11:00
Randy Mackay 61e29173e3 Copter: remove unused crosstrack variables and parameters
Cross track is still calculated internally to the wpnav controller so we
should move this to a library and still report it to the ground station
2013-03-17 16:46:31 +09:00
Randy Mackay 150046f2b8 Copter: GPS Failsafe implemented
Switches to LAND mode 5 seconds after losing GPS if you're in a flight
mode that requires a GPS
2013-03-16 17:27:46 +09:00
Randy Mackay 5380973225 Copter: only start delay timer after reaching wp location and altitude 2013-03-06 12:50:41 +09:00
Randy Mackay e0506bd622 Copter: inav circle initial implementation 2013-02-26 11:35:35 +09:00
Randy Mackay cbde042ec5 Copter: remove non-inav loiter and wp controllers
lon_speed, lat_speed changed to float
do_takeoff, do_land now set roll-pitch, yaw and nav modes specifically
removed fast_corners functionality (may need to be reimplemented with
new inertial nav controllers)
2013-02-24 14:41:52 +09:00
Randy Mackay 6f27bc7ae5 Copter: remove filters from inav loiter 2013-02-24 14:41:44 +09:00
Randy Mackay 1410063a14 Copter: new ROLL_PITCH_WP_INAV roll-pitch mode
small corrections to allow waypoints to work with new inertial nav wp
controller
2013-02-24 14:41:40 +09:00
Randy Mackay 67c69a19ee Copter: remove baro-only alt hold
Saves 8 bytes of memory and more importantly simplifies the alt hold
calculations
2013-02-24 14:41:29 +09:00
Randy Mackay 37d3e1d7e4 Copter: add zero slope checks to wpinav
also added RTL fix to set wpinav target explicitly
2013-02-24 14:41:25 +09:00
Randy Mackay 53ab1d5d9b Copter: add advance track call to actually move towards waypoint
Also added unrelated check that waypoint is valid before updating
waypoint distance.
2013-02-24 14:41:17 +09:00
Randy Mackay fcf102b2cf Copter: inertial nav waypoint controller
#define added to allow compile time selection of traditional or inav
based loiter and wp controllers
2013-02-24 14:41:09 +09:00
Randy Mackay d2767b911c AP_Math: switch get_distance_cm to return uint32_t
Includes changes required on ArduCopter and ArduPlane side as well
2013-01-26 17:04:12 +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 fd02cfe706 Copter: added set_nav_mode to control initialisation of nav controllers
Renamed run_navigation_controllers() to run_autopilot()
Renamed update_nav_wp() to update_nav_mode()
Renamed wp_control to nav_mode to be more consistent with roll-pitch,
yaw and throttle controllers
2013-01-25 15:16:29 +09:00
Robert Lefebvre dde713aaa5 Arducopter: Backing out my changes for a new Loiter Repositioning mode. Leonard and Jonathan's work will trump this. 2013-01-20 21:32: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 04677bfb95 Copter: constrain auto roll and pitch to 45 degrees 2013-01-15 12:17:32 +09:00
jschall d6b3d370c3 Correct spelling of run_navigation_contollers 2013-01-14 16:45:15 -08:00
Randy Mackay df2137ed72 Copter: constrain loiter so that it never commands more than 45 degrees of lean in lat or lon directions 2013-01-14 13:34:19 +09:00
Andrew Tridgell 860f4b2605 Copter: merge the latest 2.9 changes into master 2013-01-08 14:37:40 -08:00
rmackay9 576af6d487 ArduCopter: bug fix to althold desired rate calculation. Fix from Jonathan. 2013-01-02 09:55:37 +11:00
rmackay9 e77b54c7dc ArduCopter: bug fix to GUIDED mode. Now checks that desired altitude was reached before deciding the waypoint is complete. 2013-01-02 09:24:31 +11:00
Craig@3DR e350bfbba8 Removed 2 more degree symbols from comments 2013-01-02 09:20:08 +11:00
Robert Lefebvre 6e64b1b357 ACM: Precision Loiter RePositioning code.
Protected behind a #define
2013-01-02 09:19:39 +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 4dfe3a2d73 ArduCopter: remove weird character from navigation.pde 2013-01-02 09:11:25 +11:00
Jason Short 19ae5c30eb ACM : Formatting 2012-12-13 20:12:39 -08:00
rmackay9 dadad8677e 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 f522ef078e 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 154e3c33f7 ArduCopter, AP_InertialNav: consolidated ThirdOrderComplementaryFilter into AP_InertialNav to save about 200bytes of RAM 2012-12-10 00:43:11 +09:00
rmackay9 8c2423f618 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 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 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 7035529953 ArduCopter: remove unused get_desired_climb_rate function 2012-12-06 10:31:09 +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 8c18a60766 ACM: Small fix to Yaw Look Ahead 2012-12-04 14:50:14 -05:00
Robert Lefebvre 315a7e8000 ACM: Yaw Look Ahead Changes 2012-12-04 13:26:41 -05:00
Andrew Tridgell bcae83c4f6 ACM: make it possible to run CLI on radio port in ArduCopter 2012-11-21 21:41:34 +11:00