Commit Graph

171 Commits

Author SHA1 Message Date
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 8bbc93bb04 Copter: added CH7 switch to enabling/disable the sonar in flight
This indirectly switches surface tracking on/off which is useful to
avoid tracking the tops of uneven objects when far above the ground
2013-01-14 14:00:08 +09:00
rmackay9 f25f1cb3bf ArduCopter: changed alt hold to use the sonar if enabled and healthy 2013-01-13 19:56:19 +11:00
Randy Mackay 87627d883b ArduCopter: use new logging method for remaining packet types
Additional changes include renaming RAW dataflash type to IMU
2013-01-13 00:17:44 +09:00
James Bielman ab37f833db MS5611: Fix CONFIG_MS5611_SERIAL definitions.
- Make sure the values are defined as integers.  We were always using
  SPI rather than using I2C when desired.
2013-01-09 11:19:51 -08:00
Andrew Tridgell b079a96eaf Copter: removed GPS_STATUS message
this message is huge, and completely pointless now that we have
num_satellites in GPS_RAW_INT
2013-01-05 20:39:31 +11:00
Andrew Tridgell c48714be16 Copter: enabled PX4 sensors 2013-01-05 20:39:31 +11:00
rmackay9 2181ec2ab0 ArduCopter: log watchdog event to dataflash 2013-01-02 09:55:37 +11:00
rmackay9 672fdfbf71 ArduCopter: added ERR dataflash message
Failsafe events changed to errors so they are more obvious.
Errors recorded to dataflash for failure to init compass and optical flow sensor.
Errors recorded for pwm failure.
Resolved a compile error when dataflash logging is disabled.
2013-01-02 09:55:37 +11:00
rmackay9 677b38a48e ArduCopter: first implementation of surface tracking using sonar
Note: not yet enabled as part of any flight mode
2013-01-02 09:55:37 +11:00
rmackay9 68b62abd38 ArduCopter with the new Camera and Relay classes for APM1 and APM2.
All changes by Sandro Benigno
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 0ed25cf719 Global change all references from
GPS_PROTOCOL_MTK16
to
GPS_PROTOCOL_MTK19
2013-01-02 09:24:31 +11:00
Jason Short 8b62c4630b ACM: Restore Multi-mode support 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 1b5ff6aac6 ArduCopter: restore initial climb to RTL 2013-01-02 09:19:17 +11:00
rmackay9 f4c50353b9 ArduCopter: allow tuning of the Throttle Rate D term 2013-01-02 09:16:48 +11:00
Andrew Tridgell 3c0440b0b4 Math: use common degrees() and radians() functions 2012-12-20 14:53:22 +11:00
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