lthall
0d87298221
AC_PosControl: freeze feed forward and vector fixes
2014-06-10 20:02:33 +09:00
Randy Mackay
5209598459
AC_AttControl: rename init_targets to relax_bf_rate_controller
2014-06-10 20:02:27 +09:00
lthall
1bdde31f6b
Copter: Fix zero throttle flip issue Stabilize
...
The problem is that the init_targets is intended to ensure the
controller doesn't build up the I term when the throttle is low. Because
it is poorly named (or used) it have been written to do something else.
Here I change it to do what the code is trying to use it to do.
2014-06-10 20:02:01 +09:00
Randy Mackay
915dad2da4
AC_Circle: use fast_atan2 to calc bearing from center
...
This does not save much time because it's only called at initialisation
2014-06-06 18:51:09 +09:00
Randy Mackay
f23e94707c
AC_WPNav: use fast_atan2 for bearing calcs
2014-06-06 18:51:08 +09:00
David Dewey
17374ff5e8
AP_Math: fast_atan2
...
This is 126us per call vs 199us on the AVR. it is accurate to about
0.28 degrees
Committed by rmackay9 but contribution is from David Dewey
2014-06-06 18:50:41 +09:00
Ju1ien
28ce66f314
INav: clear historic z-axis position estimate when set_altitude called
2014-06-06 18:42:42 +09:00
Randy Mackay
efd6d6dc70
AC_WPNav: spline div by zero fix
...
Also add check for straight line navigation to ensure speed is not
reduced below zero when it hits the leash limit
Also minor formatting changes
2014-06-05 22:23:38 +09:00
lthall
0912bec8f5
Spline div zero and leash limit fix
2014-06-05 22:23:35 +09:00
Andrew Tridgell
f0df912a11
AP_Mission: added support for MAV_CMD_DO_INVERTED_FLIGHT
2014-06-05 15:44:18 +10:00
Andrew Tridgell
ef4a79cc9a
GCS_MAVLink: rebuild MAVLink headers
2014-06-05 15:44:03 +10:00
Andrew Tridgell
67937b5b79
GCS_MAVLink: added MAV_CMD_DO_INVERTED_FLIGHT
...
used to invert from a mission
2014-06-05 15:43:46 +10:00
Andrew Tridgell
5a1aa8dfe7
AP_L1_Control: implement turn_distance() with turn angle
...
uses a linear approximation for now.
2014-06-05 09:34:23 +10:00
Andrew Tridgell
7a6186f7e6
AP_Navigation: added a turn_distance() method with turn_angle
2014-06-05 09:33:42 +10:00
Andrew Tridgell
49f93b91b2
APM_OBC: fixed formatting to match APM coding standard
2014-06-02 10:47:02 +10:00
Andrew Tridgell
e9e1799700
AP_Compass: fixed VRBrain build
2014-06-02 10:42:37 +10:00
Andrew Tridgell
d554616e86
AP_EPM: fix for HAL_GPIO_*
2014-06-02 10:42:36 +10:00
Andrew Tridgell
3705c90b8e
AP_Baro: fix for HAL_GPIO_*
2014-06-02 10:42:36 +10:00
Andrew Tridgell
d70bee9249
AP_AHRS: fix for HAL_GPIO_*
2014-06-02 10:42:36 +10:00
Andrew Tridgell
0d83d4f4f5
APM_OBC: fix for HAL_GPIO_*
2014-06-02 10:42:36 +10:00
Andrew Tridgell
1e2214f8d1
DataFlash: fix for HAL_GPIO_*
2014-06-02 10:42:36 +10:00
Andrew Tridgell
732cd0e130
AP_Relay: fix for HAL_GPIO_*
2014-06-02 10:42:36 +10:00
Andrew Tridgell
50c08ced4c
AP_Notify: fixes for HAL_GPIO_*
2014-06-02 10:42:35 +10:00
Andrew Tridgell
4c43cd9775
AP_InertialSensor: fixes for HAL_GPIO_*
2014-06-02 10:42:35 +10:00
Andrew Tridgell
805d79debe
HAL_FLYMAPLE: fix for HAL_GPIO_*
2014-06-02 10:42:35 +10:00
Andrew Tridgell
3015356671
HAL_AVR: fixes for HAL_GPIO_ define change
2014-06-02 10:42:35 +10:00
Andrew Tridgell
18a64d17d3
AP_HAL: added HAL_ prefix to GPIO_ defines
...
this fixes a bug caused by GPIO_INPUT and GPIO_OUTPUT already being
defined in NuttX, which caused pinMode() not to setup pins for output
when requested
2014-06-02 09:24:52 +10:00
Andrew Tridgell
fa4eb5475a
HAL_PX4: implement analog input stop pins
...
this allows multiple sonars to cooperate without interference
2014-06-02 08:35:41 +10:00
Randy Mackay
2b0f142a17
AC_PosControl: fix typo in D-filter definition
2014-05-29 17:50:48 +09:00
Randy Mackay
7e3213edbf
AC_AttControl: increase default accel max
2014-05-29 17:40:26 +09:00
Randy Mackay
29ca7a10df
AC_PosControl: set alt hold accel control D term filter
2014-05-29 17:40:23 +09:00
Randy Mackay
0969e464fb
AC_AttControl: set roll, pitch, yaw rate control D term filters
2014-05-29 17:40:17 +09:00
Randy Mackay
faf3415e5e
AC_PID: example sketch prints individual P, I and D values
2014-05-29 17:39:19 +09:00
Robert Lefebvre
b35ec4339e
AC_PID: Add method to set the D-term Filter Rate from main code.
2014-05-29 17:39:10 +09:00
Robert Lefebvre
f1c3f2a3d1
AC_PID: Remove get_leaky_i function which is now found in AC_HELI_PID.
2014-05-29 17:39:08 +09:00
Robert Lefebvre
7c9249de93
AC_AttitudeControl_Heli: Change to use AC_HELI_PID class instead of AC_PID. Remove FF parameters from class.
2014-05-29 17:39:06 +09:00
Robert Lefebvre
6333b4bba6
AC_PID: update example sketch to test AC_HELI_PID
2014-05-29 17:39:01 +09:00
Robert Lefebvre
ef7dc815cd
AC_PID: Change Private members to Protected so that AC_HELI_PID can access them.
2014-05-29 17:38:59 +09:00
Robert Lefebvre
94e9bed9cf
AC_PID: Add new AC_HELI_PID as a child of AC_PID
2014-05-29 17:38:57 +09:00
Andrew Tridgell
0b6407256c
GCS_MAVLink: moved 3 more send_*() functions to GCS_Common.cpp
2014-05-28 09:35:30 +10:00
Andrew Tridgell
37c50d9587
HAL_PX4: fixed use of FMU servo pins as digital inputs
...
these pins can be PWM output or digital input or digital output
2014-05-25 22:03:44 +10:00
Andrew Tridgell
2d9e9d9bc3
AP_Compass: added COMPASS_PRIMARY parameter
...
this allows selection of which compass is the primary. Useful if the
first compass starts giving spurious data (as happened in our plane)
2014-05-25 22:03:44 +10:00
priseborough
edc79ca2a4
AP_NavEKF: Increase divergence test margin based on analysis of more user flight logs
...
Analysis of copter logs has shown cases with a healthy EKF where spikes in EKF4.DS of up to 25% of the threshold have occurred.
A value of closer to 10% for normal operation is preferred.
2014-05-24 22:20:24 +10:00
Andrew Tridgell
aba11a0634
AP_L1_Control: wrap the target_bearing
2014-05-23 07:30:58 +10:00
Randy Mackay
cde7d31dad
AC_WPNav: fix divide by zero when origin and dest are same location
2014-05-22 21:18:24 +09:00
Andrew Tridgell
63da53c842
GCS_MAVLink: moved main update() routine into GCS_Common.cpp
...
this fixes a common timeout error with loading large missions, and
means less per-vehicle code
2014-05-21 12:45:25 +10:00
Andrew Tridgell
42c1501563
AP_Common: moved map_baudrate() into AP_Common
...
this version supports a much wider range of baudrates
2014-05-21 12:45:25 +10:00
Andrew Tridgell
7d712f90bf
APM_OBC: adjusted docs for FS_HB_PIN
...
thanks to Warren for the question
2014-05-21 12:45:25 +10:00
Randy Mackay
69ad632e2a
GPS: correct NAVFILTER parameter description
...
These corrected values match the GPS_Engine_Setting enum in GPS.h
Thanks to Adolfo R for noticing the issue and providing the fix
2014-05-20 22:08:40 +09:00
Andrew Tridgell
a7d6a26bec
HAL_PX4: fixed auto-flow control
...
the 6 bytes written to break the radio out of bootloader broke
auto flowcontrol detection
2014-05-19 22:02:39 +10:00
Randy Mackay
597d5227f5
AC_WPNav: rename set_loiter_target to init_loiter_target
2014-05-19 12:27:25 +09:00
Randy Mackay
e7b3c00767
AC_WPNav: set_loiter_target uses set_xy_target
...
Loiter is only a horizontal position controller so it should not set the
z-axis position.
Moved pos_control.set_speed and accel functions so order matches
init_loiter_targets function order
2014-05-19 12:27:20 +09:00
Ju1ien
aed5787c1b
AC_WPNav: bug fix for loiter init in Hybrid
...
AC_PosControl::init_xy_controller() has been added to PosControl and is
called by init_loiter_target.
Hybrid is currently using set_loiter_target function to init the loiter
controller. So we have to call init_xy_controller() by set_loiter_target
function.
What happens otherwise?
In AC_PosControl::update_xy_controller, we update "now" with
now = hal.scheduler->millis();
and, as _last_update_xy_ms has not been updated previously by
init_xy_controller(), we just call init_xy_controller().
So, _dt_xy will be negative and used anyways in all the functions and
PID called by update_xy_controller.
That will avoid at least _accel_target.x/y to be set to 0 but I'm not
sure for the high values, probably an I_term that is not reset and
reached very high value.
Or maybe a cast error somewhere... no clue at all
2014-05-19 12:27:16 +09:00
priseborough
5fe0d2c1b2
AP_NavEKF: Add protection for accel bias estimation errors
...
Don't do bias estimation if tilted by more than 60 degrees to prevent scale
factor errors affecting result unnecessarily.
Prevent Kalman gain from having the wrong sign due to numerical errors
associated with small process noise values.
Allow smaller Z accel bias process noise values to be set
2014-05-18 08:09:00 +10:00
priseborough
3222e8f7cb
AP_NavEKF: Default parameter adjustments
...
Bring Plane glitch protection thresholds into alignment with copter and
rover
Slight increase in accelerometer bias process noise to prevent bias
estimate divergence into limits (Rover and Plane only as Copter does not
seem respond as well to this change)
effective increase in threshold on divergence test to allow increased
margin for bad GPS velocities
2014-05-18 08:08:49 +10:00
Andrew Tridgell
65fd25fb5a
AP_InertialSensor: fixed example build
2014-05-18 08:08:19 +10:00
Andrew Tridgell
b99ae63cbb
HAL_Linux: more generic fix for scheduler issues in example sketches
...
this ensures drivers can run
2014-05-16 22:40:38 +10:00
Andrew Tridgell
30f5e2c37f
AP_GPS: work around scheduling issue in example code
2014-05-16 22:35:32 +10:00
priseborough
e40e50e2e1
AP_NavEKF: Prevent start-up transients re-tripping divergence test
2014-05-16 22:05:22 +10:00
Andrew Tridgell
73976e2ca4
AP_GPS: fixed example build
2014-05-16 22:05:04 +10:00
Andrew Tridgell
8533aecf18
AP_InertialSensor: fixed example build
2014-05-16 21:24:25 +10:00
priseborough
a19015ed61
AP_NavEKF: Scale divergence check with covariance
...
This provides consistent behaviour for a range of gyro bias process
noise settings and automatically adjusts sensitivity as filter learns bias
2014-05-16 21:24:25 +10:00
priseborough
0337d44b2e
AP_NavEKF: Fix bug causing immediate clearing of diverged status on reset
2014-05-16 21:24:04 +10:00
priseborough
d150904dc6
AP_NavEKF: Increase gyro bias process noise
...
This is required to stop the bias estimate from becoming too static
towards the end of longer flights.
2014-05-16 21:24:04 +10:00
Andrew Tridgell
49e7ee9ba7
GCS_MAVLink: added setup_uart() method
...
this provides a common way of dealing with UART setup for a GCS
instance. It includes code to cope with SiK radios stuck in bootloader
mode.
2014-05-16 11:44:33 +10:00
Andrew Tridgell
b3c1e515dc
AP_AHRS: when no accel info available in buffer use current value
...
this prevents an initialisation error, and is reasonable in flight too
Pair-Programmed-With: Paul Riseborough <p_riseborough@live.com.au>
2014-05-15 22:19:54 +10:00
Andrew Tridgell
315290029a
AP_AHRS: fixed check of accel sensor health
...
we need to check health of each accelerometer separately
2014-05-15 22:18:56 +10:00
Andrew Tridgell
5edf4ba596
AP_NavEKF: fixed up handling of bitfields in faultStatus
...
Pair-Programmed-With: Paul Riseborough <p_riseborough@live.com.au>
2014-05-15 21:42:39 +10:00
Andrew Tridgell
79edc4b467
GCS_MAVLink: re-generate with addition of MAV_SYS_STATUS_AHRS
2014-05-15 21:14:21 +10:00
Andrew Tridgell
ccebeba5a5
GCS_MAVLink: added MAV_SYS_STATUS_AHRS
...
will be used to indicate AHRS health
2014-05-15 21:14:21 +10:00
priseborough
f01cc78d37
DataFlash: Add EKF fault status logging
2014-05-15 21:14:21 +10:00
priseborough
ce8e1daa16
AP_NavEKF: Improved divergence detection and reset
...
Divergence is now detected by looking for very large changes in the gyro
bias. This will cause the filter to be reset and declared unhealthy for
10 seconds.
Don't reset filterDiverged status immediately during reset
Set filterDiverged true if covariance blows up
Add fault status reporting
2014-05-15 21:14:21 +10:00
Andrew Tridgell
5d2d6e0063
GCS_MAVLink: regenerated MAVLink headers
2014-05-15 21:14:21 +10:00
Andrew Tridgell
983ac9cbf4
GCS_MAVLink: merge in latest upstream XML changes
2014-05-15 21:14:21 +10:00
Andrew Tridgell
1a05c27bbb
AP_AHRS: added healthy() function
...
this will be used to report when the AHRS subsystem becomes unhealthy
2014-05-15 21:14:21 +10:00
Andrew Tridgell
086142580a
AP_InertialSensor: added VibTest sketch
...
logs all accel data at high rate to SD card
2014-05-15 21:14:21 +10:00
Jonathan Challinger
e883b889b6
SITL: Add compassmot interference
2014-05-15 21:14:20 +10:00
Randy Mackay
4ebde25a26
AP_Relay: add -1:Disabled to list of param values
2014-05-15 17:13:37 +09:00
Randy Mackay
5d20594fa4
AC_WPNav: bug fix for loiter and waypoint update rate
...
Thanks to EmileC for spotting this
2014-05-12 20:13:46 +09:00
Andrew Tridgell
85ebe81ed3
AP_NavEKF: fixed logic for divergence test
...
Pair-Programmed-With: Paul Riseborough <p_riseborough@live.com.au>
2014-05-11 18:00:38 +10:00
priseborough
40dc0e56fe
AP_NavEKF: Add protection for badly conditioned innovation variances
2014-05-11 18:00:38 +10:00
priseborough
925c5751bd
AP_NavEKF: Add ability to inhibit in-flight mag cal and clean up moding
...
This will enable in-flight magnetometer calibration to be inhibited unconditionally,
This is required for long balloon carriage flights where ground speed can be high
enough to put it into in-air state, but with very poor observability of magnetic field
states causing bad state estimates and heading offsets to develop over time.
The covariance matrix no longer has rows and columns artificially zeroed when in static
mode. Instead booleans indicating whether wind or magentic field state estimation is
active are used to:
a) Set the process noise on these states to zero to stop their variances from increasing
unchecked when not being updated, and
b) Turn off updates for these states when measurement fusion is being performed.
This reduces the likelihood of a badly conditioned covariance matrix forming
during static mode operation.
A filter divergence check has also been added that will declare the filter unhealthy if
position, velocity and magnetic field observations are all failing their innovation
consistency checks. This unhealthy status will persist for 10 seconds after the
condition clears.
AP_NavEKF: Remove unnecessary zeroing of wind covariances
2014-05-11 18:00:38 +10:00
priseborough
3026ccee13
AP_NavEKF: Use baro data during launch transients whilst in static mode
...
Baro data can be used as it will still be valid during the launch and
is not a synthesised measurement.
2014-05-11 18:00:38 +10:00
Randy Mackay
05f5164dfa
Mission: rename AUTORESET to RESTART
2014-05-09 11:31:37 +09:00
Hug0
6b0d5f9770
AP_InertialNav: fix pos error degradation rate
...
degrate position_error to 10% over 2 seconds (assumes 5hz update rate)
must be *0.7943 instead of 0.7934
2014-05-08 23:09:39 +09:00
Randy Mackay
badc127c34
AC_WPNav: fix example sketch
2014-05-08 16:25:13 +09:00
Randy Mackay
9b6a4e0fc7
AC_Sprayer: fix example sketch
2014-05-08 16:25:11 +09:00
lthall
9ab9eaec25
AC_WPNav: Loiter jerk default to 10m/s/s/s
...
Pair programmed with Randy
2014-05-08 16:16:05 +09:00
Randy Mackay
1cb297580f
Copter: reduce Circle init twitch by using stopping point
2014-05-08 16:15:57 +09:00
Randy Mackay
091ff91a70
WPNav: add wp_and_spline_init to set speeds an init pos controller
2014-05-08 16:15:50 +09:00
Randy Mackay
c13db680b7
AC_PosControl: remove reset_I_xy
...
lean_angles_to_accel is now used to load the position rate I terms based
on vehicle's initial roll and pitch angle
2014-05-08 16:15:48 +09:00
Randy Mackay
cd8b1f278c
AC_PosControl: remove unused _cos_yaw variable
...
Also removed _sin_yaw, _cos_pitch, _step saving a total of 17bytes of
RAM
Also made get_speed_up, get_speed_down, lean_angles_to_accel functions
const
2014-05-08 16:15:46 +09:00
Randy Mackay
48ec0caf75
AC_WPNav: run navigation at 10hz in SITL
2014-05-08 16:15:44 +09:00
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