Commit Graph

1821 Commits

Author SHA1 Message Date
rmackay9
53fc4a9287 ArduCopter: remove unused g_gps_null pointer to save 2 bytes 2012-12-22 14:22:13 +09:00
rmackay9
085425fdbf ArduCopter: bug fix to accel based throttle controller (was using m/s instead of cm/s) 2012-12-22 14:21:25 +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
rmackay9
ecb388059e ArduCopter: add AUTO_VELZ_MIN, AUTO_VELZ_MAX and PILOT_VELZ_MAX to allow better control of climb/descent rate in auto and manual throttle modes 2012-12-22 12:52:49 +09:00
Craig@3DR
e882a19bb7 Global change all references from
GPS_PROTOCOL_MTK16
to
GPS_PROTOCOL_MTK19
2012-12-21 11:19:32 -08:00
rmackay9
ac66d7cac2 ArduCopter: on throttle failsafe, only initiate RTL if we are at least 15m from home 2012-12-21 14:39:48 +09:00
rmackay9
c7a0a64eae ArduCopter: use inertial nav for current altitude and climb rate 2012-12-21 14:07:18 +09:00
rmackay9
93063a812a ArduCopter: move gcs_check function (which sends to ground station) to run when 50hz loop is not running
Also removed redundant heartbeat message
2012-12-20 15:54:19 +09:00
rmackay9
d430903fcd ArduCopter: remove duplicate (?) send of MSG_EXTENDED_STATUS1 2012-12-20 12:57:07 +09:00
rmackay9
9706193463 ArduCopter: remove unused variable last_5hz 2012-12-20 11:37:06 +09:00
rmackay9
415029fdf5 ArduCopter: remove unnecessary "Initialising APM message..." 2012-12-20 11:35:04 +09:00
Jason Short
53acb324db ACM: Restore Multi-mode support 2012-12-19 08:08:59 -08:00
rmackay9
e13cea03ea ArduCopter: restore auto-trim method but now use AHRS.add_trim 2012-12-20 00:06:20 +09:00
Craig@3DR
ae72238beb Removed 2 more degree symbols from comments 2012-12-18 13:42:42 -08:00
rmackay9
465d54e541 ArduCopter: change GPS dataflash message to output unfiltered gps lat and lon 2012-12-18 23:44:51 +09:00
rmackay9
200389dcc2 ArduCopter: ensure RTL performs a land if a failsafe has been triggered 2012-12-17 22:12:24 +09:00
Robert Lefebvre
f48ec39cfa ACM: Precision Loiter RePositioning code.
Protected behind a #define
2012-12-17 07:42:28 -05:00
rmackay9
7bf3296425 ArduCopter: remove unused wait_for_yes function 2012-12-17 17:52:04 +09:00
rmackay9
3be100469b ArduCopter: remove unused rc_override variables to save 21 bytes 2012-12-17 17:04:51 +09:00
rmackay9
889a19f790 ArduCopter: move scaleLongUp and scaleLongDown initialisation to init_home 2012-12-17 16:54:03 +09: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
1332ed3b5c ArduCopter: restore initial climb to RTL 2012-12-17 16:17:49 +09:00
rmackay9
c1abd96ef2 ArduCopter: limit output throttle to 800 only for TRI which does not have the new stability patch 2012-12-17 15:29:11 +09:00
rmackay9
68d6eee1e7 ArduCopter: increase accel based throttle PIDs and add D term to rate based throttle 2012-12-17 14:46:30 +09:00
rmackay9
e3ee865dc0 ArduCopter: Leonard Hall's changes to alt hold including adding low pass filter to climb rate
get_throttle_rate_stabilized changed to simply update the target altitude instead of talking directly to the rate controller.
get_throttle_althold changed to use sqrt of distance when calculating the desired rate towards the target altitude.
added reset of accel based throttle PID's I term.
unrelated small bug fix from Randy to allow CH6 tuning of throttle rate D term.
2012-12-17 14:36:05 +09:00
rmackay9
d8ea210019 ArduCopter: allow tuning of the Throttle Rate D term 2012-12-15 13:32:07 +09:00
Robert Lefebvre
b83049bdda ACM: Trying to set a default MPU6K filter rate of 10Hz for TradHeli. Doesn't Work. 2012-12-13 14:54:14 -05:00
rmackay9
2656997714 ArduCopter: move gcs updates to run only when there are 4ms of spare time before the next 100hz iteration starts 2012-12-13 23:09:26 +09:00
rmackay9
7b4f311f28 ArduCopter: remove throttle limit of 800 for quads, hexas and octacopters
Note: Y6 and OctaQuads still have the 800 limit because they do not have the latest stability patch
2012-12-13 20:30:23 +09:00
rmackay9
2e78977499 ArduCopter: bug fix so AP_Limits does not use up memory if it is disabled 2012-12-13 16:07:34 +09:00
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
ad14e727e2 ArduCopter: bug fix for compass.accumulate check in main loop (millis vs micros issue) 2012-12-12 23:29:57 +09:00
rmackay9
8d75022d58 ArduCopter: allow GUIDED mode roll-pitch, yaw and throttle control modes to be overridden 2012-12-12 23:28:26 +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
e9c1500f33 ArduCopter: clear ahrs roll and pitch trims after an accel level command 2012-12-12 17:17:09 +09:00
rmackay9
ff9902c5d6 ArduCopter: updated accel based throttle to use ahrs's get_accel_ef method
Also removed slow low pass filter meant to correct for accelerometer calibration.  This is no longer required now that we have the improved calibration method.
2012-12-12 16:29:46 +09:00
rmackay9
ee164b6073 ArduCopter: remove weird character from navigation.pde 2012-12-12 11:05:16 +09:00
Robert Lefebvre
0537dcd4cc ACM: TradHeli
Change name of attitude rate feed-forward parameters.
2012-12-10 21:02:16 -05:00
rmackay9
d9bec28c02 ArduCopter: create 2.9 branch and update firmware version 2012-12-11 00:24:34 +09:00
rmackay9
b170da34ec ArduCopter: only attempt to change settings of optical flow sensor if it has been successfully initialised 2012-12-11 00:14:29 +09:00
rmackay9
628fb1da15 ArduCopter: fix Failed to Init Optflow message at startup 2012-12-11 00:09:45 +09:00
rmackay9
770e1b97f2 ArduCopter: renamed BATT_FAILSAFE to FS_BATT_ENABLE 2012-12-10 23:47:14 +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
93fa3fbc69 ArduCopter: added ACRO_TRAINER parameter to allow enabling/disabling the acro training function which will bring the roll back to within +- 45 degrees 2012-12-10 22:27:46 +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
709dc426f9 ArduCopter: remove ThirdOrderCompFilter from list of includes 2012-12-10 09:14:44 +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
97153c32d0 ArduCopter: reduce Rate Roll/Pitch P to 0.150 (was 0.175) and increase I to 0.1 (was 0.01) 2012-12-09 18:08:45 +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
8af9f6ed46 ArduCopter: add comments to tuning parameters.
Use RC_CHANNEL types as defined by RC_Channel library.
Remove unused definitions.
2012-12-09 16:44:42 +09:00
rmackay9
ea80a2d0c8 ArduCopter: add comments at the top of many navigation functions 2012-12-09 15:50:50 +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
618bd1c296 ArduCopter: allow alt hold to be engaged with alt < 1m because sometimes we get baro drift.
Also initialisation of target altitude is done in set_throttle_mode function.
2012-12-09 14:48:01 +09:00
rmackay9
a4ee5d2c81 ArduCopter, AP_InertialSensor: restore mpu6k sample rate to 200hz but keep default filtering at 42hz. 2012-12-09 14:27:33 +09:00
Robert Lefebvre
39013a33bc ACM: Adding Pre-Compiler Define for Stabilize Throttle Mode. 2012-12-08 20:41:05 -05:00
Robert Lefebvre
083c451ec6 ACM: TradHeli
Fix to make update_throttle_cruise work with stab_throttle scaling.
2012-12-08 15:12:39 -05:00
Robert Lefebvre
c6537ae6e3 ACM: Code Cleanup 2012-12-08 14:49:38 -05:00
rmackay9
90f9b8c076 ArduCopter: remove debug related to yaw mode used for alt hold 2012-12-08 14:24: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
6596f1728a ArduCopter: removed unused and out-of-date #defines from APM_Config.h 2012-12-08 13:38:39 +09:00
rmackay9
b973d50d79 ArduCopter: remove some unused #defines 2012-12-07 15:17:35 +09:00
rmackay9
63a9913278 ArduCopter: InertialNav time constant CH6 tuning changed to only update enabled axis 2012-12-07 13:01:40 +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
80d9c76009 ArduCopter: added CH7 option to trigger camera
Restructured reading of channel 7 into a switch statement.
2012-12-06 17:47:01 +09:00
rmackay9
73b7d1deca ArduCopter: update comments related to CH7 switch options 2012-12-06 17:40:36 +09:00
rmackay9
e1a351552f ArduCopter: maintain loiter control even below 1m while landing 2012-12-06 12:40:53 +09:00
rmackay9
c734a42e15 ArduCopter: adjusted pid_throttle_accel dt to 0.01 (100hz) 2012-12-06 10:32:12 +09:00
rmackay9
9c0984c505 ArduCopter: bug fix - initialise inertial nav 2012-12-06 10:32:07 +09:00
rmackay9
5551f092be ArduCopter: disable INERTIAL_NAV_XY by default 2012-12-06 10:32:02 +09:00
rmackay9
bdf236ef38 ArduCopter: allow accel based throttle controller to be enabled/disabled with the new THR_ACC_ENABLE parameter.
When disabled the original velocity based throttle controller is used.
2012-12-06 10:31:57 +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
9447d08fdd ArduCopter: increase CONTROL_SWITCH_COUNTER so that flight mode switch must be changed for at least 1/10th of a second 2012-12-06 10:31:46 +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
450b6e13a4 ArduCopter: switch on INS in APM_Config.h (i.e. on by default for users uploading through Arduino IDE) 2012-12-06 10:31:36 +09:00
rmackay9
8a0faebb21 ArduCopter: pass linear altitude error to throttle rate controllers.
Previously the requested rate used the square root of the altitude error.

Scale pilot's desired vertical rate and acceleration based on ACCELERATION_MAX_Z and VELOCITY_MAX_Z #defines
2012-12-06 10:31:31 +09:00
rmackay9
89e737728c ArduCopter: add tuning of throttle rate controller's I term (THROTTLE_KI) 2012-12-06 10:31:25 +09:00
rmackay9
dc0b35da30 ArduCopter: restored landing detector to landing throttle mode.
Added LAND_SPEED parameter to control the rate of descent for the last 10m of a landing.
Added CH6 tuning for accel based throttle controller.
2012-12-06 10:31:20 +09:00
rmackay9
b26f2861ff ArduCopter: removed unused AUTO_THROTTLE_HOLD #define 2012-12-06 10:31:15 +09:00
rmackay9
ea9f357dc0 ArduCopter: remove unused get_desired_climb_rate function 2012-12-06 10:31:09 +09:00
rmackay9
e629fe2eb0 ArduCopter: add set_throttle_mode to better control initialisation of variables 2012-12-06 10:31:04 +09:00
rmackay9
1285198b71 ArduCopter: added back in angle boost and recombined for heli and multicopter 2012-12-06 10:30:55 +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
5863c737a1 ACM: TradHeli
Fixes for Attitude rate controllers.
2012-12-04 14:42:04 -05:00
Robert Lefebvre
b225bc8cb8 ACM: TradHeli
Creating Rate Feed-Forward Parameters
2012-12-04 13:47:38 -05:00
Robert Lefebvre
45e6e2bc9a ACM: TradHeli APM_Config.h changes 2012-12-04 13:32:40 -05:00
Robert Lefebvre
fdcf966df7 ACM: Yaw Look Ahead Changes 2012-12-04 13:26:41 -05:00
Robert Lefebvre
ac8a6b7c3e ACM: Code Cleanup 2012-11-30 17:05:12 -05:00
rmackay9
f7a05f577e ArduCopter: bug fix - increase mpu6k sample rate to 100hz 2012-11-30 23:49:18 +09:00
Andrew Tridgell
45e62add9f Copter: update ArduCopter for new ins interface 2012-11-30 07:15:18 +11:00
Michael Oborne
da3398d41d AC add ability to start new accel_scale via mavlink 2012-11-28 21:38:58 +08:00
Andrew Tridgell
b3f93eab7d Copter: re-enable sending of GLOBAL_POSITION_INT message
this gives important raw GPS velocity information, plus relative and
absolute height
2012-11-28 11:26:19 +11:00
Robert Lefebvre
4463150122 ACM: TradHeli
Bringing in Low Pass Filter for Rate Controllers
2012-11-26 21:51:23 -05:00
Robert Lefebvre
c78ecc4fd1 ACM: Creating Yaw_Look_Ahead yaw mode.
This function is not fully tested yet.
2012-11-26 21:37:13 -05:00
Robert Lefebvre
332b728ebf ACM: TradHeli
Bringing in Low Pas Filter
Commented out because it does not build.
Needs updates to Low Pass Filter Lib
2012-11-26 21:21:12 -05:00
Robert Lefebvre
a4ae24de6c ACM: Begin creation of TradHeli rate control.
May affect Multi-Rotors.
2012-11-26 21:02:41 -05:00