Commit Graph

22797 Commits

Author SHA1 Message Date
murata
a8af4b2937 AP_Beacon: Change the tab code to whitespace 2020-04-27 09:32:56 +09:00
murata
c713a984da AP_WheelEncoder: Change the tab code to whitespace 2020-04-27 09:32:15 +09:00
murata
1a346e5b19 AP_VisualOdom: Change the tab code to whitespace 2020-04-27 09:30:00 +09:00
murata
1fdcab2b5a AP_Parachute: Change the tab code to whitespace 2020-04-27 09:29:45 +09:00
murata
dec231348e AP_OpticalFlow: Change the tab code to whitespace 2020-04-27 09:29:39 +09:00
murata
509d376c29 AP_Motors: Change the tab code to whitespace 2020-04-27 09:29:32 +09:00
murata
cd981695a6 AP_Mission: Change the tab code to whitespace 2020-04-27 09:29:25 +09:00
murata
28ccc167f7 AP_LandingGear: Change the tab code to whitespace 2020-04-27 09:29:18 +09:00
murata
03e658772a AP_IRLock: Change the tab code to whitespace 2020-04-27 09:29:11 +09:00
murata
3967c46c1a AP_Gripper: Change the tab code to whitespace 2020-04-27 09:29:02 +09:00
murata
a3278c73e3 AC_Sprayer: Change the tab code to whitespace 2020-04-27 09:28:51 +09:00
Ivannikov Kirill
3ab1b29397 AP_HAL_ChibiOS: error if system clock not 1mhz on 16 CH_CFG_ST_RESOLUTION. prevent variable overflow
if CH_CFG_ST_FREQUENCY not match 1000000U on 16 bit CH_CFG_ST_RESOLUTION
we try to multiply now *= 1000000U/CH_CFG_ST_FREQUENCY; it may overflow 16 bit value.
2020-04-26 19:58:54 +10:00
Peter Barker
f882bd0c3e AP_Logger: remove unused UBY1/UBY2 messages
These appear to have been replaced with instance fields on the UBX1 and
UBX2 messages.

Also mark the Instance field on UBX1, UBX2 as an instance field.
2020-04-26 11:35:04 +10:00
Peter Barker
7e3c9c209e AP_Logger: document GPSB and GPAB 2020-04-26 09:02:39 +10:00
Peter Barker
6b232ee515 AP_Baro: add documentation for ICBM message (ICM20789 diagnostics) 2020-04-26 09:02:39 +10:00
Randy Mackay
91a79543c9 AP_NavEKF3: getLLH fix when no GPS available 2020-04-24 20:29:18 +09:00
Randy Mackay
2919491298 AP_NavEKF2: getLLH fix when no GPS available 2020-04-24 20:29:18 +09:00
Andrew Tridgell
d9e2a644ea HAL_ChibiOS: fixed Durandal buzzer in bootloader
need to pull low to avoid buzzer running in bootloader
2020-04-24 19:46:22 +10:00
bugobliterator
b94f089984 HAL_ChibiOS: improve throughput of slcan router 2020-04-24 19:39:18 +10:00
Randy Mackay
585c806618 AP_AHRS: add get_primary_core_index 2020-04-24 18:18:05 +09:00
Randy Mackay
6e93f54cff AP_NavEKF2: handle external nav position resets 2020-04-24 18:16:52 +09:00
Randy Mackay
990313371d AP_NavEKF2: minor comment fixes 2020-04-24 18:16:52 +09:00
Randy Mackay
43c9e13372 AP_NavEKF2: rename HGT_SOURCE_EV to HGT_SOURCE_EXTNAV
presumably EV stands for ExternalVision but we normally refer to this source as External Nav
2020-04-24 18:16:52 +09:00
Randy Mackay
014c889ceb AP_NavEKF2: setAidingMode uses lastExtNavPassTime_ms 2020-04-24 18:16:52 +09:00
Randy Mackay
3b20623a31 AP_NavEKF2: remove unused ext nav elements 2020-04-24 18:16:52 +09:00
Peter Barker
3440a64b66 AP_NavEKF3: correct description on XKY0 2020-04-24 18:08:14 +10:00
Peter Barker
aa3165b71c AP_NavEKF3: remove incorrect units from yaw esimtator LoggerMessage 2020-04-24 18:08:14 +10:00
Peter Barker
7dfc285f2a AP_NavEKF2: remove incorrect units from yaw esimtator LoggerMessage 2020-04-24 18:08:14 +10:00
Andrew Tridgell
43ac58c63b HAL_ChibiOS: added STM32CubeMX configs for H7 processor crystal varients
useful for checking clock config changes
2020-04-24 16:55:03 +10:00
Andrew Tridgell
db642717be HAL_ChibiOS: fixed clock for FDCAN to be below 80MHz
we were running at 100MHz, which is out of spec
2020-04-24 16:55:03 +10:00
Andrew Tridgell
2c68ce1986 HAL_ChibiOS: fixed clock source for FDCAN
use selected source and add 80MHz limit, as per manual and latest STM32CubeMX tool
2020-04-24 16:55:03 +10:00
Tatsuya Yamaguchi
c4fe6fce1c AP_Arming: make RC check message clearer 2020-04-24 10:52:33 +09:00
Andrew Tridgell
43ef8a192b AP_NavEKF3: added missing log documentation for field C 2020-04-24 09:43:23 +10:00
Andrew Tridgell
d8c533e7ab AP_NavEKF2: added missing log documentation for field C 2020-04-24 09:43:23 +10:00
Paul Riseborough
8f1b732d79 AP_NavEKF2: Add documentation for GSF logging 2020-04-24 09:43:23 +10:00
Paul Riseborough
1720c8de0f AP_NavEKF3: Add documentation for GSF logging 2020-04-24 09:43:23 +10:00
Paul Riseborough
9bdb89474a AP_NavEKF3: Use unique names for EKF2 logging 2020-04-24 09:43:23 +10:00
Paul Riseborough
49e4c799d3 AP_NavEKF2: Use unique names for EKF2 logging 2020-04-24 09:43:23 +10:00
Andrew Tridgell
080f555b16 AP_NavEKF3: remove unused isDeltaYaw param from resetQuatStateYawOnly 2020-04-24 09:43:23 +10:00
Andrew Tridgell
197d31e9cc AP_NavEKF3: fixed in-flight yaw reset 2020-04-24 09:43:23 +10:00
Randy Mackay
86d221708c AP_NavEKF3: more white space fixes 2020-04-24 09:43:23 +10:00
Randy Mackay
4d7e7a960a AP_NavEKF2: more white space fixes 2020-04-24 09:43:23 +10:00
Randy Mackay
a43beaaa23 AP_NavEKF: GSF white space fixes 2020-04-24 09:43:23 +10:00
Randy Mackay
0fb233ed4b AP_NavEKF2: minor comment fixes 2020-04-24 09:43:23 +10:00
Randy Mackay
c1ef894a30 AP_NavEKF3: getDataEKFGSF and getYawData pass by reference 2020-04-24 09:43:23 +10:00
Randy Mackay
a9cbd5aa29 AP_NavEKF2: getDataEKFGSF and getYawData pass by reference 2020-04-24 09:43:23 +10:00
Randy Mackay
1ee9f3a6de AP_NavEKF: GSF getLogData and getYawData pass by reference 2020-04-24 09:43:23 +10:00
Randy Mackay
8a8271c2c7 AP_NavEKF3: minor format fixes 2020-04-24 09:43:23 +10:00
Randy Mackay
d61c517e76 AP_NavEKF2: minor format fix 2020-04-24 09:43:23 +10:00
Randy Mackay
ed3d072318 AP_NavEKF3: rename GSF_RUN_MASK, GSF_USE_MASK, GSF_RST_MAX 2020-04-24 09:43:23 +10:00
Randy Mackay
91ef87064a AP_NavEKF2: rename GSF_RUN_MASK, GSF_USE_MASK, GSF_RST_MAX 2020-04-24 09:43:23 +10:00
Paul Riseborough
7ba39c844c AP_NavEKF3: Split GSF yaw estimator processing
Separate prediction and correction steps are required to provide an up to
2020-04-24 09:43:23 +10:00
Paul Riseborough
abc821ad36 AP_NavEKF2: Split GSF yaw estimator processing
Separate prediction and correction steps are required to provide an up to date yaw estimate using IMU prediction before it may be required by SelectMagFusion() whilst still doing the velocity update after GPS data haw been pulled from the buffer by SelectVelPosFusion()
2020-04-24 09:43:23 +10:00
Andrew Tridgell
216935c1f2 AP_NavEKF3: fixed loss of GPS fusion
we must not do a storedGPS.recall unless we will be using the data,
otherwise we will lose GPS samples and risk stopping GPS fusion
2020-04-24 09:43:23 +10:00
Andrew Tridgell
c83e2d7c0e AP_NavEKF2: fixed loss of GPS fusion
we must not do a storedGPS.recall unless we will be using the data,
otherwise we will lose GPS samples and risk stopping GPS fusion
2020-04-24 09:43:23 +10:00
Andrew Tridgell
6c3889b04f AP_NavEKF2: fixed typos 2020-04-24 09:43:23 +10:00
Andrew Tridgell
3edbe81b1e AP_NavEKF2: removed 2nd set of imuSampleTime_ms 2020-04-24 09:43:23 +10:00
Paul Riseborough
9f5e037015 AP_NavEKF3: Restore bug fix lost during rebase 2020-04-24 09:43:23 +10:00
Paul Riseborough
6952d83f00 AP_NavEKF2: Fix casting build error 2020-04-24 09:43:23 +10:00
Paul Riseborough
53df8a0238 AP_NavEKF3: Fix timer wrapping bug 2020-04-24 09:43:23 +10:00
Paul Riseborough
0d965d2a1c AP_NavEKF2: Fix timer wrapping bugs
Also replaces tab characters
2020-04-24 09:43:23 +10:00
Paul Riseborough
12d639fc17 AP_NavEKF3: Misc changes arising from review
AP_NavEKF3: Fix typo in comment

AP_NavEKF3: Use uint32_t data type for msec timers

AP_NavEKF3: Misc msec timer fixes

Fix wrapping bug.
Use common timestamp.

AP_NavEKF3: Format fixes - remove tabs

AP_NavEKF3: Fix typing and wrap issue on time comparison
2020-04-24 09:43:23 +10:00
Paul Riseborough
51b62a34b9 AP_NavEKF: Use better type for array index 2020-04-24 09:43:23 +10:00
Paul Riseborough
4b3952bd15 AP_NavEKF3: Eliminate unnecessary function call 2020-04-24 09:43:23 +10:00
Paul Riseborough
6ec69e6ed1 AP_NavEKF3: Update EK3_MAG_CAL parameter advice 2020-04-24 09:43:23 +10:00
Paul Riseborough
a66479104d AP_AHRS: fix failure to arm when not using compass for yaw 2020-04-24 09:43:23 +10:00
Andrew Tridgell
6b6f083bf2 RC_Channel: added lane switch RCn_OPTION=103
RC_Channel: added yaw reset switch RCn_OPTION=104
2020-04-24 09:43:23 +10:00
Paul Riseborough
22c2ea7cbf AP_AHRS: Add accessor function for EKF yaw reset request
AP_AHRS: Send yaw reset request to EKF2
2020-04-24 09:43:23 +10:00
Paul Riseborough
9cf75bf22e AP_AHRS: Enable EKF3 default airspeed to be set
AP_AHRS: Send default airspeed to EKF2
2020-04-24 09:43:23 +10:00
Paul Riseborough
de0040ad69 AP_NavEKF2: Enable use of EKF-GSF yaw estimate
Enables the yaw to be reset in flight to a value estimated from a specialised yaw estimator. This allows faster recovery if taking off with a bad magnetometer and also allows yaw alignment and GPS use to commence in-air when operating without any yaw sensing.

AP_NavEKF2: Add missing accesor functions for default airspeed
2020-04-24 09:43:23 +10:00
Paul Riseborough
863f989130 AP_NavEKF3: Fix integration of GPS yaw options
AP_NavEKF3: fix failure to arm with EK3_MAG_CAL = 7

AP_NavEKF3: Fix failure to arm when not using magnetometer

AP_NavEKF3: Reduce yaw drift when EK3_MAG_CAL = 7
2020-04-24 09:43:22 +10:00
Paul Riseborough
410b5825fb AP_NavEKF3: Enable use of EKF-GSF yaw estimate
AP_NavEKF3: Add emergency yaw reset using a Gussian Sum Filter estimate

AP_NavEKF3: Reduce default minimum GPS velocity noise for Copters

Enables fail-safe to be set with more sensitivity and improves tracking accuracy.
Origin values were set using typical GPS performance for receivers on sale 6 years ago. Receiver performance has improved since then.

AP_NavEKF3: Prevent constant mag anomaly yaw resets

Prevents constant magnetic anomaly induced resets that can be triggered when flying with vehicle generated magnetic interference.
Allows for two resets per takeoff. Allowance for two resets is required, becasue a large ground based magnetic yaw anomaly can cause a sufficiently large yaw innovation that two resets in close succession are required.

AP_NavEKF3: Add option to fly without magnetometer

AP_NavEKF3: Rework emergency yaw reset logic

Use a separate external accessor function to request the yaw reset.
Allow reset requests to remain active for a defined period of time.
Tidy up reset function to split out accuracy check.

AP_NavEKF3: Fix vulnerability to lane switch race condition

Prevents the situation where a lane switch results in a lane being selected that does not have the correct yaw. This can occur if the primary lane becomes unhealthy before the external failsafe monitor has time to react.

AP_NavEKF3: Fix EKF_MAG_CAL = 6 behaviours

Fix bug causing the yaw alignment to be performed at startup before the GSF had a valid estimate.
Fix bug causing emergency yaw message to be output for a normal reset.
Fix vulnerability to reported negative yaw variance.
Remove duplicate timer checks.

AP_NavEKF3: Update EK3_MAG_CAL documentation

AP_NavEKF3: Relax yaw gyro bias convergence check when not using mag

AP_NavEKF3: Reduce yaw drift in hover with no yaw sensor

Uses the GSF yaw estimate if available which is better than the EKF's own yaw when no yaw sensor is available.
2020-04-24 09:43:22 +10:00
Paul Riseborough
6bb7c55bba AP_NavEKF: Add yaw estimator class using Gaussian Sum Filter
AP_NavEKF: Simplify centripetal accel correction
2020-04-24 09:43:22 +10:00
Peter Barker
eee0f028ba AP_Logger: fix examples
Having a valid AP_Scheduler is now a requirement
2020-04-23 11:33:41 +09:00
Andrew Tridgell
4ec1717361 HAL_ChibiOS: enable IMU temp control on CUAV-X7 2020-04-23 09:05:52 +10:00
Andrew Tridgell
56b0dddb7c HAL_ChibiOS: set IMU temp on CUAV-X7 2020-04-23 07:28:13 +10:00
Andrew Tridgell
5892e6421e HAL_ChibiOS: enable DRDY on ADIS16470 on CUAV-X7 2020-04-23 07:28:13 +10:00
Andrew Tridgell
ffe773ff6f HAL_ChibiOS: use DRDY pin for ADIS16470 on mRoNexus 2020-04-23 07:28:13 +10:00
Andrew Tridgell
5c6749ee54 AP_InertialSensor: use wait_pin() to wait for DRDY pin if available 2020-04-23 07:28:13 +10:00
Andrew Tridgell
450871cde1 HAL_ChibiOS: added wait_pin() implementation 2020-04-23 07:28:13 +10:00
Andrew Tridgell
34df438560 AP_HAL: added wait_pin() API
for waiting on data-ready lines
2020-04-23 07:28:13 +10:00
Andrew Tridgell
8e977183fe HAL_ChibiOS: added mRoNexus 2020-04-23 07:28:13 +10:00
Randy Mackay
6f8176c71e GCS_MAVLink: remove ahrs3 2020-04-22 14:11:17 +09:00
Mark Whitehorn
dbfbe50737 SITL: update flightaxis defaults 2020-04-22 12:36:03 +10:00
Randy Mackay
47c7c8fb53 RC_Channel: rover option param desc gets Viso Align 2020-04-22 10:34:18 +09:00
Peter Barker
653b554a31 SITL: add simulated mavlink-attached rangefinder 2020-04-21 20:44:59 +10:00
Peter Barker
185bc68476 AP_HAL_SITL: add simulated mavlink-attached rangefinder 2020-04-21 20:44:59 +10:00
Andrew Tridgell
6be519fb0d HAL_ChibiOS: added alt-config for UART4 on omnibusf4pro 2020-04-21 18:42:12 +10:00
Andrew Tridgell
6347d0adb0 AP_GPS: leave uart2 config enabled when using uart2 MB setup 2020-04-21 15:30:54 +10:00
Andrew Tridgell
f3a5d915f3 AP_GPS: allow for larger average delta on MB rover than normal 2020-04-21 15:30:54 +10:00
Andrew Tridgell
36098c3221 AP_GPS: improved delay health threshold
allow for missing frames without showing unhealthy on GCS
2020-04-21 15:30:54 +10:00
Andrew Tridgell
3397ed766d AP_GPS: enable ublox moving baseline compilation option
disable for HAL_MINIMIZE_FEATURES and if max receivers 1. This fixes
the f103-GPS AP_Periph build
2020-04-21 15:30:54 +10:00
Andrew Tridgell
ae2132d861 AP_GPS: added check for Z error in moving baseline ublox
this ensures we don't get bad yaw from having the right distance but
incorrect Z offset for the currently expected roll/pitch
2020-04-21 15:30:54 +10:00
Andrew Tridgell
7027eecd34 AP_GPS: added GPS_DRV_OPTIONS
this allows for configuration of moving baseline with either uart1 or
uart2 for the RTCM data. Using uart2 requires an extra cable between
the two modules, but requires less uart bandwidth which is good when
DMA channels are low. Using uart2 also avoids the rtcmv3 parser, which
saves memory
2020-04-21 15:30:54 +10:00
Andrew Tridgell
9a6de209ab AP_GPS: ensure that PVT and RELPOSNED msgs time align
this ensures we wait until we have a matching PVT and RELPOSNED
message before we report new data. If we stop receiving RELPOSNED
messages then disable yaw support
2020-04-21 15:30:54 +10:00
Andrew Tridgell
3fbeae613b AP_GPS: fixed moving baseline yaw calculation
this reverts #13955 and instead applies the correct fix, which is to
subtract the angle instead of adding.
2020-04-21 15:30:54 +10:00
Randy Mackay
3195a7cccd AC_Circle: z-axis target only updated during terrain following
This allows the circle flight mode to externally control the altitude target
2020-04-21 11:39:38 +09:00
murata
2af70f5e60 AP_Arming: Display mag field value 2020-04-21 10:51:48 +09:00
Randy Mackay
35dcb0d752 AP_NavEKF2: CorrectExtNavForSensorOffset made const 2020-04-21 10:21:23 +10:00
Randy Mackay
7470bc9994 AP_NavEKF3: CorrectGPSForAntennaOffset made const
also reduce scope of call to slightly reduce CPU load
2020-04-21 10:21:23 +10:00