Commit Graph

33720 Commits

Author SHA1 Message Date
Andrew Tridgell b18d7cfc3d HAL_ChibiOS: added missing pins for F777 2019-07-09 16:23:45 +10:00
Andrew Tridgell 092c31f370 Tools: added mRoControlZeroF7 bootloader 2019-07-09 16:23:45 +10:00
Andrew Tridgell 85b5223be1 Plane: decay fw rate integrators when at low airspeed
this prevents large fixed wing control surface integrators from
causing issues when we have wind from behind in hover
2019-07-09 16:23:45 +10:00
Andrew Tridgell 3f765d8bbe APM_Control: added decay_I() function
used by VTOL planes to decay integrator on fixed wing components when
at very low airspeed
2019-07-09 16:23:44 +10:00
Andrew Tridgell f5bf610b9a Plane: reset rate controller integrators if not run for 2s
this prevents a bug where integrator buildup can happen from a
previous flight mode
2019-07-09 16:23:44 +10:00
Andrew Tridgell f0a02bb6ba AP_NavEKF3: origin handling fixes from Francisco 2019-07-09 16:23:44 +10:00
Andrew Tridgell 450224b420 AP_NavEKF2: origin handling fixes from Francisco 2019-07-09 16:23:44 +10:00
Robin Hilliard 49d9f57c85 AP_HAL_SITL: Fix build on OSX
include pthread.h missing from Scheduler.h, similar to PR 11281.
2019-07-09 15:23:15 +10:00
Andrew Tridgell bd5d11ca82 Plane: update version for 3.9.9beta1 2019-07-08 11:41:59 +10:00
Andrew Tridgell 7e43101dbd Plane: prepare for 3.9.9beta1 release 2019-07-08 11:40:53 +10:00
Andrew Tridgell 5fde4cde06 Tools: removed unused io firmware 2019-07-08 10:37:24 +10:00
Andrew Tridgell 3293ae4c65 HAL_ChibiOS: switch to new IO firmware for fmuv5 2019-07-08 10:37:22 +10:00
Andrew Tridgell 715e167557 RC_Channel: added get_type() method 2019-07-08 10:37:19 +10:00
Andrew Tridgell 8d076ded1e AP_IOMCU: fixup 2019-07-08 10:37:16 +10:00
Andrew Tridgell 3ce762ab7c HAL_ChibiOS: support DSM bind on IOMCU 2019-07-08 10:37:13 +10:00
Andrew Tridgell 4378d92c6e Tools: update IO firmware binary 2019-07-08 10:37:11 +10:00
Andrew Tridgell 5056fa68c7 AP_IOMCU: sync with master IOMCU firmware 2019-07-08 10:37:04 +10:00
Andrew Tridgell e2155ad02d AP_NavEKF3: don't allow height datum reset when not on ground 2019-07-06 15:50:34 +10:00
Andrew Tridgell 6c54ba3e7a AP_NavEKF2: don't allow height datum reset when not on ground 2019-07-06 15:50:34 +10:00
Andrew Tridgell f44e5b4afb AP_NavEKF3: set terrainState to zero on height datum reset 2019-07-06 15:50:34 +10:00
Andrew Tridgell befefc152a AP_NavEKF2: set terrainState to zero on height datum reset 2019-07-06 15:50:34 +10:00
Andrew Tridgell 6efccab94c AP_NavEKF3: continuously update gpsGoodToAlign
use it to determine how to handle a height datum reset
2019-07-06 15:50:34 +10:00
Andrew Tridgell 358aaab472 AP_NavEKF2: continuously update gpsGoodToAlign
use it to determine how to handle a height datum reset
2019-07-06 15:50:34 +10:00
Andrew Tridgell 64ba098c57 AP_NavEKF3: ensure that both AMSL and relative alt are correct after a reset
this forces the EKF origin to the GPS alt on a height datum reset if
we have GPS lock. If we don't do this then the reported AMSL alt will
drift over time away from the GPS alt when we reset while on the
ground
2019-07-06 15:50:34 +10:00
Andrew Tridgell 2fc28e2eae AP_NavEKF2: ensure that both AMSL and relative alt are correct after a reset
this forces the EKF origin to the GPS alt on a height datum reset if
we have GPS lock. If we don't do this then the reported AMSL alt will
drift over time away from the GPS alt when we reset while on the
ground
2019-07-06 15:50:34 +10:00
Andrew Tridgell f52ccd9982 Plane: fixed home reset alt bias
this fixes a bug in the set of home alt while disarmed. The set had a
circular dependency which could cause a large bias to build up between
home alt and gps alt due to small fluctuations in barometer data

Thanks to Nick Allen for spotting this
2019-07-06 15:50:34 +10:00
Andrew Tridgell f6004ddfe3 AP_RCProtocol: fixed a overflow in SRXL decoder
thanks to coverity 343308 and Peter for noticing
2019-07-06 15:50:34 +10:00
Andrew Tridgell c452486f0a AP_NavEKF3: force first EKF lane when disarmed
this ensures we consistently fly with EKF lane1 if it is healthy at
the point we arm. Otherwise the choice of lane will be a lottery.

This is important as many systems have quite different filtering and
vibration characteristics on their different IMUs. We by default
enable fast sampling only on the first IMU for example, which means
the 2nd and 3rd IMUs are more vulnerable to high freq causing
aliasing.
2019-07-06 15:50:34 +10:00
Andrew Tridgell 760bbf9921 AP_NavEKF2: force first EKF lane when disarmed
this ensures we consistently fly with EKF lane1 if it is healthy at
the point we arm. Otherwise the choice of lane will be a lottery.

This is important as many systems have quite different filtering and
vibration characteristics on their different IMUs. We by default
enable fast sampling only on the first IMU for example, which means
the 2nd and 3rd IMUs are more vulnerable to high freq causing
aliasing.
2019-07-06 15:50:34 +10:00
Andrew Tridgell 1de946b29e AP_NavEKF2: default EK2_MAG_EF_LIM to 50
this was supposed to be part of the original PR (agreed with Paul to
enable by default)
2019-07-06 15:50:34 +10:00
Andrew Tridgell 994a4b2082 AP_NavEKF2: constrain field by table after fusion
this should make for faster convergence
2019-07-06 15:50:34 +10:00
Andrew Tridgell 6f5d0fa3f0 AP_NavEKF2: added EK2_MAG_EF_LIM parameter
this sets a limit on the difference between the earth field from the
WMM tables and the learned earth field inside the EKF. Setting it to
zero disables the feature. A positive value sets the limit in mGauss.
2019-07-06 15:50:34 +10:00
Andrew Tridgell 74805870b8 AP_Compass: use new get_earth_field_ga() API 2019-07-06 15:50:34 +10:00
Andrew Tridgell 7814a3f2e3 AP_Declination: added get_earth_field_ga() interface
this gives a more convenient API for getting the earth field as a
vector
2019-07-06 15:50:34 +10:00
Andrew Tridgell 659458f208 AP_NavEKF3: don't use disabled gyros in opticalflow takeoff detection 2019-07-06 15:50:34 +10:00
Andrew Tridgell 14265d9580 AP_NavEKF2: don't use disabled gyros in opticalflow takeoff detection 2019-07-06 15:50:34 +10:00
Andrew Tridgell 91889d22cd AP_Mount: don't use disabled IMUs in solo gimbal code 2019-07-06 15:50:34 +10:00
Andrew Tridgell 1f309e8401 AP_AHRS: only use enabled IMUs in DCM
honor the INS_USE parameters for DCM
2019-07-06 15:50:34 +10:00
Andrew Tridgell 7a9203ef29 AP_InertialSensor: zero accumulators on time step
this zeros the delta angle and delta velocity accumulators when a
sensor is unavailable for a period of 0.1s. This prevents garbage
values being passed into the EKF when a sensor dies and then becomes
available again some time later
2019-07-06 15:50:34 +10:00
Andrew Tridgell a5e3cd664b AP_InertialSensor: added RC switch for killing IMUs 2019-07-06 15:50:34 +10:00
Andrew Tridgell d0792f29da HAL_ChibiOS: cope with calling delay_microseconds_boost() multiple times
needed for updated IMU wait code
2019-07-06 10:03:18 +10:00
Andrew Tridgell 0bbe9bfb71 AP_InertialSensor: try much harder to get all IMU samples
this we ensures we get new data for all active IMUs on each loop,
rather than sometimes returning with some IMUs not having data.

This matters as not having a sample on an IMU for a single loop can
cause an EKF IMU failover, which will degrade the learned bias
variances

The issue is usually only seen under high load, such as requesting a
loop rate beyond what the hardware is capable of
2019-07-06 10:03:18 +10:00
Andrew Tridgell 47f9cce612 AP_NavEKF3: added inactive bias learning
this allows for biases on inactive IMUs to be learned so that an IMU
switch within an EKF lane does not cause a jump in the IMU data
2019-07-06 08:34:31 +10:00
Andrew Tridgell 9f4085b0bc AP_NavEKF2: learn gyro biases for inactive gyros
this allows us to learn the gyro biases each lane would need if it had
to switch to another gyro due to a sensor failure. This prevents a
sudden change in gyro bias on IMU failure
2019-07-06 08:33:59 +10:00
Andrew Tridgell a91af12364 AP_GPS: fixed u-blox F9 auto configuration
# Conflicts:
#	libraries/AP_GPS/AP_GPS_UBLOX.cpp
2019-07-06 08:33:15 +10:00
Andrew Tridgell 1cd90e5ae7 AP_GPS_UBLOX: add support for TIMEGPS message. used to get gps week 2019-06-29 10:05:03 +10:00
Andrew Tridgell 04438e8460 Tools: updated bootloader binaries 2019-05-06 09:04:11 +10:00
Andrew Tridgell a03b3051fc HAL_ChibiOS: fixed LEDs on new CUAVv5 revision
# Conflicts:
#	libraries/AP_HAL_ChibiOS/hwdef/CUAVv5/hwdef.dat
2019-05-03 17:32:32 +10:00
Andrew Tridgell c51b433c28 HAL_ChibiOS: fixed LEDs on CUAVv5Nano
need to be opendrain
2019-05-03 17:31:45 +10:00
Andrew Tridgell 376031c5f4 AP_Notify: don't use pinMode for pixracer LEDs
this is needed for LEDs that are driven by 5V, which means they need
to use OPENDRAIN.
2019-05-03 17:31:41 +10:00