Commit Graph

207 Commits

Author SHA1 Message Date
Randy Mackay 45aeb1a921 Copter: split up loiter into 4 steps
Reduces disruption to the main loop but also introduces a delay of 30ms
to navigation output
2013-08-28 11:33:10 +09:00
Randy Mackay 05248738e2 Copter: bug fix for take-off in loiter 2013-07-28 18:18:43 +09:00
Randy Mackay c3daf78340 Copter: reset loiter target when landed 2013-07-28 18:18:41 +09:00
Randy Mackay 02b64e259d Copter: bug fix for descent during loiter_turns 2013-07-15 20:44:56 +09:00
Randy Mackay 345924ddec WPNav: replace LOITER_ACCEL_MAX with parameter
Also removed unused _lean_angle_max variable
2013-07-10 20:00:32 +09:00
Randy Mackay facd8fc89f Copter: calculate home position and bearing when we have 2D Fix 2013-06-25 22:23:26 +09:00
Olivier-ADLER f1bedc70ac Copter: SuperSimple mode bug
SuperSimple bearing was updated without checking for GPS 3D Fix availability.
2013-06-25 22:23:13 +09:00
Randy Mackay 272f0e5032 Copter: reduce twitch when entering CIRCLE mode
Set loiter target and prev iterations velocity when circle mode is
started
Start circling from projected stopping point
2013-06-15 18:18:30 +09:00
Randy Mackay 1b08f12d53 Circle: allow counter clockwise rotation 2013-06-03 22:12:56 +09:00
Randy Mackay 99f5462a03 Copter: circle mode fixes 2013-06-01 18:21:30 +09:00
Randy Mackay 4ad395e7be Copter: merge WPNAV into NTUN dataflash message 2013-05-19 22:53:35 +09:00
Randy Mackay 870b9b0fbb Copter: only run nav controllers when auto-armed
This stops run-up in target position and nav controller I terms ahead of
throttle being raised
2013-05-10 10:46:17 +09:00
Randy Mackay 74dca6da22 Copter: move update_commands to run_autopilot fn
update_commands was being run in the medium_loop counter but it is
easier to understand the flow of the code if it is consolidated along
with other autopilot calls.
2013-04-24 20:59:49 +09:00
Andrew Tridgell 5ad9deecfb Copter: cleanup some bit if tests to be clearer
Pair-Programmed-With: Randy Mackay <rmackay9@yahoo.com>
2013-04-23 23:03:34 +10:00
Andrew Tridgell 82c604dd67 Copter: more constrain fixes 2013-04-22 13:26:49 +10:00
Randy Mackay 37abfdc65a Copter: make CIRCLE_RATE a tunable parameter
Also bug fix to check of how many time it has rotated during a loiter
turns mission command
2013-04-20 12:03:55 +09:00
Randy Mackay 0b808abbed Copter: remove unused waypoint_valid function 2013-04-17 21:28:43 +09:00
Randy Mackay 8fe3e689f4 Copter: add WPNAV log message 2013-04-15 21:54:29 +09:00
Randy Mackay 629d23b7e2 Copter: remove WP_SPEED and WP_RADIUS parameters
AC_WPNav library has equivalent params with very similar names
2013-04-14 13:27:37 +09:00
Randy Mackay 700fb1b179 Copter: replace sin_yaw_y, cos_yaw_x in circle mode 2013-04-14 10:39:30 +09:00
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