Commit Graph

665 Commits

Author SHA1 Message Date
Randy Mackay 6ba9431be4 Copter: update firmware version and release notes ahead of -rc2 2013-05-13 22:16:25 +09:00
Andrew Tridgell c44fd42349 Copter: fixed RSSI reading on PX4
needed for different analog input scaling
2013-05-13 15:19:05 +10:00
Randy Mackay ad656c7e8a Copter: allow lat/lon to be specified for land 2013-05-10 22:37:15 +09:00
Randy Mackay b65d714675 Copter: set yaw-mode in do_loiter mission command 2013-05-10 10:51:46 +09:00
Randy Mackay ed5ddfd9db WPNav: initialise desired roll, pitch
bug-fix to resolve 1/10th second twitch when loiter or waypoint
controller are first engaged
2013-05-09 18:32:02 +09:00
Randy Mackay 0a148cce19 Copter: log target alt in meters 2013-05-08 16:41:16 +09:00
Randy Mackay ae2ad8e819 Copter: remove unused radius_of_earth constant 2013-05-05 13:13:48 +09:00
Randy Mackay 647a93e78e Copter: remove jerk when entering RTL or AUTO
Loiter target position was not being initialised properly.
Add a few more comments
2013-05-03 16:58:00 +09:00
Randy Mackay cca05ee8ae Copter: start dataflash logging when arming
Stop nearly empty logs from being produced.
Removed redundant armed bit from ap state.
2013-05-03 14:49:55 +09:00
Andrew Tridgell 55da049c69 Copter: fixes for AP_Baro_HIL 2013-05-02 15:09:16 +10:00
Andrew Tridgell 25c576cad7 Copter: replaced constrain() with constrain_float() 2013-05-02 10:26:49 +10:00
Randy Mackay d9601916ee Copter: update firmware version and release notes for 3.0.0-rc1 2013-05-01 17:53:11 +09:00
Randy Mackay 3aca35777f Copter: use mavlink fence message
Note: we should consider moving this send via mavlink into the fence
library
2013-05-01 17:06:58 +09:00
Randy Mackay bab9fa25e5 Copter: add GCS failsafe 2013-04-29 21:30:22 +09:00
Randy Mackay 76d0f7f74d Copter: fix compiler warning re unused float_int 2013-04-28 17:22:58 +09:00
Randy Mackay d146d6aaa6 Copter: restore update_altitude to run at 10hz 2013-04-28 17:15:13 +09:00
Randy Mackay 58d1da2d80 Copter: integrate AC_Fence in place of limits
Lesser functionality than limits but saves more than 150 bytes and it
works
2013-04-27 11:14:07 +09:00
Andrew Tridgell 300a8d2bbc Copter: support all 12 channels on PX4
last 4 channels are on the FMU pins
2013-04-25 20:10:53 +10: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
Randy Mackay 63a48f76e2 Copter: add pre-arm check of radio and accel
Only checks throttle channel and accelerometer scaling
2013-04-23 00:01:20 +09:00
Andrew Tridgell d5875676b1 Copter: use a reference to DCM matrix 2013-04-22 13:26:49 +10:00
Randy Mackay 2fc25da4c3 Copter: Leonard's fix for get_loiter_accel_to_lean_angle 2013-04-21 16:27:50 +09:00
Andrew Tridgell c53ede506d Copter: make if statement clearer 2013-04-21 07:25:52 +10:00
Andrew Tridgell 8b31f276a2 Copter: switch to block based logs for SITL 2013-04-20 20:45:51 +10:00
Randy Mackay a53e5f747b Copter: add fourth yaw behaviour, look-at-home
Added get_wp_yaw_mode to remove duplication of checks of the
WP_YAW_BEHAVIOR parameter
2013-04-20 15:36:24 +09:00
Andrew Tridgell 02c3083f60 Copter: print flight mode as string 2013-04-20 15:18:22 +10:00
Andrew Tridgell 67484a2ea1 Copter: make copter code compatible with the new logging system
not fully converted yet
2013-04-20 13:52:36 +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 f5955d8915 Copter: auto climb and descent params removed
These params now reside in the AC_WPNav library
2013-04-18 14:52:21 +09:00
Randy Mackay 2b4a7d60a9 Copter: remove unused throttle modes
These were useful for testing the alt-hold when it was first introduced
but now they just add complexity
2013-04-17 22:14:22 +09:00
Randy Mackay 56809a9df2 Copter: remove unused nav_ok and alt_sensor_flag 2013-04-17 21:57:57 +09:00
Randy Mackay d2bd818b2d Copter: bug fix for auto_armed logic
Zero throttle when switching into an auto flight mode would cause the
motors to stop.
2013-04-17 21:28:42 +09:00
Andrew Tridgell 501eb4f0b4 Copter: made more variables static 2013-04-17 21:35:11 +10:00
Randy Mackay a185fa950c Copter: Jason's fix to auto disarming
Added check so that it only starts counting down when motors are armed.
This removes the issue in which the copter sometimes disarms shortly
aftering being armed.
2013-04-15 23:36:45 +09:00
Randy Mackay b48864e1ad Copter: allow CH6 tuning of compass declination 2013-04-15 21:50:44 +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 bffe4fa412 Copter: remove NAV_LAT and NAV_LON
Loiter and navigation controllers now combined
2013-04-14 12:09:45 +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 bc87118062 AC_WPNav: add get_target_alt method 2013-04-14 10:39:00 +09:00
Randy Mackay 6dbcbdcb43 AC_WPNav: limit max loiter position error
move interpretation of pilot input to wpnav lib
2013-04-14 10:38:58 +09:00
Randy Mackay 926c404994 AC_WPNav: Leonard's loiter target smoothing 2013-04-14 10:38:39 +09:00
Randy Mackay 553f40a99c Copter: bug fix to loiter delay
change delay to seconds to allow delays longer than 65seconds
2013-04-14 10:38:30 +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 3bf847f675 Copter: Jason's faster cos_yaw, sin_yaw 2013-04-02 15:50:29 +09:00
Randy Mackay 7ccb14344c Copter: update version to 2.9.1b-dev 2013-04-01 11:47:56 +09:00
Michael Oborne 59f80410d5 Add ability to compile sensor hil with sitl 2013-03-31 16:35:23 +08:00
Andrew Tridgell b280857025 Copter: use common angle wrap code 2013-03-29 13:14:31 +11:00
Randy Mackay f7d977fe37 Copter: add support for GPS fix type 2D 2013-03-27 11:41:47 +09:00
Randy Mackay 597a4b912a Copter: fix to allow building HIL_MODE_SENSORS 2013-03-18 13:41:52 +09: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 fdcb78ccf7 Copter: leonard's smoother alt-hold transition
Target altitude when entering alt-hold is based on a projection from
current alt and climb rate
2013-03-17 13:24:49 +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 f9539384a1 Copter: rename failsafe to failsafe_radio
Makes way for separation of failsafes for throttle, gps and gcs
2013-03-16 17:14:21 +09:00
Randy Mackay f263e81ed7 Copter: remove unused GPS and baro filters
Saves 24bytes of RAM
Removing the baro filter leads to noisier Baro Alt appearing in the log
so we should make the inertial nav altitude appear in the CTUN message
2013-03-16 00:20:15 +09:00
Randy Mackay cb84ec9d9b Copter: add current based compass compensation 2013-03-03 23:02:36 +09:00
Randy Mackay e0506bd622 Copter: inav circle initial implementation 2013-02-26 11:35:35 +09:00
Randy Mackay d6ff5ae261 Copter: add roll-pitch slew for auto modes
Added reporting of roll, pitch inputs for ACRO, AUTO
2013-02-24 14:42:04 +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 609676e26c Copter: add logging of compass values
Removed rarely used ITERM because we didn't have enough bits in the log
mask
2013-02-24 14:41:48 +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 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
Jason Short 7d5b975da2 AC: Flip code fix
Flight tested it today and made some flips. Throttle adjusted in Manual throttle modes. Not tested in AP throttle modes such as alt hold.
2013-02-23 13:14:11 +09:00
Jason Short abd0fb9099 AC : global static variables should not be initialized to zero 2013-02-22 17:34:18 +09:00
Randy Mackay 9904e9f4db Copter: update firmware version to 2.9.1-rc1 2013-02-19 13:43:36 +09:00
Randy Mackay a0b65a262b Copter: use scaled throttle for accel-throttle's I term
Accel throttle's I term is taken from scaled manual throttle
2013-02-01 22:37:25 +09:00
Randy Mackay 06a71af12f Copter: THR_MID used to scale manual throttle 2013-02-01 22:37:16 +09:00
rmackay9 9c3b9907dd Copter: bug fix to set sonar_alt_health to zero when disabled 2013-01-31 17:00:28 +09:00
Randy Mackay ce370bab0c Copter: rename CUR and CURR to CURRENT for logging
Based on user complaint that enable/disable was using CUR while message
was appearing as CURR
2013-01-26 17:20:41 +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 0056bfadd7 Copter: rename ROLL_PITCH_LOITER
new name ROLL_PITCH_LOITER_INAV makes it more clear that it should only
be used with the new inertial nav loiter controllers
2013-01-25 23:27:31 +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
Randy Mackay 9a09f086d2 Copter: Leonard Hall's inertial nav ver 2 2013-01-23 12:34:49 +09:00
rmackay9 ab1978ad50 Copter: Leonard Hall's inertial nav based loiter 2013-01-22 18:38:00 +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
Randy Mackay 577bf865b3 Copter: update firmware version to 2.9-dev
The -dev extension indicates that we are post 2.9 release
2013-01-17 13:03:33 +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 148c227d73 Copter: update firmware version to rc5 2013-01-15 12:17:41 +09:00
Randy Mackay c1fa850d10 ArduCopter: update firmware version to 2.9-rc4 2013-01-13 20:01:09 +11:00
Randy Mackay 175f69a64f ArduCopter: smooth throttle when switching from manual throttle to alt hold
new set_accel_throttle_I_from_pilot_throttle function copies the
difference between the pilot's throttle and hover throttle to the
accelerometer based throttle controller's I term.
2013-01-13 20:00:59 +11:00
Randy Mackay fbed8b8861 ArduCopter: alphabetized the contributors list
Jonathan Challinger added
2013-01-13 20:00:28 +11:00
Randy Mackay 5965914039 ArduCopter: increase firmware version to 2.9-rc3 2013-01-13 20:00:25 +11:00
Andrew Tridgell b0c710b67f Copter: move read_AHRS() before run_rate_controllers()
this ensures the rate controllers use the latest data
2013-01-13 20:00:14 +11:00
rmackay9 f25f1cb3bf ArduCopter: changed alt hold to use the sonar if enabled and healthy 2013-01-13 19:56:19 +11:00
rmackay9 21b6c78d12 ArduCopter: added get_throttle_althold_with_slew to allow slower altitude target changes
Improved surface tracking by using slewed althold controller
Reduced sonar mode filter to just 3 elements to reduce lag but at the possible consequence of allowing sonar noise to creep through for people with margin sonar set-ups.
2013-01-13 19:51:47 +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
Andrew Tridgell af478d52bc Copter: use the new logging methods for 2 packet types
the rest still need to be converted
2013-01-12 18:15:23 +11:00
Andrew Tridgell 0fe7901422 Copter: only print perf data when SCHED_DEBUG is non-zero 2013-01-12 12:06:40 +11:00
Andrew Tridgell dcb181d2d8 Copter: use new AP_Scheduler library 2013-01-12 12:02:57 +11:00
Andrew Tridgell 2e57720444 Copter: move memcheck_init() earlier in setup 2013-01-11 10:24:21 +11:00
James Bielman 7374e5d84e ArduCopter: Use 16-bit arithmetic when comparing event tick counters.
- On the ARM, once the tick counter wrapped, we stopped running events
  because the wraparound case wasn't being handled correctly.  Make
  sure the comparison is 16 bits to prevent this.
2013-01-09 11:19:52 -08:00
James Bielman 7827a4a54a ArduCopter: Add AP_HAL_SMACCM support.
- Added default configuration to "config.h".
- Added main function to run under FreeRTOS with HWF4.
2013-01-09 11:19:51 -08: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 e575c5eba0 Copter: read baro at 50Hz 2013-01-09 23:46:05 +11:00