* ekf: always publish baro and gnss bias even if zero
* [SQUASH] ekf2: simplify hgt bias publish
---------
Co-authored-by: Daniel Agar <daniel@agar.ca>
* ekf2: allow manual position reset when horizontal aiding is active
This allows the pilot to override position esitmates manually
* mavlink sim: add support of failure gps struck
* mavlink sim: add GNSS failure "wrong" type
* ekf2-gnss: add reset mode
This allows the user to choose whether the position should immediately
be reset to GNSS on fusion timeout or if the EKF can continue with
velocity dead-reckoning.
* ekf2: fix unit test changes due to GNSS start logic
Especially because the EKF doesn't need to reset the states if the test
ratio is already passing
* rename mode enum
* reset to gps lat lon on init
* remove obsolete reset-condition (handled in #25223)
* WIP try to upgrade compiler externally
---------
Co-authored-by: bresch <brescianimathieu@gmail.com>
Co-authored-by: Niklas Hauser <niklas@auterion.com>
* fix max-hagl restriction to position/altitude control
* max hagl vel restriction in ManAcc position mode
* use interpolate func, change naming
* simplyfied vertical vel limitation
* move velocity-constraint adjustment to StickAccelXY
* uavcan: add GNSS heading from relposheading
* ekf2: new EKF2_GPS_YAW_OFF parameter to configure any offset in GNSS heading
Signed-off-by: dirksavage88 <dirksavage88@gmail.com>
Co-authored-by: Jacob Dahl <dahl.jakejacob@gmail.com>
- replace hardcoded 1000 m/s velocity state constraint with new EKF2_VEL_LIM parameter (default 100 m/s)
- new velocity limit also used for GPS checks and external vision velocity
This is similar to fake pos but is only used when the ekf has an
external information telling it that the vehicle is not changing
position. This information can then be used to keep a valid local
position even when the vehicle isn't exactly at rest.
* added support for resetting wind states to external observation
Signed-off-by: RomanBapst <bapstroman@gmail.com>
* moved wind related functions into separate file
Signed-off-by: RomanBapst <bapstroman@gmail.com>
* added VEHICLE_CMD_EXTERNAL_WIND_ESTIMATE
Signed-off-by: RomanBapst <bapstroman@gmail.com>
* correctly compute variances
Signed-off-by: RomanBapst <bapstroman@gmail.com>
* ekf2: implement wind reset
Signed-off-by: RomanBapst <bapstroman@gmail.com>
* only allow VEHICLE_CMD_EXTERNAL_WIND_ESTIMATE during wind dead-reckoning
and increase horizontal velocity variance to allow velocity states to move
towards solution that is aligned with the newly set wind
Signed-off-by: RomanBapst <bapstroman@gmail.com>
* only reset wind on ground
* still use wind reset using airspeed when it wasn't initialized
* exclude func for rover, change reset interface
* handle wind reset in drag-fusion
* replace state reset with variance reset in sideslip/drag fusion
* remove resetWind function
---------
Signed-off-by: RomanBapst <bapstroman@gmail.com>
Co-authored-by: Marco Hauswirth <marco.hauswirth@auterion.com>
- remove commander test ratio "tuning knobs" (COM_ARM_EKF_{HGT,POS,VEL,YAW})
- these are effectively redundant with the actual tuning (noise & gate)
in the estimator, plus most users have no idea why they'd be
adjusting these other than to silence an annoying preflight complaint
- remove ekf2 "PreFlightChecker" with hard coded innovation limits
- ekf2 preflight innovation flags are now simply if any active source
exceeds half the limit preflight
* estimator gps check fail flag for spoofing
* warn whenever spoofing state changes to true, use default hysteresis to completely stop fusion
* dont introduce more GPS namings, GNSS instead
* flash: exclude mantis for cuav_x7pro
- adjust flow sample gyro_rate immediately after popping from ring
buffer
- always update flow gyro bias (calcOptFlowBodyRateComp()) regardless
of flow quality or magnitude
* reset position by fusion
* handle local_pos_valid for fixed wing in gnss denied
* [WIP] ekf2: setEkfGlobalOrigin respect current height reference and vertical position aiding
* global origin, also reset vertical pos without gps as ref
* fix wo gnss, that bitcraze ci passes
* revert some changes as requested
* remove duplicate reset messages
* undo unrelated whitespace changes, I'll fix it everywhere in a followup
* [SQUASH] ekf2: add vehicle_command_ack
* resetGlobalPosToExternalObservation consolidate logic
* remove gnss check from local_pos validation check
* reset when 0<accuracy<1, otherwise fuse
* replace gps param with flag
* ekf2: dead reckon time exceeded, respect ZUPT preflight if air data or optical flow expected
* subtract timeout from last inertial dead-reck, change fake pos conditions, save flash
---------
Co-authored-by: Daniel Agar <daniel@agar.ca>
- new parameter EKF2_LOG_VERBOSE to enable (currently enabled by default)
- force advertise topics immediately (based on EKF2_LOG_VERBOSE and per aid source configuration)
- logger optionally log all estimator topics at minimal rate