Commit Graph

59 Commits

Author SHA1 Message Date
Michael du Breuil 7e1ed948f5 Copter: Cope with AC_PosControl renaming 2018-09-20 15:15:45 -07:00
Randy Mackay b5d722245a Copter: minor comment fix 2018-09-10 13:50:31 +09:00
Peter Barker 4e3bbe9311 Copter: move sanity check for rangefinder alt to within protected func
get_surface_tracking_climb_rate can do an additional check....
2018-06-06 08:33:56 +09:00
Peter Barker ab68e4fe8b Copter: log quiet-nan for rangefinder-desired-alt when not using it 2018-06-06 08:33:56 +09:00
Peter Barker 8648db06b4 Copter: create autoyaw.cpp from all the bits of Copter::Mode::AutoYaw 2018-04-18 13:27:43 +09:00
Peter Barker 948b90ed97 Copter: rename roi_WP to just roi
A Vector3f is not a waypoint.

This should really be "Point Of Interest" rather than "Region Of
Interest"
2018-04-18 13:27:43 +09:00
Peter Barker ba8b3e2415 Copter: create an AutoYaw helper object to hold auto-yaw state 2018-04-18 13:27:43 +09:00
Leonard Hall 9544b1763b Copter: replace smoothing gain with AC_AttitudeControl::set_input_tc 2018-03-16 13:50:57 +09:00
Ebin 20995b909f Copter: Moved get_pilot_desired_lean_angles to mode.cpp 2018-03-14 09:33:39 +09:00
Andrew Tridgell af4f0c29ba Copter: enable TMODE (ToyMode) support
this is for the skyviper button based transmitter control
2018-02-08 17:36:33 +11:00
Randy Mackay 8d6f8e4d9c Copter: move pos-control pids to pos-control library 2018-01-23 12:00:43 +09:00
Randy Mackay e85b1ac740 Copter: pass dt to avoidance calls 2018-01-16 12:13:48 +09:00
Peter Barker 7b637334f4 Copter: eliminate mode_has_manual_throttle 2017-12-06 10:09:58 +09:00
Dr.-Ing. Amilcar Do Carmo Lucas bd027e4fcb Copter: Move some common functions to AP_Math (NFC) 2017-12-05 08:54:49 +09:00
ChrisBird caaeae3d0a Copter: Separate max ascent and descent speeds
Added equivalent parameters to WPNAV_SPEED_UP and WPNAV_SPEED_DN

New parameters named:
PILOT_SPEED_UP (technically renamed PILOT_VELZ_MAX)
PILOT_SPEED_DN

Removed parameter PILOT_VELZ_MAX (technically renamed to PILOT_SPEED_UP).

Flight Modes impacted:
ALTHOLD
AUTOTUNE
CIRCLE
LOITER
POSHOLD
SPORT
TAKEOFF

Update a section in GUIDED mode but I don't think it is ever used but update just in case.

It will use the PILOT_SPEED_UP for ascending max velocity.  For down it will check if
it is 0, if so then it will PILOT_SPEED_UP instead, if non zero it will use PILOT_SPEED_DN.
This retains current behavior and gives the flexibility to change it if desired.
2017-11-09 09:03:54 +09:00
Peter Barker 1d70a337dd Copter: remove unused desired_climb_rate variable 2017-03-09 19:52:58 +11:00
Randy Mackay cb1f7ba4bb Copter: remove setting position control's altitude max
AC_Avoid now takes responsibility for enforcing the alt limit and accesses inertial nav's limit directly
2017-01-18 09:35:47 +09:00
Randy Mackay b15d341850 Copter: add avoidance adjusted climb rate 2017-01-18 09:35:47 +09:00
Andrew Tridgell 0f6d0c5ba9 Copter: combined tri, single, coax and multicopter into a single build
this allows copter to be just 2 builds, one for heli, and one for
everything else
2017-01-12 17:39:37 +11:00
Andrew Tridgell bcea3ac8d4 Copter: handle rangefinder glitches in alt tracking
this handles glitches from the rangefinder when tracking the
ground. It requires 3 readings in a row to settle on a new target
altitude

thanks to discussions with Leonard and Randy
2016-11-28 17:36:01 +11:00
Leonard Hall 0a6714f4ae Copter: rename variable ROLL_PITCH_YAW_INPUT_MAX
No functional change
2016-10-26 20:59:43 +09:00
Leonard Hall 2698f14d39 Copter: apply yaw expo to all modes 2016-10-26 20:59:33 +09:00
Mathieu OTHACEHE 152edf7189 Global: remove mode line from headers
Using a global .dir-locals.el file is a better alternative than
reincluding the same emacs header in every file of the project.
2016-10-24 09:42:01 -02:00
Leonard Hall fec24437f2 Copter: load accel throttle I term from attitude controller input
Previously we loaded up the I term from the pilot's input but a more reliable method is to get what was passed into the attitude controller.  In particular the addition of the acro-thr-mid parameter means the pilot's input must be interpreted differently for different flight modes.
2016-10-15 11:27:53 +09:00
Leonard Hall 5c47f3f9e5 Copter: add acro throttle and yaw expo and smoother manual pilot throttle 2016-10-15 11:27:53 +09:00
Randy Mackay 35864c6226 Copter: move check_ekf_reset to ekf_check.cpp
No functional change
2016-10-10 16:40:08 +09:00
Randy Mackay f4fee69f29 Copter: add div-by-zero check to get_pilot_desired_throttle
This divide by zero is only possible if there was a coding error in the setup of the throttle channel but added to make Covarity happy
2016-08-08 12:14:02 +09:00
Randy Mackay c3d71f733c Copter: remove get_takeoff_trigger_throttle
get_pilot_desired_climbrate can be used instead.
2016-08-05 12:40:37 +09:00
Randy Mackay d1e257d5b6 Copter: remove unused get_throttle_pre_takeoff 2016-08-05 12:40:37 +09:00
Randy Mackay b61ae1a4a1 Copter: log EKF yaw reset event 2016-06-24 18:12:30 +09:00
Leonard Hall 7d54c268f6 Copter: consolidate input_euler_angle calls to use smoothing gain
Previously we had _smooth and non-smooth methods in the attitude
controller but as part of the move to quaternions these have been replaced
by a single call which always takes a smoothing gain
2016-06-24 17:17:17 +09:00
Leonard Hall 48eb4cf674 Copter: remove THR_MID 2016-06-18 11:55:49 +09:00
Leonard Hall e9d8a28ec0 Copter: AP_Motor's throttle_hover replaces throttle_average 2016-06-18 11:55:49 +09:00
Randy Mackay 8171532dc5 Copter: allow rangefinder to be disabled from definition 2016-05-21 10:36:53 +09:00
Randy Mackay 5ac13c0355 Copter: move rangefinder variables into structure
moved in rangefinder_alt, rangefinder_alt_health and rangefinder_enabled
2016-05-21 10:36:53 +09:00
Randy Mackay 7689315ba2 Copter: rename sonar to rangefinder 2016-05-21 10:36:53 +09:00
dgrat 41661f815f AP_Math: Replace the pythagorous* functions with a variadic template
The new function can deal with a variable number of function parameters.
Additionally, I renamed the functions to norm(), because this is the
standard name used in several other projects.
2016-05-10 11:41:26 -03:00
Randy Mackay a5c55c3fbd Copter: fix get_non_takeoff_throttle
The throttle_mid parameter (for historic reason) is interpreted as a value that includes throttle_min.  This means we must subtract the throttle_min value from it when converting it to a throttle in the 0 to 1 range.
2016-05-07 12:21:41 +09:00
Randy Mackay 3c3b74adc8 Copter: remove slow_start from takeoff 2016-04-01 11:59:30 +09:00
Leonard Hall 7bcdc76655 Copter: get_pilot_desired_climb_rate accepts control_in as 0 to 1000
Previously the input was expected to be throttle_min (i.e. 130) to 1000
2016-04-01 11:59:30 +09:00
Leonard Hall 20debc962a Copter: update get_throttle_pre_takeoff for 0 to 1 range 2016-04-01 11:59:30 +09:00
Leonard Hall 37e6977813 Copter: update get_non_takeoff_throttle for 0 to 1 range 2016-04-01 11:59:30 +09:00
Leonard Hall 74983669be Copter: set_accel_throttle_I_from_pilot_throttle uses 0 to 1 range 2016-04-01 11:59:30 +09:00
Leonard Hall f8d7b677d4 Copter: update_thr_average uses 0 to 1 range 2016-04-01 11:59:30 +09:00
Leonard Hall fd2509f6ed Copter: get_pilot_desired_throttle outputs in 0 to 1 range 2016-04-01 11:59:30 +09:00
dgrat 5148e41c1a AP_Math: Cleaned macro definitions
Moved Definitions into a separate header. Replaced PI with M_PI and
removed the M_PI_*_F macros.
2016-02-27 02:51:33 -03:00
Jonathan Challinger dfab21171b Copter: call renamed functions in AC_AttitudeControl 2015-12-09 19:58:37 +09:00
Jonathan Challinger 9d8b0f3d58 Copter: call renamed functions in AC_AttitudeControl 2015-12-09 19:58:30 +09:00
Randy Mackay 317779f976 Copter: check_ekf_yaw_reset uses ahrs method 2015-09-24 16:57:47 +09:00
Jonathan Challinger e47175862a Copter: use modified getLastYawResetAngle function 2015-09-24 16:57:44 +09:00