Commit Graph

5413 Commits

Author SHA1 Message Date
Randy Mackay 0819e05896 AC_PosControl: lean_angles_to_accel added for smooth initialisation
init_xy_controller also added to capture initialisation all in one place
2014-05-08 16:15:41 +09:00
lthall b38c484874 AC_WPNav: add LOIT_JERK parameter
Limit accel output from loiter controller.
Call new pos_control.init_xy_controller when loiter starts
Remove sudden stop when pilot requested acceleration is zero

Pair programmed with Randy
2014-05-08 16:15:38 +09:00
Randy Mackay 71fae1e6f2 AC_AttControl: lean_angle_max accessor fn const 2014-05-08 16:15:36 +09:00
Randy Mackay fd9f8f571f AC_WPNav: replace inav, ahrs pointers with references 2014-05-08 16:15:26 +09:00
lthall 21c93e48ab AC_PosControl: include vel error when get_stopping_point_z
Pair programmed with Randy
2014-05-08 16:15:24 +09:00
Randy Mackay a1f1dd8059 AC_PosControl: add is_active_z method
Consolidated z-axis timeout checks to save 4bytes of RAM
Added POS_CONTROL_ACTIVE_TIMEOUT_MS to make timeout consistent
2014-05-08 16:15:22 +09:00
Andrew Tridgell 74227cd7f0 AP_HAL: prevent some FastDelegate warnings 2014-05-08 11:11:03 +10:00
Andrew Tridgell a295760e56 AP_Rally: fixed indentation
previous indentation confused emacs24
2014-05-08 11:01:52 +10:00
Andrew Tridgell 4efcae46ab SITL: cope with more rubbish startup values from JSBSim 2014-05-04 17:30:10 +10:00
Andrew Tridgell 320834a5e7 HAL_PX4: read from FRAM in 128 byte chunks (2nd try)
this time without the amazingly silly bug
2014-05-02 22:12:45 +10:00
Andrew Tridgell db6b96caa0 Revert "HAL_PX4: read from FRAM in 128 byte chunks"
This reverts commit a92366c455.

This commit may be associated with FRAM corruption on Pixhawk. Revert
until we understand why
2014-05-02 21:52:26 +10:00
Andrew Tridgell a92366c455 HAL_PX4: read from FRAM in 128 byte chunks
this fixes FRAM read on Roberts Pixhawk. We don't know why yet.
2014-05-02 12:24:54 +10:00
Randy Mackay 937e9ea687 AC_PosControl: add set_target_to_stopping_point_xy method
Fixed bug in get_stopping_point_xy in which it would update Z-axis
target if vehicle was moving less than 10cm/s horizontally
2014-04-30 21:46:20 +09:00
Randy Mackay 7dd366d84e AC_WPNav: init_loiter sets speed, accel before calcing stopping distance
The stopping distance depends upon the speed and acceleration so these
must be updated first
2014-04-30 21:46:18 +09:00
Randy Mackay 0103ae2eb0 AC_WPNav: add WPNAV_ACCEL_Z
Allows configurable z-axis acceleration during missions
2014-04-30 21:46:12 +09:00
Randy Mackay 9f63de9b59 AC_PosControl: set_speed_z accepts positive descent speeds 2014-04-30 21:46:09 +09:00
Randy Mackay 510c9920a6 AC_WPNav: rename get_horizontal_velocity to get_speed_xy
This new method name is consistent with the equivalent in the
AC_PosControl class
2014-04-30 21:46:06 +09:00
Andrew Tridgell eb1fb63e57 APM_Control: added logging of parameter changes in AUTOTUNE
this will make it easier to analyse logs
2014-04-30 22:22:13 +10:00
Andrew Tridgell 871d0c0e44 APM_Control: moved the log structure to ArduPlane core
this allows it to work with old style .log files
2014-04-30 21:22:28 +10:00
Andrew Tridgell 4f250579db DataFlash: added LOG_ATRP_MSG define 2014-04-30 21:22:28 +10:00
priseborough 114bd56e2a AP_NavEKF: Fix display names in parameter list 2014-04-30 06:35:41 +10:00
Randy Mackay 5cc26569fc AP_Motors: fix example sketch 2014-04-29 20:46:34 +09:00
priseborough 5fefce5899 AP_NavEKF: Synthetic sideslip fusion numerical error protections 2014-04-29 17:26:45 +10:00
Jonathan Challinger 0bb7b8e938 AP_GPS: Fix bug that causes permanent lag if we miss a message 2014-04-29 15:35:46 +10:00
Randy Mackay 2be99d7a92 TriCopter: output_test for individual motors
Based on original work by Nils Hogberg
2014-04-29 11:41:16 +09:00
Randy Mackay 07766e55f9 SingleCopter: output_test for individual motors
Based on original work by Nils Hogberg
2014-04-29 11:41:14 +09:00
Randy Mackay 3610cfe24c TradHeli: output_test for individual motors
Based on original work by Nils Hogberg
2014-04-29 11:41:13 +09:00
Randy Mackay 8f74f5b3b0 CoaxCopter: output_test for individual motors
Based on original work by Nils Hogberg
2014-04-29 11:41:12 +09:00
Randy Mackay d63d82ec17 MotorMatrix: output_test for individual motors
Based on original work by Nils Hogberg
2014-04-29 11:41:10 +09:00
Vizual54 11d02ea5d2 AP_Motors: output_test for individual motors
Modified and integrated by Randy Mackay
2014-04-29 11:36:58 +09:00
Randy Mackay 6517638670 GCS_MAVLink: generate after adding DO_MOTOR_TEST 2014-04-29 11:23:07 +09:00
Randy Mackay 28846c6c99 GCS_MAVLink: add DO_MOTOR_TEST message 2014-04-29 11:23:04 +09:00
Andrew Tridgell 818e500509 AP_Mission: improve the AP_Mission docs
DisplayName isn't a description
2014-04-29 11:46:06 +10:00
Andrew Chapman 782fbe1ec5 AP_Mission: added reset() function 2014-04-29 11:46:06 +10:00
Andrew Chapman a80e72ff82 AP_Mission: added MIS_AUTORESTART parameter
- added MIS_AUTORESTART parameter, defaults to 0
- added start_or_resume() function to either start or resume a mission
based on that parameter value
2014-04-29 11:46:06 +10:00
Andrew Tridgell cf9b67d8fc GCS_MAVLink: prevent uninitialised bytes being written to a serial port 2014-04-27 15:34:30 +10:00
Randy Mackay e855cfec02 AC_Fence: add 10sec manual recovery
This resolves issue #461 by giving the pilot a minimum of 10 seconds to
attempt to manually recover before the autopilot will attempt to retake
control to bring the copter home or land.
2014-04-27 11:11:07 +09:00
Randy Mackay db51d37071 AC_WPNav: add clear_pilot_desired_acceleration
This allows quickly clearing out the pilot desired acceleration for
loiter contoller.
2014-04-25 14:45:14 +09:00
Randy Mackay 06bef6e3b8 Parachute: clear release time when enabled
This resolves an issue in which the parachute could be suddenly released
when the user enabled the parachute.  The sequence that could have
caused this bad behaviour were (1) the parachute is triggered (2) the
user disables the parachute in the 0.5sec between the trigger and the
actual release, (3) the user re-enables the parachute and the old
release time from (1) is used.
2014-04-24 19:22:11 +09:00
Randy Mackay ad99918fee AC_WPNav: recalc leash lengths if set_horizontal_velocity is called
Resolves bug in which do-set-speed allowed reducing the speed during the
mission but not increasing it.
Slow down distance is also recalculated.
Unnecessary call to calc_wp_leash_length removed from
set_spline_origin_and_destination.
2014-04-24 13:16:08 +09:00
Randy Mackay 46fba47c8e AC_WPNav: slow target point's speed near destination 2014-04-24 13:16:00 +09:00
priseborough ecc8e45eda AP_NavEKF: Fix bug in position reset logic 2014-04-23 18:16:02 +10:00
Andrew Tridgell b0fd94f18e AP_GPS: initialise a variable in uBlox driver 2014-04-23 18:15:53 +10:00
Randy Mackay 7c02a02bd8 AC_WPNav: reset_I flag moved to position controller 2014-04-23 15:00:14 +09:00
Randy Mackay 098f8169b0 AC_PosControl: add keep_xy_I_terms method
Stops horizontal PID's I terms from being reset when the controller is
next updated
2014-04-23 15:00:12 +09:00
Randy Mackay 4d5b73b968 AC_WPNav: add reset_I to set_loiter_target 2014-04-23 15:00:07 +09:00
Ju1ien 6c71569775 AC_PosControl: update_xy_controller allows not resetting I term 2014-04-23 14:59:49 +09:00
Ju1ien 5d0476e522 AC_WPNav: add reset_I to init_loiter_target 2014-04-23 14:59:47 +09:00
Randy Mackay 09a35cf90f AC_PosControl: bugfix for freezing I-term build-up 2014-04-23 11:33:53 +09:00
Randy Mackay 559a258ede AC_WPNav: bug fix to limit target point from moving beyond leash
Also pull Z-axis acceleration from position controller instead of using
#define
2014-04-22 23:05:11 +09:00
Randy Mackay 9c6995d8bb AC_PosControl: add get_accel_z method 2014-04-22 23:05:08 +09:00
Randy Mackay e565ee6d33 AC_PosControl: stop I term build-up when motors at max 2014-04-22 23:05:06 +09:00
Andrew Tridgell e10542dcae AP_Mission: added get_current_nav_index() function
this will return 0 when there is no current command, which is what is
expected in MAVLink when there is no mission

(it prevents the text to speech announcing "65 thousand 6 hundred and
thirty five", which is quite annoying!)
2014-04-22 11:40:18 +10:00
Michael Day 96173bfb8a AP_Rally: Added one getter method and made a utility method public. 2014-04-22 11:40:18 +10:00
Randy Mackay 0e065e4894 AP_InertialNav: get_velocity_xy const 2014-04-21 21:59:38 +09:00
Randy Mackay 6f6c9e2585 AC_PosControl: bug fix to vertical speed limit
Vehicle was not reaching target climb or descent rate because of
incorrectly defaulted acceleration
2014-04-21 21:36:02 +09:00
Andrew Tridgell 25667a11a0 AP_NavEKF: use AHRS vehicle class for sideslip calculation
Pair-Programmed-With: Paul Riseborough <p_riseborough@live.com.au>
2014-04-21 18:13:12 +10:00
Andrew Tridgell 5acd17b843 AP_NavEKF: cleanup some build warnings
Pair-Programmed-With: Paul Riseborough <p_riseborough@live.com.au>
2014-04-21 18:13:12 +10:00
Andrew Tridgell c8c6e05a4a AP_AHRS: added vehicle class to AHRS
used by EKF to control use of get_fly_forward()
2014-04-21 18:13:12 +10:00
priseborough bd28cdbdcf AP_NavEKF: Improved magnetometer consistency checks
A magnetometer axis that fails the innovation consistency check will cause
all axes not to be used. If this condition continues for 10 seconds, a
magnetometer timeout condition will be declared. When the timeout has
occurred, if it is not a fly forward vehicle, then individual channels
will be used again, but with a reduced weighting.
2014-04-21 16:31:31 +10:00
Randy Mackay 648787a6c8 AC_WPNav: rename some definitions 2014-04-21 15:06:29 +09:00
Randy Mackay 2167dd7d3e AC_WPNav: update target speed immediately 2014-04-21 14:51:26 +09:00
Andrew Tridgell 05bffb5915 HAL_SITL: enable use of SIM_FLOAT_EXCEPT parameter 2014-04-21 15:37:08 +10:00
Andrew Tridgell e0db7b117f SITL: added SIM_FLOAT_EXCEPT parameter
this enables checking for floating point exceptions
2014-04-21 15:37:08 +10:00
Andrew Tridgell 610a930612 AP_NavEKF: catch covarience errors and reset filter
this catches covariance values beyond a reasonable limit and resets
the filter is they happen
2014-04-21 15:37:08 +10:00
Andrew Tridgell 7e5a491f14 AP_Math: prevent a floating point exception 2014-04-21 15:37:08 +10:00
Andrew Tridgell 4d24a86088 AP_AHRS: prevent a infinity value 2014-04-21 15:37:07 +10:00
Randy Mackay d382fa51ee AC_WPNav: run loiter and wp nav at 50hz on Pixhawk 2014-04-21 13:32:02 +09:00
Randy Mackay 72d2712c4e AC_WPNav: integrate update_xy_controller name change 2014-04-21 13:31:58 +09:00
Randy Mackay 966340a02a Circle: integrate update_xy_controller name change 2014-04-21 13:31:57 +09:00
Randy Mackay 7e376bc517 PosControl: update_pos_controller renamed to update_xy_controller 2014-04-21 13:31:55 +09:00
Andrew Tridgell 4756dbee84 AP_NavEKF: fixed millisecond subtraction for rollover
Pair-Programmed-With: Paul Riseborough <p_riseborough@live.com.au>
2014-04-21 13:16:20 +10:00
Andrew Tridgell be9d0c1c4d APM_OBC: setup termination values in PX4IO
this sets up the PX4IO board with failsafe values in case the FMU is
not running
2014-04-21 11:52:53 +10:00
Andrew Tridgell 0d4985079e RC_Channel: added support for LimitValue settings
this allows you to set a channel failsafe or radio_out to a limit
value
2014-04-21 11:52:41 +10:00
Andrew Tridgell 7f4178d967 RC_Channel: added setup_failsafe_trim_all() function
sets all channels to output trim values on FMU failure
2014-04-21 08:37:24 +10:00
Andrew Tridgell 5cd145a307 AP_HAL: added set_failsafe_pwm() API
this allows the PWM values for FMU firmware failure to be setup
2014-04-21 08:36:52 +10:00
Andrew Tridgell 7f9a9107c7 APM_Control: logging_started needs to be static
prevents writing log headers twice
2014-04-21 07:13:06 +10:00
Andrew Tridgell 68f1ae3036 AP_NavEKF: fixed some matlab ! -> ~ typos
Pair-Programmed-With: Paul Riseborough <p_riseborough@live.com.au>
2014-04-20 21:44:37 +10:00
Andrew Tridgell 5a7afbf2cd AP_GPS: prevent writing GPS log headings multiple times 2014-04-20 21:44:14 +10:00
Randy Mackay e3ffd5c0dd Common: remove RallyLocation defintion 2014-04-19 15:00:28 +09:00
Randy Mackay 7011ab40c2 Rally: define RALLY_WP_SIZE and RallyLocation 2014-04-19 15:00:25 +09:00
Michael Day a2aab2ab5e AP_Rally: Minor fixes to AP_Rally after initial testing
- If a Rally point is being used, always respect the altitude set by the
user (don't take the max of that and the home point altitude).

- No need for constructor to pass in size of RallyLocation struct
2014-04-19 09:16:02 +10:00
Andrew Chapman 5825bac410 AP_Rally library 2014-04-19 09:15:59 +10:00
Randy Mackay 5322093475 Mission: fix example sketch after GPS lib changes 2014-04-17 16:41:38 +09:00
Andrew Tridgell b4c5f31b17 APM_Control: reduce the number of parameter saves in autotune
don't save a parameter unless it has changed by 0.1%
2014-04-17 17:20:40 +10:00
Paul Riseborough ccc7d36493 APM_Control: Modify D and I gain scaling 2014-04-17 17:11:48 +10:00
Randy Mackay 94d38ee294 AC_Circle: add get_closest_point_on_circle
init_start_angle method added to use current heading or position to
decide on initial start angle
2014-04-16 16:28:04 +09:00
Kevin Hester c2184cb8e4 PID: fixup line endings 2014-04-15 15:57:56 +09:00
Kevin Hester 72e97cbf5c AP_Param: fixup line endings 2014-04-15 15:57:47 +09:00
Kevin Hester a7820e6c71 OptFlow: fixup line endings 2014-04-15 15:57:33 +09:00
Kevin Hester fce1277b0e Notify: fixup line endings 2014-04-15 15:57:11 +09:00
Kevin Hester b7bed437c2 Compass: fixup line endings 2014-04-15 15:56:57 +09:00
Kevin Hester 80cb13e222 BattMon: fixup line endings 2014-04-15 15:56:43 +09:00
Kevin Hester d09e871319 AP_Airspeed: fixup line endings 2014-04-15 15:56:26 +09:00
Kevin Hester c34c4d79f6 AP_ADC: fixup line endings 2014-04-15 15:56:13 +09:00
Kevin Hester b7410494e3 AC_PID: fixup line endings 2014-04-15 15:55:59 +09:00
L. Preston Sego III 3ecdc4b741 Copter: Add support for V-Tail Quads 2014-04-14 14:54:02 +09:00
Randy Mackay 02775e8dc5 AC_PosControl: get_accel_target returns const ref 2014-04-14 11:34:14 +09:00
Randy Mackay 60f522a094 AC_WPNav: set_wp_destination to use current target
Previously we used the projected stopping point if the vehicle had not
reached the destination but this could lead to large jumps in target
position
2014-04-13 22:42:50 +09:00
Andrew Tridgell ae7293ef68 APM_Control: added support for AUTOTUNE_LEVEL
10 levels of tune, for what type of tune the user wants
2014-04-13 22:11:57 +10:00
Andrew Tridgell 86f167fc7f AP_Vehicle: added autotune_level to fixed wing parms 2014-04-13 22:11:28 +10:00
Andrew Tridgell b7350118a6 AP_AHRS: enable EKF wind estimate with no airspeed sensor
EKF can now estimate with IMU and GPS only

Pair-Programmed-With: Paul Riseborough <p_riseborough@live.com.au>
2014-04-13 19:42:49 +10:00
Andrew Tridgell 4abc2999a6 AP_NavEKF: start with a wind estimate of 3m/s, when no direct measurement
this will cope better with users with low roll/pitch gains, to ensure
they get enough control on takeoff

Pair-Programmed-With: Paul Riseborough <p_riseborough@live.com.au>
2014-04-13 19:42:23 +10:00
priseborough d745dc2b6f AP_NavEKF : Increased position gate default to reduce impact of accel errors
Flight testing with windup turns has shown that the position gate threshold
can be tripped with good GPS data causing position jerks. This increases the
initial GPS glitch rejection threshold to effectively 5m when using the
default POSNE_NOISE value of 0.5m.
2014-04-13 19:37:22 +10:00
priseborough 188bea6bab AP_NavEKF : Enable calc of wind velocity when not using airspeed sensing
This patch also cleans up the logic associated with use of the synthetic
sideslip measurement so that it can never be used for a non fly-forward
vehicle type

This patch adds functionality that initialises the wind-speed vector to the
reciprocal of the ground speed vector, and scaled to 6 m/s. On average this gives
a better initial wind velocity estimate on launch by assuming:

a) launch will be into wind
b) wind speed is equal to global average

It also helps prevent a headwind causing initial underestimation of airspeed
causing high autopilot gains and limit cycles on climb-out, until first
turn when the EKF is able to estimate the wind.
2014-04-13 19:37:19 +10:00
Andrew Tridgell df192a9efd AP_AutoTune: lower min tau to 0.2 2014-04-13 19:25:54 +10:00
Andrew Tridgell 3343af602e APM_Control: fixed saving of new rate gains 2014-04-13 15:35:52 +10:00
Andrew Tridgell b9a8ef3b51 APM_Control: fixed a bug in autotune servo saturation check
its in degrees not centi-degrees
2014-04-13 15:28:36 +10:00
Andrew Tridgell 64170d0f04 APM_Control: added dataflash logging to autotune 2014-04-12 18:21:50 +10:00
Andrew Tridgell 7f5eeabadc DataFlash: reserve a range of msg types for autotuning logs 2014-04-12 18:21:31 +10:00
Andrew Tridgell 50fc75917e APM_Control: first version of APM_Control autotuning
this adds autotune to the roll/pitch controllers using a very simple
mechanism. The plan is that this provides a framework which Paul and
Jon will build upon.
2014-04-12 14:11:33 +10:00
Andrew Tridgell 3b8839d2f7 AP_GPS: fixed num_sensors on APM2 2014-04-11 21:32:55 +10:00
Andrew Tridgell 7404fc9d40 SITL: added SIM_BARO_DISABLE parameter
useful for testing baro failure
2014-04-11 16:47:40 +10:00
Andrew Tridgell ad18019fb1 APM_OBC: added pressure altitude termination 2014-04-11 16:47:40 +10:00
Andrew Tridgell 41dd280739 AP_Baro: expose get_altitude_difference()
this is useful for pressure altitude calculations
2014-04-11 16:34:02 +10:00
Andrew Tridgell 8b9b4026f0 SITL: support -P option
this allows changing a parameter on initial startup
2014-04-11 12:28:32 +10:00
Michael Day 312a2fc8dc AP_TECS: Parameter TECS_LAND_SPDWGT allows custom landing speed weight. 2014-04-10 15:42:49 +10:00
Andrew Tridgell 95304e27c9 DataFlash: added separate logging of each GPS 2014-04-10 10:29:30 +10:00
Andrew Tridgell a821b0e198 AP_GPS: fixed a build warning
Debug() should not be exposed in public headers
2014-04-10 10:28:55 +10:00
Andrew Tridgell 27a3b5fb36 AP_AHRS: fixed wind reporting with EKF and no airspeed sensor
the EKF does not estimate wind without an airspeed sensor
2014-04-10 06:49:23 +10:00
Randy Mackay b78e59ea30 AP_Motors: add stability patch test to example sketch 2014-04-09 21:21:29 +09:00
Andrew Tridgell a15e4633b7 SITL: prevent wind effects at negative altitudes
this prevents crashes on takeoff with barometer noise
2014-04-09 15:28:14 +10:00
Andrew Tridgell 1ca6583df8 AP_BoardConfig: restore /dev/vroutput change from Emile
my mistake, sorry Emile!
2014-04-08 21:05:41 +10:00
Emile Castelnuovo 79996986ad VRBRAIN: corrected ADC pins for volt and current sensing. 2014-04-08 16:19:20 +10:00
Emile Castelnuovo 7fe4847b6c VRBRAIN: Added NuttX driver vroutput for PWM out
Modified script rc.APM to launch modules vrinput and vroutput
Modified startup scripts to run APM without SD
2014-04-08 16:19:20 +10:00
Emile Castelnuovo d1e4fbf267 AP_EPM: added #defines for VRBRAIN board 2014-04-08 16:19:20 +10:00
Emile Castelnuovo e8b9e9d53c AP_Airspeed: added #defines for VRBRAIN board 2014-04-08 16:19:20 +10:00
Emile Castelnuovo 69d2633465 AP_Relay: added #defines for VRBRAIN board 2014-04-08 16:19:19 +10:00
Emile Castelnuovo 25f1c5774f AP_NavEKF: added #defines for VRBRAIN board 2014-04-08 16:19:19 +10:00
Emile Castelnuovo 39d9e93904 AP_BoardConfig: added #defines for VRBRAIN board 2014-04-08 16:19:19 +10:00
Emile Castelnuovo 1d27e0d127 AP_BattMonitor: added #defines for VRBRAIN board 2014-04-08 16:19:19 +10:00
Emile Castelnuovo ab9a320187 DataFlash: added #ifdefs for VRBRAIN board 2014-04-08 16:19:19 +10:00
Emile Castelnuovo 06744ea7d2 AP_InertialSensor: new files and definitions for VRBRAIN board 2014-04-08 16:19:19 +10:00
Emile Castelnuovo 4ad83f3c8a AP_Notify: new files and definitions for VRBRAIN board 2014-04-08 16:19:19 +10:00
Emile Castelnuovo 1bc199c5bd AP_Compass: new files and definition for VRBRAIN board 2014-04-08 16:19:19 +10:00
Emile Castelnuovo 7b5c002d2f AP_Common: new board ID for VRBRAIN 2014-04-08 16:19:19 +10:00
Emile Castelnuovo f4784fe6a1 AP_Baro: new files for VRBRAIN board 2014-04-08 16:19:19 +10:00
Emile Castelnuovo 201332caef AP_HAL: New VRBRAIN board definition and libraries 2014-04-08 16:19:19 +10:00
priseborough db043744a4 AP_NavEKF : Reduce Z accel bias process noise to provide a more stable estimate 2014-04-07 21:08:25 +10:00
priseborough 1f8b5a6d23 AP_NavEKF : Tighten GPS velocity glitch gate default setting for plane 2014-04-07 21:08:15 +10:00
priseborough 0c2489b07b AP_NavEKF : Fix bug in logging of airspeed innovation consistency ratio 2014-04-07 21:01:00 +10:00
priseborough 95c83255d7 AP_NavEKF : adjust default values for accelerometer process noise
Slows down estimate and allows for smaller values to be set
2014-04-07 21:00:43 +10:00
Jonathan Challinger 9959a44453 AP_Motors: properly constrain thr_adj_max 2014-04-07 14:14:32 +09:00
Randy Mackay 3600bed47a Parachute: relay parameter description update 2014-04-07 13:37:14 +09:00
Randy Mackay 879d447404 Parachute: alt_min units to meters 2014-04-07 13:37:11 +09:00
Randy Mackay 50df95316a Parachute: initialise released variable 2014-04-07 13:37:09 +09:00
Randy Mackay 5876a2fe47 AC_AttControl: increase default rp accel to 900deg/s/s 2014-04-07 13:37:08 +09:00
Randy Mackay 95579229ed Parachute: add 0.5sec delay before parachute is released
This allows a short warning to the user through the new parachute_release tone
2014-04-07 13:37:05 +09:00
Randy Mackay 103772abe2 Parachute: add AP_Notify.h to example sketch 2014-04-07 13:37:04 +09:00
Randy Mackay a639df0256 Parachute: set AP_Notify parachute_release flag 2014-04-07 13:37:02 +09:00
Randy Mackay e3e7fc284d Notify: add parachute release tune for Pixhawk 2014-04-07 13:37:01 +09:00
Randy Mackay 699b84e8ca Parachute: minor comment changes 2014-04-07 13:36:58 +09:00
Randy Mackay d8f9a1c6c6 Mission: add support for MAV_CMD_DO_PARACHUTE 2014-04-07 13:36:55 +09:00
Randy Mackay a682f652d0 GCS_MAVLink: generate after MAV_CMD_DO_PARACHUTE added 2014-04-07 13:36:53 +09:00
Randy Mackay cec7574465 GCS_MAVLink: add MAV_CMD_DO_PARACHUTE 2014-04-07 13:36:52 +09:00
Randy Mackay b478c3a321 AC_AttControl: return angle_ef_targets as const ref 2014-04-07 13:36:49 +09:00
Randy Mackay d4cb51d8f7 AP_Parachute: add example sketch
Only tests that the lib compiles
2014-04-07 13:36:37 +09:00
Randy Mackay 8600b9d4f1 RC_Channel: add parachute_release to function enum 2014-04-07 13:36:33 +09:00
Randy Mackay 9d807802cc Parachute: initial draft library 2014-04-07 13:36:25 +09:00
Andrew Tridgell efdb678e00 AP_Motors: fixed example build 2014-04-07 11:55:56 +10:00
Andrew Tridgell f4cbec0ce1 APM_OBC: removed unused example code 2014-04-07 11:55:46 +10:00
Andrew Tridgell cc212be41e AP_Mission: added get_next_ground_course_cd() API
this gives the ground course of the next navigation leg, which can be
used to calculate the amount of steering required
2014-04-07 09:29:54 +10:00
Andrew Tridgell e566802bf3 AP_Math: fixed example build 2014-04-07 07:37:34 +10:00
Andrew Tridgell 6f55dc1686 APM_OBC: update for AP_Mission and AP_GPS changes 2014-04-07 07:28:21 +10:00
Andrew Tridgell 43ebd86bb1 AP_GPS: disable SBP driver on APM2
the driver uses double precision floating point, which can't work on
8bit AVR with gcc
2014-04-05 21:47:46 +11:00
Andrew Tridgell 5a585b90e8 AP_GPS: fixed some warnings in SBP driver 2014-04-05 14:18:01 +11:00
Niels Joubert 33576dfdd9 AP_GPS: Swift Binary Protocol SINGLE-POINT-POSITIONING Driver
This is the SBP driver for Piksi, Lodestar and other forthcoming Swift Navigation GPSes.
This driver currently implements three things:
- Implements a lightweight SBP protocol detection system
- Implements Piksi as a single-point-positioning GPS (same as ublox/others)
- Implements hardware logging of GPS health and baseline messages

Forthcoming iin future updates:
- Need to implement the RTK functionality
2014-04-05 13:42:23 +11:00
Niels Joubert e32b73f075 AP_HAL_AVR_SITL: Adding Swift Binary Protocol stand-alone simulator 2014-04-05 13:42:23 +11:00
Niels Joubert 00064ac883 SITL: Adding GPS types for Swift Binary Protocol 2014-04-05 13:42:23 +11:00
Niels Joubert 879eb5936b AP_MATH: Adding WGS GPS conversions, CRC16 checks, and double-precision Vectors and Matrices 2014-04-05 13:42:23 +11:00
Niels Joubert 161b5f99b3 SITL: Adding Swift Binary Protocol GPS type 2014-04-05 13:42:23 +11:00
Niels Joubert 552f33b39e AP_GPS: Support fix types of DGPS and RTK 2014-04-05 13:42:23 +11:00
Niels Joubert 64d4a1236f AP_Notify: Support all GPS status flags, with status >= GPS_OK_FIX_3D notified as having a lock 2014-04-05 13:42:23 +11:00
Andrew Tridgell 67ed5b73ef AP_GPS: added lock_port() interface
used by SERIAL_CONTROL message
2014-04-05 07:34:33 +11:00
Andrew Tridgell b8675b9abc GCS_MAVLink: implement SERIAL_CONTROL MAVLink message 2014-04-05 07:34:33 +11:00
Andrew Tridgell 493c5dd63f GCS_MAVLink: rebuild MAVLink headers 2014-04-04 21:57:22 +11:00
Andrew Tridgell 14b3696959 GCS_MAVLink: added SERIAL_CONTROL message definition
will be used for on-board radio and GPS firmware update and control
over USB
2014-04-04 21:57:22 +11:00
Andrew Tridgell 07d621c4be AP_NavEKF: used state structure in more places
makes the code a bit easier to read

Pair-Programmed-With: Paul Riseborough <p_riseborough@live.com.au>
2014-04-04 21:30:16 +11:00
priseborough aa5335b16e AP_NavEKF : Improved GPS position glitch handling
When using GPS after previously rejecting it, the GPS position will
always be offset if outside the specified glitch radius. This was the
original intent of the design and makes handling of glitches smoother.

It has been tested on replay using glitchy flight data
2014-04-04 21:01:22 +11:00
priseborough b1786cf1e5 AP_NavEKF : Do not reset on GPS velocity timeout if good position data 2014-04-04 21:01:20 +11:00
priseborough d25883f712 AP_NavEKF : Limit rate of Z accel bias adaptation
Aliasing can causes the bias estimate to fluctuate very rapidly as it tries
to keep up, which degrades the benefit of switching between
accelerometers to avoid aliasing.

This patch give a much more stable bias estimate during aliasing, and
allows the bias to adapt at a maximum rate of 1.0 m/s2 in 50 seconds
2014-04-04 21:01:18 +11:00
priseborough 36b3cbc365 AP_NavEKF : Relax aliasing check limits
This reduces the chance of noisy data inhibiting GPS glitch protection
2014-04-04 21:01:15 +11:00
priseborough 0ae736c3a0 AP_NavEKF : clean up convoluted logic used in sensor health checks
This doesn't change the behavior, but does make the code easier to
understand
2014-04-04 21:01:13 +11:00
Andrew Tridgell 013aaf4d3e GCS_MAVLink: moved comms functions to not be inline
saves a bit of flash space
2014-04-04 13:19:15 +11:00
Andrew Tridgell d9d038345a AP_GPS: save 800 bytes of code space on APM2
we can assume a single GPS
2014-04-04 10:08:28 +11:00
Andrew Tridgell 9f857529ca AP_GPS: auto-switch primary GPS based on status and number of satellites 2014-04-04 08:32:34 +11:00
Andrew Tridgell 11f196318e RC_Channel: added static functions to simplify operations on all channels
this avoids vehicle code having to loop over all channels for common
operations
2014-04-03 12:18:56 +11:00
Andrew Tridgell 21c205a57e AP_GPS: cope with different MON-HW message size in u-Blox Neo7 2014-04-03 10:55:05 +11:00
Andrew Tridgell cd3038fabd AP_NavEKF: fixed return of offset in getVariances() 2014-04-03 07:49:06 +11:00
Andrew Tridgell dcb42af3e9 AP_BattMonitor: fixed example build 2014-04-03 07:49:06 +11:00
Craig Elder 3a92d75936 Ublox: Enable 1Hz Lock LED by default 2014-04-01 20:57:18 -07:00
Andrew Tridgell 067bbf5b5c DataFlash: hdop is unsigned 2014-04-02 07:55:28 +11:00
Andrew Tridgell e40a048009 AP_GPS: handle multiple GPS in GPS setHIL() 2014-04-02 07:55:28 +11:00
Andrew Tridgell 79f5618f6f AP_GPS: zero state structure on driver release
this ensures no values are left from the previous driver
2014-04-02 07:55:28 +11:00
Randy Mackay 2ddc414f4d InertialNav: replace safe_sqrt with pythagorous2 2014-04-01 20:43:53 +09:00
Randy Mackay 90e205c905 AC_PosControl: replace safe_sqrt with pythagorous2 2014-04-01 20:43:51 +09:00
Randy Mackay 15da01cf3a AC_WPNav: replace safe_sqrt with pythagorous2 2014-04-01 20:43:45 +09:00
Andrew Tridgell b8e4e35a0d AP_Airspeed: use pythagorous3() 2014-04-01 22:15:12 +11:00
Andrew Tridgell a7f213a5c5 AP_NavEKF: use pythagorous2() 2014-04-01 22:13:03 +11:00
Andrew Tridgell 9ab1a79b5a AP_Airspeed: changed sqrt() to sqrtf() 2014-04-01 22:09:21 +11:00
priseborough 09c5ba1aed Dataflash : Improved logging of EKF sensor health checks
This changes the definition sof the messages in the EKF4 message to make it more useful
The values shown now relate directly to how much margin there is before a measurement
is rejected, enabling better tuning of error trap parameters
2014-04-01 21:27:07 +11:00
priseborough 04036d7777 AP_NavEKF : Updated GPS glitch protection logic
This adds new functionality to the detection and compensation of GPS
glitches:

1) A maximum allowable innovation is calculated using the GPS noise
parameter multiplied by the gate, with an additional component allowing
for growth in position uncertainty due to acceleration error since
the last valid measurement
2) Includes per vehicle type values for the acceleration error limit
3) If the innovation length exceeds the maximum allowable, no fusion occurs
4) If no fusion has occurred for long enough such that the position uncertainty
exceeds the maximum set by a per vehicle parameter or a maximum time, an offset
is applied to the GPS data to so that it matches the value predicted by the filter
5) The offset is never allowed to be bigger than 100m
6) The offset is decayed to zero at a rate of 1.0 m/s to allow GPS jumps to
be accommodated gradually
7) The default velocity innovation gate has been tightened up for copter and rover
8) The variance data logging output has been updated to make it more useful
2014-04-01 21:22:14 +11:00
Andrew Tridgell 7e2ef0cfc0 AP_GPS: fixed GPS for Replay 2014-04-01 17:25:15 +11:00
Andrew Tridgell 9278685cdf AP_Math: fixed location build on SITL 2014-04-01 14:20:10 +11:00
Andrew Tridgell 77e2f48581 AP_GPS: fixed notify updates for new API 2014-04-01 06:38:25 +11:00
Andrew Tridgell 9781175bf5 AP_GPS: fixed handling of driver destruction
this allows for more complex destructors, and ensures we don't have
multiple backends allocated at once per instance
2014-04-01 06:38:25 +11:00
Andrew Tridgell 7ceba8dce4 AP_GPS: prevent double allocation of GPS drivers 2014-04-01 06:38:25 +11:00
Andrew Tridgell 8779ffe088 AP_GPS: flush pending config strings when uBlox starts 2014-04-01 06:38:25 +11:00
Andrew Tridgell 0191355488 AP_GPS: fixed init strings to all be in progmem
and sent async ...
2014-04-01 06:38:25 +11:00
Andrew Tridgell bc0c9ad6d5 AP_InertialNav: fixed example build 2014-04-01 06:38:25 +11:00
Andrew Tridgell 35c111a63a AP_AHRS: fixed example build 2014-04-01 06:38:25 +11:00
Andrew Tridgell 7b2d56a8cb AC_Fence: disable example build
fails to build with compiler error
2014-04-01 06:38:25 +11:00
Andrew Tridgell 3b8c6e629d AC_AttitudeControl: updated example for new GPS API 2014-04-01 06:38:25 +11:00
Andrew Tridgell c2486d8d6e AP_GPS: updated examples for new API
removed old per-driver examples, and updates AUTO example
2014-04-01 06:38:25 +11:00
Andrew Tridgell d04d33a02d AP_InertialNav: convert to new GPS API 2014-04-01 06:38:24 +11:00
Andrew Tridgell 5a2e84e792 AP_NavEKF: changes for new GPS API 2014-04-01 06:38:24 +11:00
Andrew Tridgell b7a2db716b AP_Arming: convert to new GPS API 2014-04-01 06:38:24 +11:00
Andrew Tridgell eb67948171 AP_Mount: convert to new GPS API 2014-04-01 06:38:24 +11:00
Andrew Tridgell f07e4dee52 AP_AHRS: convert to new GPS API 2014-04-01 06:38:24 +11:00
Andrew Tridgell 31d3b6555f DataFlash: convert to new GPS API 2014-04-01 06:38:23 +11:00
Andrew Tridgell 368daf89f1 AP_GPS: new GPS API
This is a complete rewrite of the GPS driver structure, with a static
main driver and separate backend drivers. This will allow proper
support for multiple GPSes, and will allow parameters to be set on the
GPS object
2014-04-01 06:38:23 +11:00
Andrew Tridgell 2dd92832dc AP_GPS: support multiple AP_GPS_Auto drivers
move all static variables into a dynamically allocated structure in
the AUTO driver which gets freed when we have found a GPS type
2014-04-01 06:38:23 +11:00
Andrew Tridgell 3c4389180e AP_GPS: removed GPS_406 driver
this driver was untested and badly structured. If we want to support
the 406 we can revive it and do it properly
2014-04-01 06:38:23 +11:00
Jonathan Challinger f0fc0397d3 Notify: add arming failure tone 2014-03-31 20:34:27 +09:00
Randy Mackay 7bb981f2df AP_Notify: correct dos formatting 2014-03-31 20:34:24 +09:00
Andrew Tridgell 31082f4ce2 AP_Mission: fixed a bug re-entering AUTO
this fixes a bug found by Marco where we would continue in CRUISE mode
with no waypoint if we re-entered AUTO after a mission reset
2014-03-31 06:18:07 +11:00
Randy Mackay 93f8d53d1b Mission: make get_prev_nav_cmd_index const 2014-03-30 23:09:54 +09:00
Randy Mackay b15d4379d8 AC_WPNav: use atan2f, make methods const 2014-03-30 23:09:51 +09:00
Randy Mackay 3ad635feeb AC_AttControl: 45deg/sec yaw rate for Auto, RTL 2014-03-30 15:44:14 +09:00
Randy Mackay d27ca53a9d AC_WPNav: spline sets origin vel to zero when no prev segment
Issue caught by Michael Oborne
2014-03-30 15:19:18 +09:00
Randy Mackay 7dfde39e19 AC_WPNav: advance_spline to use dt 2014-03-30 15:02:07 +09:00
Randy Mackay c0458b786a AC_WPNav: check acceleration is non zero 2014-03-30 11:52:44 +09:00
Randy Mackay f0f3688172 AC_WPNav: rounder corners for short spline segments 2014-03-30 11:52:41 +09:00
priseborough 9c5f564dc5 AP_NavEKF : Fixes bug in initial earth magnetic field states
The calculation for these states was not being bias corrected
2014-03-30 07:43:52 +11:00
Randy Mackay 7bff8e9312 AC_AttControl: constrain earth frame yaw angle error
This temporarily resolves the wobble we see in Auto when the target
heading is suddenly changed leading to a large yaw angle error
2014-03-29 20:42:21 +09:00
Randy Mackay 197683d539 WPNav: clean up spline comments 2014-03-29 17:57:47 +09:00
priseborough e1819bb53a AP_NavEKF : Add initial parameter defaults for Copter, Rover and Plane 2014-03-29 14:06:43 +11:00
Randy Mackay ac339a0289 Mission: add decoding of NAV_SPLINE command 2014-03-28 09:23:30 +09:00
Randy Mackay e7be622eef GCS_MAVLink: generate after adding NAV_SPLINE cmd 2014-03-28 09:23:28 +09:00
Randy Mackay 519d5fc444 GCS_MAVLink: add MAV_CMD_NAV_SPLINE_WAYPOINT cmd
This is the same as a NAV_WAYPOINT except that the vehicle flies a
spline curved path to the destination
2014-03-28 09:23:23 +09:00
Randy Mackay 24eb195aa3 WPNav: add yaw control for straight line wp nav 2014-03-28 09:23:13 +09:00
Randy Mackay b42b12f7be AC_WPNav: add get_spline_yaw 2014-03-28 09:23:07 +09:00
Randy Mackay f2d9ad41aa Mission: minor comment update 2014-03-28 09:22:56 +09:00
Randy Mackay e5e71ce371 WPNav: add spline support 2014-03-28 09:22:53 +09:00
Michael Day e1d193f539 GCS_MAVLink: Generated code from message additions for autofence. 2014-03-27 09:26:20 +11:00
Michael Day c5ebd120f1 GCS_MAVLink: XML for MAV_CMD_DO_FENCE_ENABLE and MAV_SYS_STATUS_GEOFENCE 2014-03-27 09:26:20 +11:00
priseborough 55c60b8f07 AP_NavEKF : Reduce Magnetometer innovation consistency check threshold 2014-03-26 21:29:47 +11:00
priseborough 45b1a2fa46 AP_NavEKF : Reduce GPS position innovation consistency fail threshold
This patch reduces the maximum acceptable GPS jump from approximately 16 to 8 metres
This will provide copters with more protection for close in loiter situations
2014-03-26 21:29:45 +11:00
Andrew Tridgell 8c0c9c317e RC_Channel: prevent a numerical exception with bad mount parameters 2014-03-26 17:38:27 +11:00
Andrew Tridgell bafc664750 AP_NavEKF: use APM_BUILD_TYPE() macro 2014-03-26 12:42:11 +11:00