Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add yaw recovery that uses only IMU and GPS data #13603

Closed
wants to merge 61 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
2e5180c
AP_NavEKF3: Add emergency yaw reset
Feb 18, 2020
4689fd3
AP_NavEKF3: fix EKF-GSF centripetal acceleration compensation
Feb 19, 2020
703515b
AP_NavEKF3: EKF-GSF efficiency improvements
Feb 19, 2020
96b2c69
AP_NavEKF3: EKF-GSF fix race condition with external reset request
Feb 19, 2020
67094c7
AP_NavEKF3: Clean up EKFGSF_predictQuat
Feb 19, 2020
ea1e94c
AP_NavEKF3: Tidy up up EKF-GSF
Feb 19, 2020
6963b73
EKF: EKF-GSF AHRS bugfix and efficiency changes
Feb 20, 2020
2aab2a3
AP_NavEKF3: Add EKF-GSF tuning parameters
Feb 21, 2020
ab79b24
AP_NavEKF3: Eliminate use of quaternions in yaw estimator
Feb 23, 2020
48ee641
AP_NavEKF3: Improve efficiency of EKF-GSF yaw update
Feb 23, 2020
dd835cf
AP_NavEKF: Add EKF-GSF yaw estimator class
Feb 27, 2020
8db3a9a
AP_NavEKF3: use external class for EKF-GSF
Feb 27, 2020
2b02d2c
AP_NavEKF: Remove duplicate and un-used #defines
Feb 27, 2020
24c0a26
AP_NavEKF: Reduce number of yaw filters from 8 to 5
Feb 27, 2020
735994c
AP_NavEKF3: Update EKF-GSF yaw estimator logging
Feb 27, 2020
94ddc89
AP_NavEKF3: Remove un-used parameter definitions
Feb 29, 2020
1b58370
AP_NavEKF: Remove un-used parameters
Feb 29, 2020
2c1a425
AP_NavEKF3: Improve parameter control of EKF-GSF yaw estimator
Feb 29, 2020
b9dd73e
AP_NavEKF3: Don't allocate memory for EKF-GSF unless required
Feb 29, 2020
a574555
AP_Logger: Add logging for multi-lane EKF-GSF yaw esitmator
priseborough Mar 1, 2020
454c930
AP_NavEKF3: Add multi-lane logging for EKF-GSF yaw estimator
priseborough Mar 1, 2020
4a33251
AP_NavEKF3: Remove duplicate instantiation
Mar 1, 2020
06ee2a0
AP_NavEKF: Don't return log data when yaw estimation is inactive
Mar 1, 2020
fb3066b
AP_NavEKF3: Don't log EKF-GSF yaw data when inactive
Mar 1, 2020
9f4e664
AP_NavEKF: Fix FPE
Mar 2, 2020
f462373
AP_NavEKF: remove unnecessary memset
Mar 2, 2020
539db58
AP_NavEKF: Eliminate unnecessary memcopys
Mar 2, 2020
f3894df
AP_NavEKF: Use is_positive check
Mar 2, 2020
233ba89
AP_NavEKF3: Use is_positive check
Mar 2, 2020
12abead
AP_NavEKF: Use required type for #define
Mar 2, 2020
ed050d2
AP_NavEKF: Fix comment typo
Mar 2, 2020
dc447e1
AP_NavEKF: Simplify row operations
Mar 2, 2020
1a5389c
AP_NavEKF: Remove unnecessary memcopies
Mar 2, 2020
3729a80
AP_NavEKF3: Use correct param unit descriptor
Mar 2, 2020
d06a9a6
AP_NavEKF3: Fix reset rotation direction bug
Mar 2, 2020
f3b38a2
RC_Channel: added lane switch RCn_OPTION=103
tridge Mar 2, 2020
b368354
AP_NavEKF3: Default to one EKF-GSF instance
Mar 2, 2020
b5e6642
AP_NavEKF3: fixed yaw reset
tridge Mar 2, 2020
3504a4a
AP_NavEKF3: Allow yaw reset to work at +-90 deg pitch
Mar 2, 2020
f3a096b
AP_NavEKF3: Consolidate yaw reset procedure
Mar 2, 2020
d503958
AP_NavEKF3: Further consolidate yaw reset processsing
Mar 3, 2020
a36531d
AP_NavEKF: Make limitation on IMU delta time more obvious
Mar 3, 2020
d4caf02
AP_Logger: Update GSF yaw estimator logging
Mar 3, 2020
6204ae1
AP_NavEKF3: Update GSF yaw estimator logging
Mar 3, 2020
19edca7
AP_NavEKF3: Improve numerical protection
Mar 4, 2020
b23f342
AP_NavEKF3: Rework weighting calculation numerical protection
Mar 4, 2020
7645ce2
AP_NavEKF3: yaw estimator vibration and manoeuvre transient tolerance
Mar 5, 2020
8f29f05
AP_NavEKF3: Remove unnecessary init
Mar 5, 2020
d7f1e58
AP_NavEKF: Remove unnecessary init
Mar 5, 2020
a3672f6
AP_NavEKF: Fix style
Mar 5, 2020
9e6a8fe
AP_NavEKF3: Define yaw estimator logging definitions inside EKF
Mar 5, 2020
ca0f24c
Revert "AP_Logger: Update GSF yaw estimator logging"
Mar 5, 2020
db141e5
Revert "AP_Logger: Add logging for multi-lane EKF-GSF yaw esitmator"
Mar 5, 2020
2e7c087
AP_NavEKF3: replace parameter with external default airspeed
Mar 5, 2020
ac966f5
AP_AHRS: Add accessor function to set default airspeed
Mar 5, 2020
6fc86ba
ArduPlane: Set default airspeed used by estimators
Mar 5, 2020
9e2abfa
ArduPlane: Fix default airspeed units
Mar 5, 2020
57ac89a
AP_NavEKF: Don't updste un-used GSF states
Mar 5, 2020
d83a15e
AP_NavEKF: Fix alignment bug
Mar 6, 2020
ccd4490
ArduCopter: Request EKF failsafe lane switch sooner
Mar 7, 2020
f9d48b1
AP_NavEKF3: Reduce minimum velocity noise defaults
Mar 7, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ArduCopter/ekf_check.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ void Copter::ekf_check()
// increase counter
ekf_check_state.fail_count++;
#if EKF_CHECK_ITERATIONS_MAX > 2
if (ekf_check_state.fail_count == EKF_CHECK_ITERATIONS_MAX-1) {
// we are just about to declare a EKF failsafe, ask the EKF if we can change lanes
// to resolve the issue
if (ekf_check_state.fail_count == EKF_CHECK_ITERATIONS_MAX/2) {
// we are just about to declare a EKF failsafe, ask the EKF if we can reset
// the yaw or change lanes to resolve the issue
ahrs.check_lane_switch();
}
#endif
Expand Down
2 changes: 2 additions & 0 deletions ArduPlane/ArduPlane.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,8 @@ void Plane::one_second_loop()
adsb.set_stall_speed_cm(aparm.airspeed_min);
adsb.set_max_speed(aparm.airspeed_max);

ahrs.writeDefaultAirSpeed((float)((aparm.airspeed_min + aparm.airspeed_max)/2));

// sync MAVLink system ID
mavlink_system.sysid = g.sysid_this_mav;

Expand Down
7 changes: 7 additions & 0 deletions libraries/AP_AHRS/AP_AHRS_NavEKF.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1405,6 +1405,13 @@ void AP_AHRS_NavEKF::writeExtNavData(const Vector3f &sensOffset, const Vector3f
#endif
}

// Writes the default equivalent airspeed in m/s to be used in forward flight if a measured airspeed is required and not available.
void AP_AHRS_NavEKF::writeDefaultAirSpeed(float airspeed)
{
#if HAL_NAVEKF3_AVAILABLE
EKF3.writeDefaultAirSpeed(airspeed);
#endif
}

// inhibit GPS usage
uint8_t AP_AHRS_NavEKF::setInhibitGPS(void)
Expand Down
3 changes: 3 additions & 0 deletions libraries/AP_AHRS/AP_AHRS_NavEKF.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ class AP_AHRS_NavEKF : public AP_AHRS_DCM {
// write body odometry measurements to the EKF
void writeBodyFrameOdom(float quality, const Vector3f &delPos, const Vector3f &delAng, float delTime, uint32_t timeStamp_ms, const Vector3f &posOffset);

// Writes the default equivalent airspeed in m/s to be used in forward flight if a measured airspeed is required and not available.
void writeDefaultAirSpeed(float airspeed);

// Write position and quaternion data from an external navigation system
void writeExtNavData(const Vector3f &sensOffset, const Vector3f &pos, const Quaternion &quat, float posErr, float angErr, uint32_t timeStamp_ms, uint32_t resetTime_ms) override;

Expand Down
2 changes: 2 additions & 0 deletions libraries/AP_NavEKF/AP_Nav_Common.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,5 @@ struct ekf_timing {
float delVelDT_min;
};
void Log_EKF_Timing(const char *name, const uint8_t core, uint64_t time_us, const struct ekf_timing &timing);

#define N_MODELS_EKFGSF 5U
Loading