jackhong12
4a4f361a17
all: use CLASS_NO_COPY() macro
2022-10-04 11:23:04 +11:00
Andrew Tridgell
17d9018a91
AP_NavEKF3: fixed EKF3 origin alt inconsistency
...
always use common origin, and adjust output posD for difference
between public and local lane origin heights
2022-09-30 07:44:42 +10:00
Paul Riseborough
481bec5ff5
AP_NavEKF3: Allow wind states to recover faster when airspeed sensor failed
2022-09-26 14:17:53 +10:00
Paul Riseborough
399f30bfce
AP_NavEKF3: Allow reporting of airspeed consistency for a deselected sensor
2022-09-26 14:17:53 +10:00
Paul Riseborough
eb0e9230a1
AP_NavEKF3: Add accessor function for airspeed health monitoring
2022-09-26 14:17:53 +10:00
Paul Riseborough
608b4c0713
AP_NavEKF3: Enable monitoring of unhealthy airspeed sensors
...
Innovations and innovation test ratios will still be calculated and reported for an unhealthy sensor, but the EKF states wnd covariance matrix will not be modified.
2022-09-26 14:17:53 +10:00
Peter Barker
0665f9c32b
AP_NavEKF3: store and use lastKnownPositionD
...
When returning our last-known-position we were supplying lat/lng but not
altitude.
This usually really doesn't matter as this result generally isn't used,
especially for altitude. OTOH, it may prevent a bug into the future.
2022-08-22 19:48:03 +10:00
nrt
0c65cd1b47
AP_NavEKF3: added a getter function to infer the source index used by ekf3
2022-08-18 02:05:27 -04:00
Peter Barker
1b13dd053b
AP_NavEKF3: use send_mesage for sending status report
2022-08-16 09:45:51 +10:00
Peter Barker
0443c8561b
AP_NavEKF3: stop using GCS_MAVLINK.h in header files
...
... by passing through a reference to a link object instead
2022-08-16 09:45:51 +10:00
Tamas Nepusz
8959d35b91
AP_NavEKF3: add EK3_GPS_VACC_MAX as a threshold that decides whether to use GPS as altitude source depending on vAcc
2022-08-03 17:57:05 +10:00
Henry Wurzburg
b7f49db1f7
AP_NavEKF3: Add streaming log verbosity level parameter
2022-08-02 10:21:39 +10:00
Iampete1
cf14e741ee
AP_NavEKF3: only include log struture if enabled
2022-07-13 18:14:12 +10:00
Andrew Tridgell
e2a83ba428
AP_NavEKF3: fixed undefined behaviour in logging
2022-07-12 11:00:08 +10:00
Pierre Kancir
21890000f7
AP_NavEKF3: fix python files exec permissions
2022-06-08 08:16:42 +09:00
Andrew Tridgell
d5670ace3b
AP_NavEKF3: fixed use of configured() vs configured_in_storage()
2022-06-06 13:11:50 +10:00
Andrew Tridgell
74c4f3c9a9
AP_NavEKF3: log set source events
2022-05-31 09:17:37 +10:00
Randy Mackay
eafb118b47
AP_NavEKF3: set filter status dead_reckoning bit
2022-05-25 20:05:21 +09:00
Randy Mackay
e37bf9ad53
AP_NavEKF3: drag fusion for att and velAiding
...
also add dragTimeout
2022-05-25 20:05:21 +09:00
Randy Mackay
61c4643aed
AP_NavEKF3: minor comment fix
2022-05-25 20:05:21 +09:00
Ruffalo-sunghwan
5a4d61e3a4
AP_NavEKF3 : correct comment spelling
2022-05-24 20:27:45 +09:00
Randy Mackay
e0023a99bc
AP_NavEKF3: replace AP_HAL::millis() with dal.millis()
2022-05-18 17:59:57 +10:00
Randy Mackay
37e9ce3fb7
AP_NavEKF3: correct wind estimate param descriptions
...
EK3_MCOEF becomes EK3_DRAG_MCOEF
EK3_BCOEF_X/Y becomes EK3_DRAG_BCOEF_X/Y
2022-04-13 07:57:35 +09:00
Peter Barker
0b16c4063e
AP_NavEKF3: stop libraries including AP_Logger.h in .h files
...
AP_Logger.h is a nexus of includes; while this is being improved over
time, there's no reason for the library headers to include AP_Logger.h
as the logger itself is access by singleton and the structures are in
LogStructure.h
This necessitated moving The PID_Info structure out of AP_Logger's
namespace. This cleans up a pretty nasty bit - that structure is
definitely not simply used for logging, but also used to pass pid
information around to controllers!
There are a lot of patches in here because AP_Logger.h, acting as a
nexus, was providing transitive header file inclusion in many (some
unlikely!) places.
2022-04-08 19:18:38 +10:00
Peter Barker
adf9c21d48
AP_NavEKF3: remove instance id from EK3 external interface
...
Removes passing of instance id in interfaces where -1 was the only value
ever passed in
2022-04-06 17:36:05 +10:00
Peter Barker
df4911cbcb
AP_NavEKF3: avoid direct use of Location alt field
2022-03-22 10:33:37 +11:00
Andrew Tridgell
a4da65ea05
AP_NavEKF3: fixed constrain indexing bug
...
fixes #20180
thanks to @liyue75 for spotting this!
2022-03-01 17:06:44 +09:00
Henry Wurzburg
0f05cb06fa
AP_NavEKF3: update and correct GSF parameter documentation
2022-02-15 10:56:35 +11:00
Randy Mackay
0c7ad9511f
AP_NavEKF3: FuseOptFlow only calculates range and velocity once
...
was unnecessarily recalculating these values before fusion
2022-02-09 08:42:29 +09:00
Andrew Tridgell
9dcff1a23f
AP_NavEKF3: set rejecting_airspeed flag
...
we report as rejecting airspeed when we have not fused airspeed for 3s
and want to use airspeed
2022-02-07 14:13:49 +11:00
Randy Mackay
cfcdc1e78f
AP_NavEKF3: optflow terrain reset after 5sec
2022-02-02 18:04:43 +11:00
Randy Mackay
e16a64383f
AP_NavEKF3: getOptFlowSample returns latest correct flow data for use in calibration
2022-01-29 08:26:12 +09:00
Randy Mackay
cff3794d25
AP_NavEKF3: minor spelling fixes
2022-01-17 11:30:47 +09:00
VMsunghwan
db9c1bbfaf
AP_NavEKF3 : correct typo
...
receverPosDownMax -> receiverPosDownMax
receverPosDownMin -> receiverPosDownMin
calcuate -> calculate
2022-01-17 11:25:56 +09:00
Hwurzburg
970e5f829b
AP_NavEKF3: remove user unintelligible GCS message
2022-01-12 08:11:18 +11:00
Andrew Tridgell
a33febd90a
AP_NavEKF3: fixed gaps in EKF logging
...
timestamps should not be static as otherwise some lanes will not be
logged
2021-12-28 16:03:47 +11:00
Paul Riseborough
5178f4a7d0
AP_NavEKF3: Add missing covariance row reset
2021-12-20 09:28:37 +11:00
Peter Barker
0cb4425eb9
AP_NavEKF3: fix type, 'willbe' -> 'will be'
2021-12-17 09:44:57 +09:00
Peter Barker
15ec2c9c40
AP_NavEKF3: allow boards to override NavEKF3 features
2021-12-14 11:12:50 +11:00
Andrew Tridgell
468444bef9
AP_NavEKF3: revert compass parameter changes
2021-12-04 16:51:53 +11:00
Peter Barker
308f4e99b4
AP_NavEKF3: correct structure used for logging
...
XKF4 and XKF5 are clones of NKF4 and NKF5, which is why this worked
2021-12-03 15:34:21 +09:00
Josh Henderson
a89f58a775
AP_NavEKF3: allow define for IMU_MASK_DEFAULT
2021-11-30 10:20:54 +11:00
Iampete1
e818decc39
AP_NavEKF3: update compass param discription
2021-11-30 08:14:43 +09:00
Andrew Tridgell
86c481b4b0
AP_NavEKF3: fixed switch to non-zero primary on disarm
...
if EK3_PRIMARY is not zero then we were not switching to it when
disarmed
2021-11-07 10:11:52 +11:00
Andrew Tridgell
282209e3e6
AP_NavEKF3: add accessor for GSF yaw estimator
2021-11-01 09:00:27 +11:00
Andy Piper
bc0101e446
AP_NavEKF3: convert APM_BUILD_COPTER_OR_HELI() to APM_BUILD_COPTER_OR_HELI
2021-10-26 11:42:12 +11:00
Peter Barker
670663a741
AP_NavEKF3: allow hwdef to override IMU default
2021-10-16 10:26:29 +11:00
Gone4Dirt
0abfde0a7d
AP_NavEKF3: Add APM_BUILD_Heli
2021-09-29 19:55:48 +10:00
Josh Henderson
67eb6d17eb
AP_NavEKF3: initialize stateStruct.quat to unit length
2021-09-28 19:09:16 +10:00
Paul Riseborough
c828bdfbc9
AP_NavEKF3: Reduce output observer vertical velocity error when bad IMU
2021-09-23 18:55:28 +10:00
Paul Riseborough
8429c66860
AP_NavEKF3: Make subsequent bad IMU event detections faster
2021-09-23 18:55:28 +10:00
Paul Riseborough
458c67639d
AP_NavEKF3: Force velocity state to follow GPS when IMU data is bad
2021-09-23 18:55:28 +10:00
Paul Riseborough
c0d88e2673
AP_NavEKF3: Fix vertical velocity reset
...
Fixes bug that prevents the vertical velocity being reset to the GPS if the position aiding has already timed out and improves sensitivity of the bad IMU data check.
2021-09-23 18:55:28 +10:00
Paul Riseborough
17c2ba5ac1
AP_NavEKF3: Fix bug causing too frequent resets if bad IMU data detected
2021-09-23 18:55:28 +10:00
Peter Barker
b66fd214f0
AP_NavEKF3: move from HAL_NO_GCS to HAL_GCS_ENABLED
2021-09-22 21:37:00 +10:00
Paul Riseborough
e9c339a0a0
AP_NavEKF3: fix wind speed covariance initialisation bug
2021-09-21 17:16:36 +10:00
Josh Henderson
3006d50f97
AP_NavEKF3: use vector.xy().length() instead of norm(x,y)
2021-09-14 10:43:46 +10:00
Peter Barker
dabba69b5e
AP_NavEKF3: improve description of XKF4/NKF4 fields
...
Courtesy Paul Riseborough here: https://github.com/ArduPilot/ardupilot_wiki/issues/3641#issuecomment-913577132
2021-09-08 17:06:12 +10:00
Randy Mackay
63e579d738
AP_NavEKF3: add using_extnav_for_yaw
2021-08-31 09:20:17 +10:00
Randy Mackay
0edfd2634f
AP_NavEKF3: rename using_external_yaw to using_noncompass_for_yaw
2021-08-31 09:20:17 +10:00
Randy Mackay
d1f2acd813
AP_NavEKF3: rename varInnovOptFlow to flowVarInnov
...
also renamed innovOptFlow to flowInnov
2021-08-24 16:49:04 +09:00
Randy Mackay
85ade10e85
AP_NavEKF3: ofDataNew made local
2021-08-24 16:49:04 +09:00
Randy Mackay
11847cfcf5
AP_NavEKF3: always calculate optical flow innovations and variances
2021-08-24 16:49:04 +09:00
Randy Mackay
914a8dca49
AP_NavEKF3: for loops use uint8_t instead of unsigned
2021-08-24 16:49:04 +09:00
Randy Mackay
5779ebd177
AP_NavEKF3: remove unused Tbn_flow
2021-08-24 16:49:04 +09:00
Randy Mackay
f9fd63e01e
AP_NavEKF3: remove unused optflow calcs
2021-08-24 16:49:04 +09:00
TunaLobster
d6a5622fcb
AP_NavEKF3: Remove @RebootRequired: False
2021-08-19 10:00:16 +10:00
Andrew Tridgell
5c86cc6828
AP_NavEKF3: added EK3_PRIMARY parameter
...
allows for selection of which IMU to use on startup
2021-08-17 06:42:42 +10:00
Pierre Kancir
8216905f47
AP_NavEKF3: remove unecessary assignements
2021-08-12 10:39:49 +09:00
Randy Mackay
2a2cde68ef
AP_NavEKF3: skip GSF reset count check if source actively changed
...
also only fail all compass on emergency reset
2021-08-10 09:44:57 +10:00
Andrew Tridgell
ff59e0f72f
AP_NavEKF3: fixed output LLH to account for IMU offset
...
thanks to Paul and Randy
2021-08-09 19:19:21 +10:00
Randy Mackay
2f1444772b
AP_NavEKF3: XKF3.IYAW logs in degrees
2021-08-09 08:10:42 +09:00
Randy Mackay
d961186e0c
AP_NavEKF3: remove unused EK3_GSF_DELAY param
2021-08-06 07:00:46 +09:00
Andrew Tridgell
8681ecebfd
AP_NavEKF3: mark log messages as streaming
2021-08-03 10:23:36 +10:00
Peter Barker
c34284b6eb
AP_NavEKF3: stop using AHRS as conduit for Compass pointer
2021-07-30 12:19:42 +10:00
Paul Riseborough
17ead96250
AP_NavEKF3: Revert IMU and wind speed process noise parameter defaults
...
These give noisier state estimates, but are more robust to rapid changes in IMU biases.
TODO implement a means of using the modified parameters when there are more than one EKF instance running with IMU's that are sampling at a higher rate.
2021-07-22 18:20:45 +10:00
Paul Riseborough
aa6ac4a874
AP_NavEKF3: retune wind process noise for better airspeed fault detection
2021-07-22 18:20:45 +10:00
Paul Riseborough
8fd1e98701
AP_NavEKF3: Fix bug preventing copter wind estimation at low speed
...
Also re-tunes process noise default for smoother wind velocity state estimates.
2021-07-22 18:20:45 +10:00
Paul Riseborough
0088b0f3fe
AP_NavEKF3: Revert EK3_BETA_MASK parameter extension
...
These are not required due to use of bit 7 in FLIGHT_OPTIONS to achieve the same function.
2021-07-22 18:20:45 +10:00
Paul Riseborough
59d31cc7d5
AP_NavEKF3: Rework non-airspeed wind estimation
...
Faster wind estimation when not using airspeed with acceptable noise in wind velocity estimates.
2021-07-22 18:20:45 +10:00
Paul Riseborough
5fa3ed5755
AP_NAvEKF3: use #define value for bad IMU hold time
2021-07-22 18:20:45 +10:00
Paul Riseborough
7497590363
AP_NavEKF3: Increase lower state variance limit when vibration affected
...
This makes state corrections from GPS and baro observations more aggressive
2021-07-22 18:20:45 +10:00
Paul Riseborough
3e123c0a30
AP_NavEKF3: Use sensor variance when checking for bad IMU
2021-07-22 18:20:45 +10:00
Paul Riseborough
e3bdbcd8ea
AP_NavEKF3: Make bad IMU status more persistent
2021-07-22 18:20:45 +10:00
Paul Riseborough
ccc95d8726
AP_NavEKF3: Add accessor function for vibration affected status
2021-07-22 18:20:45 +10:00
Paul Riseborough
ed61287410
AP_NavEKF3: Don't update accel bias states if vibration affected
2021-07-22 18:20:45 +10:00
Paul Riseborough
62d70a628e
AP_NavEKF3: Use large accel process noise when IMU data is bad
2021-07-22 18:20:45 +10:00
Paul Riseborough
5eb7751682
AP_NavEKF3: Adjust gyro bias process noise tuning
...
NEw value is a compromise between roll/pitch angle and horizontal state velocity estimation errors and the noise in the gyro bias estimate
2021-07-22 18:20:45 +10:00
Paul Riseborough
72dc998509
AP_NavEKF3: Allow smaller dvel bias state variances for improved tuning
2021-07-22 18:20:45 +10:00
Paul Riseborough
0f2661c31c
AP_NavEKF3: Retune IMU process noise
...
Required to achieve equivalent fusion noise and weighting on IMU vs other sources to previous param defaults with the old covariance prediction equations.
2021-07-22 18:20:45 +10:00
Paul Riseborough
171eed5d85
AP_NavEKF3: Make gyro bias learning less noisy
2021-07-22 18:20:45 +10:00
Paul Riseborough
ce4d13091a
AP_NavEKF3: Fix bug preventing learning of XY IMU dvel bias in flight
2021-07-22 18:20:45 +10:00
Paul Riseborough
6242ce19fa
AP_NavEKF3: Change powf(x,2) to sq(x)
2021-07-22 18:20:45 +10:00
Paul Riseborough
bb9eed28a9
AP_NavEKF3: Update covariance prediction equations
2021-07-22 18:20:45 +10:00
Paul Riseborough
7b8e935880
AP_NavEKF3: Use alternate form for quaternion to rotmat equations in derivation
2021-07-22 18:20:45 +10:00
Peter Barker
795f412264
AP_NavEKF3: pass NavEKF failures back up to callers
2021-07-21 18:02:26 +10:00
Andrew Tridgell
fc2118f42b
AP_NavEKF3: process GPS yaw independently of GPS fix
...
this processes GPS yaw with its own timestamp and as a separated step
from fusing position and velocity. This makes the yaw time handling
more accurate as yaw for moving baseline GPS comes in as a separate
piece of data from the position and velocity
2021-07-21 17:59:49 +10:00
Andrew Tridgell
0b9cde5812
AP_NavEKF3: fixed indentation in readGpsData()
2021-07-21 17:59:49 +10:00
Peter Barker
a4410a4b2e
AP_NavEKF3: log EKF data source set in XKFS
2021-07-21 16:31:53 +10:00
Andrew Tridgell
6b73c2151a
AP_NavEKF3: implement moving origin
...
this shifts EKF_origin to the current location at 1Hz, while leaving
public_origin alone. All output APIs and logging are relative to
public_origin.
The effect of this change is to remove the distortion caused by a
spherical earth, which allows the EKF to operate without errors at
very long distances from the public_origin.
2021-07-14 17:34:40 +10:00