Commit Graph

452 Commits

Author SHA1 Message Date
Andrew Tridgell 9e986801c9 Copter: fixed SITL for ArduCopter 2012-12-20 14:52:34 +11:00
Pat Hickey d93d932831 ArduCopter: defines fixes
Conflicts:

	libraries/AP_Common/Arduino.mk
2012-12-20 14:52:28 +11:00
Pat Hickey 2aa4657315 ArduCopter: changes to use CONFIG_HIL_BOARD 2012-12-20 14:52:28 +11:00
rmackay9 56ceb230cb 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 0f7bb79d89 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 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 68ca123224 ArduCopter: remove some unused #defines 2012-12-07 15:17:35 +09:00
rmackay9 3a90fc77f9 ArduCopter: add dataflash logging of camera events 2012-12-07 00:57:08 +09:00
rmackay9 4ca27defb3 ArduCopter: update comments related to CH7 switch options 2012-12-06 17:40:36 +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 d7f76ebd87 ArduCopter: add tuning of throttle rate controller's I term (THROTTLE_KI) 2012-12-06 10:31:25 +09:00
rmackay9 7b4ed2d227 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 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 6b8c39dd10 ACM: Creating Yaw_Look_Ahead yaw mode.
This function is not fully tested yet.
2012-11-26 21:37:13 -05:00
Andrew Tridgell bcf740a82f ACM: support 16 character parameter names 2012-11-20 21:38:58 +11:00
Jason Short d2a5928c06 Ap state updates 2012-11-09 22:15:15 -08:00
rmackay9 1f801714e8 ArduCopter: incorporate new version of inertial navigation
Moved several navigation functions from ArduCopter.pde to navigation.pde
2012-11-07 19:21:31 +09:00
rmackay9 a1b4ec6d0e ArduCopter: move to use new INS library instead of IMU library 2012-11-07 19:21:09 +09:00
Andrew Tridgell 9592be5af7 ACM: saved some more memory for strings 2012-10-22 18:57:08 +11:00
Robert Lefebvre 592f4040fd Changed RLT Yaw Mode for TradHeli. Also a few comment cleanups. 2012-10-18 16:39:05 -04:00
rmackay9 95763e610b ArduCopter: allow DMP to run in parallel with DCM
Parallel DMP can be enabled by #define SECONDARY_DMP_ENABLED in APM_Config.h
New DMP dataflash log type added to allow easy comparison with DCM
2012-09-30 00:25:40 +09:00
rmackay9 bae53807b2 ArduCopter: tiny formatting change in defines.h 2012-09-27 17:40:54 +09:00
Jason Short 34e07c826f ACM : Added centralized Iterm logging at a lower rate. Logs all iterms. 2012-09-10 20:26:48 -07:00
uncrustify b9ba41c12a uncrustify ArduCopter/defines.h 2012-08-21 18:57:21 -07:00
Jason Short 11b7475ff9 ACM : Added CH7 multimode triggers, split Toy mode into two 2012-08-11 22:37:26 -07:00
Jason Short 07bd1940e7 ACM Defines.h -added Toy mixer enums 2012-08-09 16:59:43 -07:00
rmackay9 014f5aae99 ArduCopter: added DMP_ENABLE #define and CH6 tuning value for AHRS_KP 2012-07-28 14:21:07 +09:00
Andreas M. Antonopoulos c73f7ef3ab AP_Limits library, provides modular "limits" such as altitude and geo-fencing. 2012-07-14 19:26:17 -07:00
Jason Short ab564b8a86 defines.h
removed Approach mode enumeration
2012-07-01 13:40:11 -07:00
Jason Short 0011190880 defines.h: Toy Mode defines for flight modes 2012-06-29 21:20:28 -07:00
Jason Short 5e4d28baf0 Added Toy mode to navigation 2012-06-29 21:20:27 -07:00
Jason Short 807c4ced34 Added Toy Mode defines 2012-06-25 23:08:25 -07:00
Robert Lefebvre 30e55533dc Change to increase Parameter space as we have run out.
This will decrease the max number of waypoints from 186
to 169.
2012-05-30 20:41:53 -04:00
Robert Lefebvre a285e2779f CopterLEDS changes for APM2 2012-05-15 10:07:03 -04:00
Andrew Tridgell 4fee26437b MAVLink: make ACM build with MAVLink 1.0 possible in arduino GUI 2012-04-24 22:24:58 +10:00
Adam M Rivera 97040a7b3a Merge branch 'master' of https://code.google.com/p/ardupilot-mega into auto-approach 2012-04-23 00:03:37 -05:00
rmackay9 c993049c48 ArduCopter - combined CH6_DAMP and CH6_STABILIZE_KD tuning parameters to avoid confusion 2012-04-21 23:24:57 +09:00
Adam M Rivera a3842734a9 Planner/defines.h: Updated the enumeration value for APPROACH so as not to disturb the order of the universe. 2012-04-18 10:32:01 -05:00
Adam M Rivera f9affb3295 Merge branch 'master' of https://code.google.com/p/ardupilot-mega into auto-approach
Conflicts:
	ArduCopter/Parameters.h
2012-04-16 10:23:01 -05:00
rmackay9 870b5e5f75 ArduCopter - CH6 Tuning - added AHRS_YAW_KP parameter as 30. Now you can easily set the amount that the mag is used to correct the gyro based yaw estimate in the DCM 2012-04-16 23:47:57 +09:00
Adam M Rivera 83fe6733d4 Defines: Added new control mode (APPROACH). 2012-04-15 16:52:32 -05:00
rmackay9 d70f5da5e0 ArduCopter - LEDS - define pins to be used for COPTER_LEDS.
Code by Robert Lefebvre
2012-04-12 22:55:36 +09:00
rmackay9 0efb0e5b4d ArduCopter - added CH6_STABILIZE_KD tuning value 2012-03-29 21:09:41 +09:00
rmackay9 599cea21bb Added multiple new tuning parameters to the inflight channel 6 tuning feature:
#define CH6_YAW_KI 24
        #define CH6_ACRO_KP 25
        #define CH6_YAW_RATE_KD 26
        #define CH6_LOITER_KI 27
        #define CH6_LOITER_RATE_KI 28
2012-03-28 23:58:58 +09:00
rmackay9 1f4cfb9333 ArduCopter - added PID log type. Implemented for Yaw stabilize and rate controllers. 2012-03-25 16:09:08 +09:00
Andrew Tridgell 547b4ed55b AHRS: adapt ArduCopter for new AHRS framework 2012-03-19 17:29:02 +11:00
Jason Short cb8729109c ACM: Added Loiter_D for tuning as #23 2012-03-10 14:17:16 -08:00
Andrew Tridgell 9a06d35772 make 'ENABLE' and 'ENABLED' mean the same things
users get this wrong far too often!
2012-03-10 10:34:33 +11:00
Andrew Tridgell 2596acc8eb ACM: removed incorrect mode definition 2012-03-10 10:34:30 +11:00
Andrew Tridgell a0ce202d87 ACM: added SIMSTATE, DCM and HWSTATUS messages to ACM 2012-03-10 10:34:27 +11:00
Jason Short 0ce0c7c262 Added Loiter_rate_tuning 2012-02-26 11:33:36 -08:00
Andrew Tridgell 6929226b96 ACM: expanded EEPROM parameter area by 256 bytes 2012-02-18 10:51:57 +11:00
Jason Short 0075901f77 upped rate loop to 250hz 2012-02-17 15:23:59 -08:00
Andrew Tridgell 617082769a go back to 1024 bytes for variables in EEPROM 2012-02-13 16:22:52 +11:00
Andrew Tridgell 16417b651e the ACM parameters have a max size of 1114 bytes
to ensure that all parameters can be saved, expand parameter area by
256 bytes
2012-02-13 16:22:52 +11:00
Pat Hickey 470fd8788e ArduCopter Channel Config: config vars for user override of MOT_n mapping
* config variable CONFIG_CHANNELS has possible values
  CHANNEL_CONFIG_DEFAULT or CHANNEL_CONFIG_CUSTOM
* config_channels.h only provides APM1/APM2 mapping when
  CONFIG_CHANNELS == CHANNEL_CONFIG_DEFAULT
2012-02-11 16:05:51 -08:00
Pat Hickey b245265669 Arducopter Frames: revert to old HEXA_FRAME and OCTA_FRAME defines.
* HEXA_X_FRAME and HEXA_PLUS_FRAME merged back into HEXA_FRAME
* OCTA_V_FRAME merged back into OCTA_FRAME
2012-01-31 18:18:13 -08:00
Pat Hickey 0e9294538b Add Max's changes for new MOT mappings. Defines new FRAME_CONFIG types.
* HEXA_FRAME has been eliminated and changed to HEXA_X_FRAME and
  HEXA_PLUS_FRAME
* OCTA_FRAME stays the same name for X and +, but the V frame
  configuration requires new OCTA_V_FRAME name.
2012-01-31 18:18:13 -08:00
Jason Short f225efef9f tuning 2012-01-30 21:13:03 -08:00
Randy Mackay 122623f64b OpticalFlow - added OF_LOITER flightmode 2012-01-28 09:27:16 +09:00
Randy Mackay 2c906b7b27 OpticalFlow - replaced PI controller with PID controller.
Modified optical flow hold to use aggregated position instead of speed.
2012-01-25 21:55:14 +09:00
Michael Oborne 1bebb9452b AC sync battery code with arduplane 2012-01-21 06:29:09 +08:00
Doug Weibel ed9f7cb1b6 Update battery monitoring code for ArduCopter
Fixes compatibility for APM2.  Also a significant update to the battery monitoring code:  We previously had monitoring modes for individual cell voltages for 3 and 4 cell lipos.  These have been removed as they were never really supported (the cell voltages were computed but were not reported or recorded anywhere).  Also, some clean-up/prep work was done for supporting monitoring 2 separate battery packs.  The CLI battery and current monitoring tests were consolidated into 1 test.
changed
2012-01-15 17:10:02 -07:00
Jason Short dab4fb43d4 Added altitude change flags 2012-01-10 23:42:26 -08:00
Randy Mackay f68d23d91e ArduCopter - added ROLL_PITCH_STABLE_OF (i.e. Stabilised Roll/Pitch + adjustments based on optical flow)
Removed optical flow from regular loiter for now until it's tested.
2012-01-09 13:53:54 +09:00
Jason Short faa9dd43cf scaled to 0-1023 2012-01-06 21:43:37 -08:00
Jason Short b28ae04e0d Removed unused options 2012-01-04 09:28:36 -08:00
Jason Short 244ca98264 Added Dampening term for tuning 2011-12-29 23:02:02 -08:00
Jason Short ca8f71a705 used for testing 2011-12-23 14:42:50 -08:00
Pat Hickey f1624621b3 ArduCopter Logging: DISABLED means DISABLED again; CONFIG_LOGGING added
CONFIG_LOGGING selects LOGGING_SIMPLE and LOGGING_VERBOSE. Verbose
logging is the default, implemented in Log.pde. Simple logging is
optional, but the default for the 1280 build, implemented in
Log_simple.pde
2011-12-19 21:04:51 -08:00
Jason Short 3446744ae9 Addition of nav mode that tries to maintain level 2011-12-14 22:08:42 -08:00
Pat Hickey 62844d8ddc ArduCopter: added config.h and defines.h to support CONFIG_BARO 2011-12-11 15:21:09 -08:00
Randy Mackay 67855b207d Arducopter, RangeFinder - added SONAR_TYPE parameter and properly support the XL (default), LV and long distance XL (aka XLL) sonar types 2011-12-11 16:40:59 +09:00
Jason Short 2b8280e533 Added enumeration for Land 2011-12-10 10:19:20 -08:00
Jason Short 401c985572 Added Deg to rad, rad to deg * 100 to save a float calc 2011-12-03 15:29:33 -08:00
Andrew Tridgell 38c85c44ae ArduCopter: rename purple to APM2 2011-11-25 20:00:19 -08:00
Pat Hickey 3f2692d1da purple: added configuration logic for APM1 versus purple hardware
This abstracts the names for LED on/off (due to the different wiring
of LEDs on APM1 and purple), and adds the needed config defines for
the two hardware types
2011-11-25 20:00:16 -08:00
Pat Hickey 90c5eb8487 purple: added defines for APM hardware selection
we can now choose APM_HARDWARE_APM1 or APM_HARDWARE_PURPLE
2011-11-25 20:00:16 -08:00
Randy Mackay f397bae793 ArduCopter Alt Hold - Change to not run get_nav_throttle if manually adjusting altitude with manual_boost - removes possibility of I term running up
Tuning - added ability to modify altitude (position, not rate) controller
TradHeli - Fairly large change to how throttle is scaled and collective moves.
2011-11-20 22:30:42 +09:00
Jason Short 1e855503da renamed MASK_OPTIONS_RELATIVE_ALT 2011-11-20 00:22:52 -08:00
Jason Short 90bc03ef99 new DataLog message 2011-11-19 16:59:54 -08:00
Jason Short 35524f6da7 Added optimizations for radian calls to remove a division.
added a protection for entering AP modes without Home being set by GPS lock.
2011-11-19 11:08:13 -08:00
unknown c253996ea9 TradHeli - added TUNE value 13 to allow adjusting of external gyro gain using channel 6 2011-10-29 20:34:21 +09:00
Jason Short d551494b94 Added ability to dynamically set wp with toggle switch 2011-10-18 17:59:45 -07:00
Andrew Tridgell d89ae696ef merged the GCS updates from ArduPlane to ArduCopter
this removes all the non-MAVLink GCS options, and simplifies the HIL
and GCS code a lot. It also adds async sending of low priority GCS
text messages.
2011-10-11 20:53:43 +11:00
Jason Short de61e87128 Added ADC gyro Filtering for quads - this fixes a noise issue introduced into the controller
added Position mode
removed
Added back in the accelerometer experiment
Added filter_result boolean to enable filter on the fly
2011-09-29 23:27:23 -07:00
Jason Short 888e1119e8 Added Loiter P tuning as #12 2011-09-27 09:39:32 -07:00
Jason Short c91ad14e18 Fixed Timer overflow for throttle PI loop.
Moved look at home to update_nav where it belongs
2011-09-21 22:31:12 -07:00
Jason Short 0fba3e6742 Added Auto_trim to CH7 option 2011-09-21 16:24:09 -07:00
Jason Short 5ca50f1f01 Altered CIRCLE mode to allow Loiter_N_Turns to work in AP mode. 2011-09-21 13:19:36 -07:00
Jason Short 020062498b Edited CH7 options to include Do Nothing and RTL. 2011-09-20 10:37:50 -07:00
Andrew Tridgell dc23ad4275 MAVLink: merged in the stack saving changes from ArduPlane 2011-09-18 11:37:24 +10:00
Amilcar Lucas 227ce0a92d Merge some small misc improvements from APM_Camera branch 2011-09-17 20:25:31 +02:00
Jason Short 9c5cba56eb Added low voltage code flashing code. 2011-09-16 18:56:51 -07:00
Jason Short d29cfbcee3 Integration of optical flow
bug fixes for new Simple mode
increased Baro filter by 2 fields
2011-09-15 23:33:00 -07:00
Jason Short 1ce2308d11 Removed Simple Mode
Added Simple option to mode switch positions
removed unused OptFlow code
added reset lat and lon error
removed unused init_auto
Fixed log formatting
Added simple mode bitmask
removed pitchmax
added CLI setup for enabling Simple mode to any switch position
2011-09-14 13:58:18 -07:00
Amilcar Lucas d1a63db767 These defines got moved to the library 2011-09-12 21:32:05 +02:00
Jason Short 482844b87a Added Input Voltage value to params 2011-09-10 18:44:56 -07:00
Jason Short b4a51806bc Added Nav Rate tuning 2011-09-10 18:37:28 -07:00
Jason Short bb1b7b47a7 Fixed numbering issue with defines 2011-09-10 16:25:52 -07:00
Jason Short 02bfd43390 Fixes Alt hold mistake
Moves tuning into runtime definable param
Added more IMax to throttle

Signed-off-by: Jason Short <jasonshort@gmail.com>
2011-09-10 15:16:51 -07:00
Andrew Tridgell 1456a2a912 renamed top level directories
ArduCopterMega -> ArduCopter
added archives directory for old code
2011-09-09 11:27:41 +10:00