PX4 Firmware
PX4 Autopilot Software http://px4.io
|
#include <ekf.h>
Public Member Functions | |
Ekf ()=default | |
virtual | ~Ekf ()=default |
bool | init (uint64_t timestamp) override |
void | reset (uint64_t timestamp) override |
void | resetStatesAndCovariances () override |
void | resetStates () override |
bool | update () override |
void | get_vel_pos_innov (float vel_pos_innov[6]) override |
void | get_aux_vel_innov (float aux_vel_innov[2]) override |
void | get_mag_innov (float mag_innov[3]) override |
void | get_heading_innov (float *heading_innov) override |
void | get_vel_pos_innov_var (float vel_pos_innov_var[6]) override |
void | get_mag_innov_var (float mag_innov_var[3]) override |
void | get_airspeed_innov (float *airspeed_innov) override |
void | get_airspeed_innov_var (float *airspeed_innov_var) override |
void | get_beta_innov (float *beta_innov) override |
void | get_beta_innov_var (float *beta_innov_var) override |
void | get_heading_innov_var (float *heading_innov_var) override |
void | get_flow_innov_var (float flow_innov_var[2]) override |
void | get_flow_innov (float flow_innov[2]) override |
void | get_drag_innov_var (float drag_innov_var[2]) override |
void | get_drag_innov (float drag_innov[2]) override |
void | getHaglInnovVar (float *hagl_innov_var) override |
void | getHaglInnov (float *hagl_innov) override |
void | get_state_delayed (float *state) override |
void | get_wind_velocity (float *wind) override |
void | get_wind_velocity_var (float *wind_var) override |
void | get_true_airspeed (float *tas) override |
matrix::SquareMatrix< float, 24 > | covariances () const |
matrix::Vector< float, 24 > | covariances_diagonal () const |
matrix::SquareMatrix< float, 4 > | orientation_covariances () const |
matrix::SquareMatrix< float, 3 > | velocity_covariances () const |
matrix::SquareMatrix< float, 3 > | position_covariances () const |
bool | collect_gps (const gps_message &gps) override |
bool | collect_imu (const imuSample &imu) override |
bool | get_ekf_origin (uint64_t *origin_time, map_projection_reference_s *origin_pos, float *origin_alt) override |
void | get_ekf_gpos_accuracy (float *ekf_eph, float *ekf_epv) override |
void | get_ekf_lpos_accuracy (float *ekf_eph, float *ekf_epv) override |
void | get_ekf_vel_accuracy (float *ekf_evh, float *ekf_evv) override |
void | get_ekf_ctrl_limits (float *vxy_max, float *vz_max, float *hagl_min, float *hagl_max) override |
bool | reset_imu_bias () override |
void | get_vel_var (Vector3f &vel_var) override |
void | get_pos_var (Vector3f &pos_var) override |
void | get_output_tracking_error (float error[3]) override |
void | get_imu_vibe_metrics (float vibe[3]) override |
bool | get_gps_drift_metrics (float drift[3], bool *blocked) override |
bool | global_position_is_valid () override |
void | update_deadreckoning_status () |
bool | isTerrainEstimateValid () const override |
void | updateTerrainValidity () |
void | getTerrainVertPos (float *ret) override |
float | get_terrain_var () const |
void | get_accel_bias (float bias[3]) override |
void | get_gyro_bias (float bias[3]) override |
void | get_gps_check_status (uint16_t *val) override |
void | get_posD_reset (float *delta, uint8_t *counter) override |
void | get_velD_reset (float *delta, uint8_t *counter) override |
void | get_posNE_reset (float delta[2], uint8_t *counter) override |
void | get_velNE_reset (float delta[2], uint8_t *counter) override |
void | get_quat_reset (float delta_quat[4], uint8_t *counter) override |
void | get_innovation_test_status (uint16_t *status, float *mag, float *vel, float *pos, float *hgt, float *tas, float *hagl, float *beta) override |
void | get_ekf_soln_status (uint16_t *status) override |
void | get_ev2ekf_quaternion (float *quat) override |
Quatf | calculate_quaternion () const |
void | set_min_required_gps_health_time (uint32_t time_us) |
Public Member Functions inherited from EstimatorInterface | |
EstimatorInterface ()=default | |
virtual | ~EstimatorInterface ()=default |
void | get_hagl_innov_var (float *hagl_innov_var) |
void | get_hagl_innov (float *hagl_innov) |
void | setIMUData (const imuSample &imu_sample) |
void | setIMUData (uint64_t time_usec, uint64_t delta_ang_dt, uint64_t delta_vel_dt, float(&delta_ang)[3], float(&delta_vel)[3]) |
void | setMagData (uint64_t time_usec, float(&data)[3]) |
void | setGpsData (uint64_t time_usec, const gps_message &gps) |
void | setBaroData (uint64_t time_usec, float data) |
void | setAirspeedData (uint64_t time_usec, float true_airspeed, float eas2tas) |
void | setRangeData (uint64_t time_usec, float data, int8_t quality) |
void | setOpticalFlowData (uint64_t time_usec, flow_message *flow) |
void | setExtVisionData (uint64_t time_usec, ext_vision_message *evdata) |
void | setAuxVelData (uint64_t time_usec, float(&data)[2], float(&variance)[2]) |
parameters * | getParamHandle () |
void | set_in_air_status (bool in_air) |
bool | attitude_valid () |
bool | get_in_air_status () |
bool | get_wind_status () |
void | set_is_fixed_wing (bool is_fixed_wing) |
void | set_fuse_beta_flag (bool fuse_beta) |
void | set_gnd_effect_flag (bool gnd_effect) |
void | set_air_density (float air_density) |
void | set_rangefinder_limits (float min_distance, float max_distance) |
void | set_optical_flow_limits (float max_flow_rate, float min_distance, float max_distance) |
bool | inertial_dead_reckoning () |
bool | get_terrain_valid () |
void | get_terrain_vert_pos (float *ret) |
bool | local_position_is_valid () |
const matrix::Quatf & | get_quaternion () const |
void | get_velocity (float *vel) |
void | get_vel_deriv_ned (float *vel_deriv) |
void | get_pos_d_deriv (float *pos_d_deriv) |
void | get_position (float *pos) |
void | copy_timestamp (uint64_t *time_us) |
bool | get_mag_decl_deg (float *val) |
void | get_control_mode (uint32_t *val) |
void | get_filter_fault_status (uint16_t *val) |
bool | isVehicleAtRest () const |
float | get_dt_imu_avg () const |
imuSample | get_imu_sample_delayed () |
baroSample | get_baro_sample_delayed () |
void | print_status () |
Static Private Member Functions | |
static bool | isMeasuredMatchingExpected (float measured, float expected, float gate) |
static constexpr float | sq (float var) |
Private Attributes | |
struct { | |
uint8_t velNE_counter | |
number of horizontal position reset events (allow to wrap if count exceeds 255) More... | |
uint8_t velD_counter | |
number of vertical velocity reset events (allow to wrap if count exceeds 255) More... | |
uint8_t posNE_counter | |
number of horizontal position reset events (allow to wrap if count exceeds 255) More... | |
uint8_t posD_counter | |
number of vertical position reset events (allow to wrap if count exceeds 255) More... | |
uint8_t quat_counter | |
number of quaternion reset events (allow to wrap if count exceeds 255) More... | |
Vector2f velNE_change | |
North East velocity change due to last reset (m) More... | |
float velD_change | |
Down velocity change due to last reset (m/sec) More... | |
Vector2f posNE_change | |
North, East position change due to last reset (m) More... | |
float posD_change | |
Down position change due to last reset (m) More... | |
Quatf quat_change | |
quaternion delta due to last reset - multiply pre-reset quaternion by this to get post-reset quaternion More... | |
} | _state_reset_status |
reset event monitoring structure containing velocity, position, height and yaw reset information More... | |
float | _dt_ekf_avg {FILTER_UPDATE_PERIOD_S} |
average update rate of the ekf More... | |
float | _dt_update {0.01f} |
delta time since last ekf update. This time can be used for filters which run at the same rate as the Ekf::update() function. (sec) More... | |
stateSample | _state {} |
state struct of the ekf running at the delayed time horizon More... | |
bool | _filter_initialised {false} |
true when the EKF sttes and covariances been initialised More... | |
bool | _earth_rate_initialised {false} |
true when we know the earth rotatin rate (requires GPS) More... | |
bool | _fuse_height {false} |
true when baro height data should be fused More... | |
bool | _fuse_pos {false} |
true when gps position data should be fused More... | |
bool | _fuse_hor_vel {false} |
true when gps horizontal velocity measurement should be fused More... | |
bool | _fuse_vert_vel {false} |
true when gps vertical velocity measurement should be fused More... | |
bool | _fuse_hor_vel_aux {false} |
true when auxiliary horizontal velocity measurement should be fused More... | |
float | _posObsNoiseNE {0.0f} |
1-STD observation noise used for the fusion of NE position data (m) More... | |
float | _posInnovGateNE {1.0f} |
Number of standard deviations used for the NE position fusion innovation consistency check. More... | |
Vector3f | _velObsVarNED |
1-STD observation noise variance used for the fusion of NED velocity data (m/sec)**2 More... | |
float | _hvelInnovGate {1.0f} |
Number of standard deviations used for the horizontal velocity fusion innovation consistency check. More... | |
float | _vvelInnovGate {1.0f} |
Number of standard deviations used for the vertical velocity fusion innovation consistency check. More... | |
bool | _fuse_hpos_as_odom {false} |
true when the NE position data is being fused using an odometry assumption More... | |
Vector3f | _pos_meas_prev |
previous value of NED position measurement fused using odometry assumption (m) More... | |
Vector2f | _hpos_pred_prev |
previous value of NE position state used by odometry fusion (m) More... | |
bool | _hpos_prev_available {false} |
true when previous values of the estimate and measurement are available for use More... | |
Vector3f | _ev_rot_vec_filt |
filtered rotation vector defining the rotation EV to EKF reference, initiliazied to zero rotation (rad) More... | |
Dcmf | _ev_rot_mat |
transformation matrix that rotates observations from the EV to the EKF navigation frame, initialized with Identity More... | |
uint64_t | _ev_rot_last_time_us {0} |
previous time that the calculation of the EV to EKF rotation matrix was updated (uSec) More... | |
bool | _ev_rot_mat_initialised {0} |
_ev_rot_mat should only be initialised once in the beginning through the reset function More... | |
bool | _gps_data_ready {false} |
true when new GPS data has fallen behind the fusion time horizon and is available to be fused More... | |
bool | _mag_data_ready {false} |
true when new magnetometer data has fallen behind the fusion time horizon and is available to be fused More... | |
bool | _baro_data_ready {false} |
true when new baro height data has fallen behind the fusion time horizon and is available to be fused More... | |
bool | _range_data_ready {false} |
true when new range finder data has fallen behind the fusion time horizon and is available to be fused More... | |
bool | _flow_data_ready {false} |
true when the leading edge of the optical flow integration period has fallen behind the fusion time horizon More... | |
bool | _ev_data_ready {false} |
true when new external vision system data has fallen behind the fusion time horizon and is available to be fused More... | |
bool | _tas_data_ready {false} |
true when new true airspeed data has fallen behind the fusion time horizon and is available to be fused More... | |
bool | _flow_for_terrain_data_ready {false} |
uint64_t | _time_last_fake_gps {0} |
same flag as "_flow_data_ready" but used for separate terrain estimator More... | |
uint64_t | _time_ins_deadreckon_start {0} |
amount of time we have been doing inertial only deadreckoning (uSec) More... | |
bool | _using_synthetic_position {false} |
true if we are using a synthetic position to constrain drift More... | |
uint64_t | _time_last_pos_fuse {0} |
time the last fusion of horizontal position measurements was performed (uSec) More... | |
uint64_t | _time_last_delpos_fuse {0} |
time the last fusion of incremental horizontal position measurements was performed (uSec) More... | |
uint64_t | _time_last_vel_fuse {0} |
time the last fusion of velocity measurements was performed (uSec) More... | |
uint64_t | _time_last_hgt_fuse {0} |
time the last fusion of height measurements was performed (uSec) More... | |
uint64_t | _time_last_of_fuse {0} |
time the last fusion of optical flow measurements were performed (uSec) More... | |
uint64_t | _time_last_arsp_fuse {0} |
time the last fusion of airspeed measurements were performed (uSec) More... | |
uint64_t | _time_last_beta_fuse {0} |
time the last fusion of synthetic sideslip measurements were performed (uSec) More... | |
uint64_t | _time_last_rng_ready {0} |
time the last range finder measurement was ready (uSec) More... | |
Vector2f | _last_known_posNE |
last known local NE position vector (m) More... | |
float | _imu_collection_time_adj {0.0f} |
the amount of time the IMU collection needs to be advanced to meet the target set by FILTER_UPDATE_PERIOD_MS (sec) More... | |
uint64_t | _time_acc_bias_check {0} |
last time the accel bias check passed (uSec) More... | |
uint64_t | _delta_time_baro_us {0} |
delta time between two consecutive delayed baro samples from the buffer (uSec) More... | |
uint64_t | _last_imu_bias_cov_reset_us {0} |
time the last reset of IMU delta angle and velocity state covariances was performed (uSec) More... | |
Vector3f | _earth_rate_NED |
earth rotation vector (NED) in rad/s More... | |
Dcmf | _R_to_earth |
transformation matrix from body frame to earth frame from last EKF prediction More... | |
Vector2f | _accel_lpf_NE |
Low pass filtered horizontal earth frame acceleration (m/sec**2) More... | |
float | _yaw_delta_ef {0.0f} |
Recent change in yaw angle measured about the earth frame D axis (rad) More... | |
float | _yaw_rate_lpf_ef {0.0f} |
Filtered angular rate about earth frame D axis (rad/sec) More... | |
bool | _mag_bias_observable {false} |
true when there is enough rotation to make magnetometer bias errors observable More... | |
bool | _yaw_angle_observable {false} |
true when there is enough horizontal acceleration to make yaw observable More... | |
uint64_t | _time_yaw_started {0} |
last system time in usec that a yaw rotation manoeuvre was detected More... | |
uint8_t | _num_bad_flight_yaw_events {0} |
number of times a bad heading has been detected in flight and required a yaw reset More... | |
uint64_t | _mag_use_not_inhibit_us {0} |
last system time in usec before magnetometer use was inhibited More... | |
bool | _mag_use_inhibit {false} |
true when magnetometer use is being inhibited More... | |
bool | _mag_use_inhibit_prev {false} |
true when magnetometer use was being inhibited the previous frame More... | |
bool | _mag_inhibit_yaw_reset_req {false} |
true when magnetometer inhibit has been active for long enough to require a yaw reset when conditions improve. More... | |
float | _last_static_yaw {0.0f} |
last yaw angle recorded when on ground motion checks were passing (rad) More... | |
bool | _mag_yaw_reset_req {false} |
true when a reset of the yaw using the magnetometer data has been requested More... | |
bool | _mag_decl_cov_reset {false} |
true after the fuseDeclination() function has been used to modify the earth field covariances after a magnetic field reset event. More... | |
bool | _synthetic_mag_z_active {false} |
true if we are generating synthetic magnetometer Z measurements More... | |
float | P [_k_num_states][_k_num_states] {} |
state covariance matrix More... | |
Vector3f | _delta_vel_bias_var_accum |
kahan summation algorithm accumulator for delta velocity bias variance More... | |
Vector3f | _delta_angle_bias_var_accum |
kahan summation algorithm accumulator for delta angle bias variance More... | |
float | _vel_pos_innov [6] {} |
NED velocity and position innovations: 0-2 vel (m/sec), 3-5 pos (m) More... | |
float | _vel_pos_innov_var [6] {} |
NED velocity and position innovation variances: 0-2 vel ((m/sec)**2), 3-5 pos (m**2) More... | |
float | _aux_vel_innov [2] {} |
NE auxiliary velocity innovations: (m/sec) More... | |
float | _mag_innov [3] {} |
earth magnetic field innovations (Gauss) More... | |
float | _mag_innov_var [3] {} |
earth magnetic field innovation variance (Gauss**2) More... | |
float | _airspeed_innov {0.0f} |
airspeed measurement innovation (m/sec) More... | |
float | _airspeed_innov_var {0.0f} |
airspeed measurement innovation variance ((m/sec)**2) More... | |
float | _beta_innov {0.0f} |
synthetic sideslip measurement innovation (rad) More... | |
float | _beta_innov_var {0.0f} |
synthetic sideslip measurement innovation variance (rad**2) More... | |
float | _drag_innov [2] {} |
multirotor drag measurement innovation (m/sec**2) More... | |
float | _drag_innov_var [2] {} |
multirotor drag measurement innovation variance ((m/sec**2)**2) More... | |
float | _heading_innov {0.0f} |
heading measurement innovation (rad) More... | |
float | _heading_innov_var {0.0f} |
heading measurement innovation variance (rad**2) More... | |
float | _flow_innov [2] {} |
flow measurement innovation (rad/sec) More... | |
float | _flow_innov_var [2] {} |
flow innovation variance ((rad/sec)**2) More... | |
Vector3f | _flow_gyro_bias |
bias errors in optical flow sensor rate gyro outputs (rad/sec) More... | |
Vector3f | _imu_del_ang_of |
bias corrected delta angle measurements accumulated across the same time frame as the optical flow rates (rad) More... | |
float | _delta_time_of {0.0f} |
time in sec that _imu_del_ang_of was accumulated over (sec) More... | |
uint64_t | _time_bad_motion_us {0} |
last system time that on-ground motion exceeded limits (uSec) More... | |
uint64_t | _time_good_motion_us {0} |
last system time that on-ground motion was within limits (uSec) More... | |
bool | _inhibit_flow_use {false} |
true when use of optical flow and range finder is being inhibited More... | |
Vector2f | _flowRadXYcomp |
measured delta angle of the image about the X and Y body axes after removal of body rotation (rad), RH rotation is positive More... | |
Vector3f | _delta_angle_corr |
delta angle correction vector (rad) More... | |
imuSample | _imu_down_sampled {} |
down sampled imu data (sensor rate -> filter update rate) More... | |
Quatf | _q_down_sampled |
down sampled quaternion (tracking delta angles between ekf update steps) More... | |
Vector3f | _vel_err_integ |
integral of velocity tracking error (m) More... | |
Vector3f | _pos_err_integ |
integral of position tracking error (m.s) More... | |
float | _output_tracking_error [3] {} |
contains the magnitude of the angle, velocity and position track errors (rad, m/s, m) More... | |
float | _gpsDriftVelN {0.0f} |
GPS north position derivative (m/sec) More... | |
float | _gpsDriftVelE {0.0f} |
GPS east position derivative (m/sec) More... | |
float | _gps_drift_velD {0.0f} |
GPS down position derivative (m/sec) More... | |
float | _gps_velD_diff_filt {0.0f} |
GPS filtered Down velocity (m/sec) More... | |
float | _gps_velN_filt {0.0f} |
GPS filtered North velocity (m/sec) More... | |
float | _gps_velE_filt {0.0f} |
GPS filtered East velocity (m/sec) More... | |
uint64_t | _last_gps_fail_us {0} |
last system time in usec that the GPS failed it's checks More... | |
uint64_t | _last_gps_pass_us {0} |
last system time in usec that the GPS passed it's checks More... | |
float | _gps_error_norm {1.0f} |
normalised gps error More... | |
uint32_t | _min_gps_health_time_us {10000000} |
GPS is marked as healthy only after this amount of time. More... | |
bool | _gps_checks_passed {false} |
uint64_t | _last_gps_origin_time_us {0} |
More... | |
float | _gps_alt_ref {0.0f} |
WGS-84 height (m) More... | |
uint32_t | _hgt_counter {0} |
number of height samples read during initialisation More... | |
float | _rng_filt_state {0.0f} |
filtered height measurement (m) More... | |
uint32_t | _mag_counter {0} |
number of magnetometer samples read during initialisation More... | |
uint32_t | _ev_counter {0} |
number of external vision samples read during initialisation More... | |
uint64_t | _time_last_mag {0} |
measurement time of last magnetomter sample (uSec) More... | |
AlphaFilterVector3f | _mag_lpf |
filtered magnetometer measurement (Gauss) More... | |
Vector3f | _delVel_sum |
summed delta velocity (m/sec) More... | |
float | _hgt_sensor_offset {0.0f} |
set as necessary if desired to maintain the same height after a height reset (m) More... | |
float | _baro_hgt_offset {0.0f} |
baro height reading at the local NED origin (m) More... | |
float | _last_on_ground_posD {0.0f} |
last vertical position when the in_air status was false (m) More... | |
bool | _flt_mag_align_converging {false} |
true when the in-flight mag field post alignment convergence is being performd More... | |
uint64_t | _flt_mag_align_start_time {0} |
time that inflight magnetic field alignment started (uSec) More... | |
uint64_t | _time_last_mov_3d_mag_suitable {0} |
last system time that sufficient movement to use 3-axis magnetometer fusion was detected (uSec) More... | |
float | _saved_mag_bf_variance [4] {} |
magnetic field state variances that have been saved for use at the next initialisation (Gauss**2) More... | |
float | _saved_mag_ef_covmat [2][2] {} |
NE magnetic field state covariance sub-matrix saved for use at the next initialisation (Gauss**2) More... | |
bool | _velpos_reset_request {false} |
true when a large yaw error has been fixed and a velocity and position state reset is required More... | |
gps_check_fail_status_u | _gps_check_fail_status {} |
bool | _accel_bias_inhibit {false} |
true when the accel bias learning is being inhibited More... | |
Vector3f | _accel_vec_filt {} |
acceleration vector after application of a low pass filter (m/sec**2) More... | |
float | _accel_mag_filt {0.0f} |
acceleration magnitude after application of a decaying envelope filter (rad/sec) More... | |
float | _ang_rate_mag_filt {0.0f} |
angular rate magnitude after application of a decaying envelope filter (rad/sec) More... | |
Vector3f | _prev_dvel_bias_var |
saved delta velocity XYZ bias variances (m/sec)**2 More... | |
float | _terrain_vpos {0.0f} |
estimated vertical position of the terrain underneath the vehicle in local NED frame (m) More... | |
float | _terrain_var {1e4f} |
variance of terrain position estimate (m**2) More... | |
float | _hagl_innov {0.0f} |
innovation of the last height above terrain measurement (m) More... | |
float | _hagl_innov_var {0.0f} |
innovation variance for the last height above terrain measurement (m**2) More... | |
uint64_t | _time_last_hagl_fuse {0} |
last system time that the hagl measurement failed it's checks (uSec) More... | |
bool | _terrain_initialised {false} |
true when the terrain estimator has been initialized More... | |
float | _sin_tilt_rng {0.0f} |
sine of the range finder tilt rotation about the Y body axis More... | |
float | _cos_tilt_rng {0.0f} |
cosine of the range finder tilt rotation about the Y body axis More... | |
float | _R_rng_to_earth_2_2 {0.0f} |
2,2 element of the rotation matrix from sensor frame to earth frame More... | |
float | _dt_last_range_update_filt_us {0.0f} |
filtered value of the delta time elapsed since the last range measurement came into the filter (uSec) More... | |
bool | _hagl_valid {false} |
true when the height above ground estimate is valid More... | |
bool | _baro_hgt_faulty {false} |
true if valid baro data is unavailable for use More... | |
bool | _gps_hgt_intermittent {false} |
true if gps height into the buffer is intermittent More... | |
bool | _rng_hgt_valid {false} |
true if range finder sample retrieved from buffer is valid More... | |
int | _primary_hgt_source {VDIST_SENSOR_BARO} |
specifies primary source of height data More... | |
uint64_t | _time_bad_rng_signal_quality {0} |
timestamp at which range finder signal quality was 0 (used for hysteresis) More... | |
uint64_t | _time_bad_vert_accel {0} |
last time a bad vertical accel was detected (uSec) More... | |
uint64_t | _time_good_vert_accel {0} |
last time a good vertical accel was detected (uSec) More... | |
bool | _bad_vert_accel_detected {false} |
true when bad vertical accelerometer data has been detected More... | |
bool | _is_range_aid_suitable {false} |
true when range finder can be used in flight as the height reference instead of the primary height sensor More... | |
bool | _range_aid_mode_selected {false} |
true when range finder is being used as the height reference instead of the primary height sensor More... | |
float | _rng_stuck_min_val {0.0f} |
minimum value for new rng measurement when being stuck More... | |
float | _rng_stuck_max_val {0.0f} |
maximum value for new rng measurement when being stuck More... | |
float | _height_rate_lpf {0.0f} |
Static Private Attributes | |
static constexpr uint8_t | _k_num_states {24} |
number of EKF states More... | |
|
default |
|
virtualdefault |
|
private |
Definition at line 378 of file ekf_helper.cpp.
References EstimatorInterface::_output_buffer, EstimatorInterface::_output_new, EstimatorInterface::_output_sample_delayed, _state, RingBuffer< data_type >::get_length(), estimator::outputSample::pos, estimator::stateSample::pos, estimator::outputSample::quat_nominal, estimator::stateSample::quat_nominal, estimator::outputSample::vel, and estimator::stateSample::vel.
Referenced by controlOpticalFlowFusion(), and initialiseFilter().
|
private |
Definition at line 820 of file ekf_helper.cpp.
References CONSTANTS_EARTH_SPIN_RATE.
Referenced by predictState().
|
private |
Definition at line 1620 of file ekf_helper.cpp.
References _ev_rot_last_time_us, _ev_rot_mat, _ev_rot_vec_filt, EstimatorInterface::_ev_sample_delayed, _state, EstimatorInterface::_time_last_imu, math::constrain(), f(), estimator::extVisionSample::quat, and estimator::stateSample::quat_nominal.
Referenced by controlExternalVisionFusion().
|
private |
Definition at line 542 of file optflow_fusion.cpp.
References _delta_time_of, _flow_gyro_bias, EstimatorInterface::_flow_sample_delayed, _imu_del_ang_of, math::constrain(), estimator::flowSample::dt, f(), FLT_EPSILON, estimator::flowSample::gyroXYZ, and ISFINITE.
Referenced by controlOpticalFlowFusion().
|
private |
Definition at line 589 of file optflow_fusion.cpp.
References EstimatorInterface::_flow_sample_delayed, EstimatorInterface::_params, math::constrain(), f(), estimator::parameters::flow_noise, estimator::parameters::flow_noise_qual_min, estimator::parameters::flow_qual_min, estimator::flowSample::quality, and sq().
Referenced by fuseFlowForTerrain(), fuseOptFlow(), resetVelocity(), and sq().
|
private |
Definition at line 1386 of file ekf_helper.cpp.
References _state, f(), P, estimator::stateSample::quat_nominal, t10, t11, t12, t13, t14, t15, t16, t17, t2, t3, t4, t5, t6, t7, t8, and t9.
Referenced by controlFusionModes(), and sq().
Quatf Ekf::calculate_quaternion | ( | ) | const |
Definition at line 680 of file ekf.cpp.
References _delta_angle_corr, _dt_ekf_avg, EstimatorInterface::_dt_imu_avg, EstimatorInterface::_imu_sample_new, EstimatorInterface::_output_new, _state, estimator::imuSample::delta_ang, estimator::stateSample::gyro_bias, and estimator::outputSample::quat_nominal.
Referenced by get_quat_reset(), and Ekf2::publish_attitude().
|
private |
Definition at line 1006 of file mag_fusion.cpp.
References _R_to_earth, f(), math::max(), and sq().
Referenced by controlFusionModes(), and isRangeDataContinuous().
|
private |
Definition at line 458 of file ekf.cpp.
References _delta_angle_corr, _dt_ekf_avg, EstimatorInterface::_dt_imu_avg, EstimatorInterface::_imu_sample_delayed, EstimatorInterface::_imu_sample_new, EstimatorInterface::_imu_updated, EstimatorInterface::_output_buffer, EstimatorInterface::_output_new, EstimatorInterface::_output_sample_delayed, _output_tracking_error, EstimatorInterface::_output_vert_buffer, EstimatorInterface::_output_vert_delayed, EstimatorInterface::_output_vert_new, EstimatorInterface::_params, _pos_err_integ, EstimatorInterface::_R_to_earth_now, _state, EstimatorInterface::_vel_deriv_ned, _vel_err_integ, EstimatorInterface::_vel_imu_rel_body_ned, _yaw_delta_ef, _yaw_rate_lpf_ef, estimator::stateSample::accel_bias, CONSTANTS_ONE_G, math::constrain(), counter, EstimatorInterface::cross_product(), estimator::imuSample::delta_ang, estimator::imuSample::delta_ang_dt, estimator::imuSample::delta_vel, estimator::imuSample::delta_vel_dt, estimator::outputVert::dt, f(), RingBuffer< data_type >::get_length(), RingBuffer< data_type >::get_newest(), RingBuffer< data_type >::get_oldest(), RingBuffer< data_type >::get_oldest_index(), estimator::stateSample::gyro_bias, estimator::parameters::imu_pos_body, estimator::outputSample::pos, estimator::stateSample::pos, estimator::parameters::pos_Tau, RingBuffer< data_type >::push(), estimator::outputSample::quat_nominal, estimator::stateSample::quat_nominal, sq(), estimator::outputSample::time_us, estimator::imuSample::time_us, estimator::outputSample::vel, estimator::stateSample::vel, estimator::outputVert::vel_d, estimator::outputVert::vel_d_integ, and estimator::parameters::vel_Tau.
Referenced by update().
|
private |
Definition at line 167 of file mag_control.cpp.
References EstimatorInterface::_control_status, estimator::filter_control_status_u::fixed_wing, and estimator::filter_control_status_u::flags.
Referenced by runInAirYawReset().
|
private |
Definition at line 149 of file mag_control.cpp.
References isStrongMagneticDisturbance().
Referenced by controlGpsFusion(), runInAirYawReset(), and runOnGroundYawReset().
|
private |
Definition at line 108 of file mag_control.cpp.
References EstimatorInterface::_control_status, _mag_data_ready, estimator::filter_control_status_u::ev_yaw, estimator::filter_control_status_u::flags, and estimator::filter_control_status_u::gps_yaw.
Referenced by controlMagFusion().
|
private |
Definition at line 237 of file mag_control.cpp.
References EstimatorInterface::_control_status, EstimatorInterface::_imu_sample_delayed, _time_last_mov_3d_mag_suitable, estimator::filter_control_status_u::flags, estimator::filter_control_status_u::mag_aligned_in_flight, and estimator::imuSample::time_us.
Referenced by selectMagAuto().
|
private |
Definition at line 187 of file mag_control.cpp.
References EstimatorInterface::_imu_sample_delayed, _time_last_mov_3d_mag_suitable, checkMagBiasObservability(), checkYawAngleObservability(), isMagBiasObservable(), isYawAngleObservable(), and estimator::imuSample::time_us.
Referenced by selectMagAuto().
|
private |
Definition at line 115 of file mag_control.cpp.
References EstimatorInterface::_control_status, _mag_yaw_reset_req, _state, estimator::filter_control_status_u::flags, getTerrainVPos(), estimator::filter_control_status_u::mag_aligned_in_flight, and estimator::stateSample::pos.
Referenced by controlMagFusion().
|
private |
Definition at line 209 of file mag_control.cpp.
References EstimatorInterface::_imu_sample_delayed, _mag_bias_observable, EstimatorInterface::_params, _time_yaw_started, _yaw_delta_ef, _yaw_rate_lpf_ef, f(), estimator::parameters::mag_yaw_rate_gate, and estimator::imuSample::time_us.
Referenced by check3DMagFusionSuitability().
|
private |
Definition at line 245 of file mag_control.cpp.
References EstimatorInterface::_control_status, EstimatorInterface::_params, estimator::filter_control_status_u::flags, estimator::filter_control_status_u::gps, estimator::filter_control_status_u::mag_3D, estimator::filter_control_status_u::mag_dec, estimator::parameters::mag_declination_source, and MASK_FUSE_DECL.
Referenced by controlMagFusion().
|
private |
Definition at line 285 of file mag_control.cpp.
References EstimatorInterface::_control_status, EstimatorInterface::_NED_origin_initialised, EstimatorInterface::_params, estimator::parameters::check_mag_strength, estimator::filter_control_status_u::flags, isMeasuredMatchingAverageMagStrength(), isMeasuredMatchingGpsMagStrength(), and estimator::filter_control_status_u::mag_field_disturbed.
Referenced by controlMagFusion().
|
private |
Definition at line 256 of file mag_control.cpp.
References EstimatorInterface::_imu_sample_delayed, _mag_inhibit_yaw_reset_req, _mag_use_inhibit, _mag_use_not_inhibit_us, shouldInhibitMag(), and estimator::imuSample::time_us.
Referenced by controlMagFusion().
|
private |
Definition at line 1166 of file control.cpp.
References EstimatorInterface::_control_status, _hagl_innov, _hagl_innov_var, _is_range_aid_suitable, EstimatorInterface::_params, _rng_hgt_valid, _state, _terrain_vpos, estimator::filter_control_status_u::ev_pos, estimator::filter_control_status_u::ev_vel, estimator::filter_control_status_u::flags, estimator::filter_control_status_u::gps, estimator::filter_control_status_u::in_air, isTerrainEstimateValid(), estimator::parameters::max_hagl_for_range_aid, estimator::parameters::max_vel_for_range_aid, estimator::filter_control_status_u::opt_flow, estimator::stateSample::pos, estimator::parameters::range_aid_innov_gate, sq(), and estimator::stateSample::vel.
Referenced by controlHeightFusion().
|
private |
Definition at line 197 of file mag_control.cpp.
References _accel_lpf_NE, EstimatorInterface::_control_status, EstimatorInterface::_params, _yaw_angle_observable, estimator::filter_control_status_u::ev_pos, estimator::filter_control_status_u::flags, estimator::filter_control_status_u::gps, and estimator::parameters::mag_acc_gate.
Referenced by check3DMagFusionSuitability().
|
private |
Definition at line 917 of file covariance.cpp.
References _mag_decl_cov_reset, and zeroMagCov().
Referenced by isRangeDataContinuous(), realignYawGPS(), resetMagHeading(), resetMagRelatedCovariances(), and stopMagFusion().
|
overridevirtual |
Implements EstimatorInterface.
Definition at line 59 of file gps_checks.cpp.
References EstimatorInterface::_control_status, _gps_alt_ref, _gps_checks_passed, EstimatorInterface::_gps_origin_eph, EstimatorInterface::_gps_origin_epv, _hgt_sensor_offset, _last_gps_origin_time_us, EstimatorInterface::_mag_declination_gps, EstimatorInterface::_mag_inclination_gps, EstimatorInterface::_mag_strength_gps, _mag_yaw_reset_req, EstimatorInterface::_NED_origin_initialised, _primary_hgt_source, _state, EstimatorInterface::_time_last_imu, estimator::gps_message::alt, estimator::filter_control_status_u::baro_hgt, ECL_INFO_TIMESTAMPED, estimator::gps_message::eph, estimator::gps_message::epv, estimator::filter_control_status_u::ev_pos, estimator::filter_control_status_u::ev_vel, f(), estimator::gps_message::fix_type, estimator::filter_control_status_u::flags, get_mag_declination(), get_mag_inclination(), get_mag_strength(), estimator::filter_control_status_u::gps, estimator::filter_control_status_u::gps_hgt, gps_is_good(), estimator::gps_message::lat, estimator::gps_message::lon, map_projection_init_timestamped(), map_projection_reproject(), estimator::filter_control_status_u::opt_flow, estimator::stateSample::pos, math::radians(), estimator::filter_control_status_u::rng_hgt, and VDIST_SENSOR_GPS.
Referenced by position_covariances().
|
overridevirtual |
Implements EstimatorInterface.
Definition at line 378 of file ekf.cpp.
References EstimatorInterface::_imu_buffer, _imu_collection_time_adj, _imu_down_sampled, EstimatorInterface::_imu_sample_delayed, EstimatorInterface::_imu_sample_new, EstimatorInterface::_imu_updated, EstimatorInterface::_min_obs_interval_us, EstimatorInterface::_obs_buffer_length, _q_down_sampled, math::constrain(), estimator::imuSample::delta_ang, estimator::imuSample::delta_ang_dt, estimator::imuSample::delta_vel, estimator::imuSample::delta_vel_dt, f(), EstimatorInterface::FILTER_UPDATE_PERIOD_S, RingBuffer< data_type >::get_oldest(), RingBuffer< data_type >::push(), and estimator::imuSample::time_us.
Referenced by position_covariances().
|
private |
Definition at line 784 of file ekf_helper.cpp.
References _dt_ekf_avg, EstimatorInterface::_params, _state, estimator::parameters::acc_bias_lim, estimator::stateSample::accel_bias, math::constrain(), f(), estimator::stateSample::gyro_bias, estimator::stateSample::mag_B, estimator::stateSample::mag_I, estimator::stateSample::pos, estimator::stateSample::quat_nominal, math::radians(), estimator::stateSample::vel, and estimator::stateSample::wind_vel.
Referenced by predictState().
|
private |
Definition at line 1199 of file control.cpp.
References EstimatorInterface::_control_status, EstimatorInterface::_params, _tas_data_ready, _time_last_arsp_fuse, _time_last_beta_fuse, EstimatorInterface::_time_last_imu, estimator::filter_control_status_u::flags, estimator::filter_control_status_u::fuse_aspd, fuseAirspeed(), estimator::parameters::fusion_mode, estimator::filter_control_status_u::in_air, MASK_USE_DRAG, resetWindCovariance(), resetWindStates(), and estimator::filter_control_status_u::wind.
Referenced by controlFusionModes().
|
private |
Definition at line 1364 of file control.cpp.
References _aux_vel_innov, EstimatorInterface::_auxvel_buffer, EstimatorInterface::_auxvel_sample_delayed, EstimatorInterface::_control_status, _fuse_height, _fuse_hor_vel, _fuse_hor_vel_aux, _fuse_pos, _fuse_vert_vel, _hvelInnovGate, EstimatorInterface::_imu_sample_delayed, EstimatorInterface::_params, _state, _velObsVarNED, estimator::parameters::auxvel_gate, estimator::filter_control_status_u::ev_pos, estimator::filter_control_status_u::ev_vel, estimator::filter_control_status_u::flags, fuseVelPosHeight(), estimator::filter_control_status_u::gps, estimator::filter_control_status_u::opt_flow, RingBuffer< data_type >::pop_first_older_than(), estimator::imuSample::time_us, estimator::stateSample::vel, estimator::auxVelSample::velNE, and estimator::auxVelSample::velVarNE.
Referenced by controlFusionModes().
|
private |
|
private |
Definition at line 1242 of file control.cpp.
References EstimatorInterface::_control_status, EstimatorInterface::_params, _time_last_arsp_fuse, _time_last_beta_fuse, EstimatorInterface::_time_last_imu, estimator::parameters::beta_avg_ft_us, estimator::filter_control_status_u::flags, estimator::filter_control_status_u::fuse_beta, fuseSideslip(), estimator::parameters::fusion_mode, estimator::filter_control_status_u::in_air, MASK_USE_DRAG, resetWindCovariance(), resetWindStates(), and estimator::filter_control_status_u::wind.
Referenced by controlFusionModes().
|
private |
Definition at line 1276 of file control.cpp.
References EstimatorInterface::_control_status, EstimatorInterface::_drag_buffer, EstimatorInterface::_drag_sample_delayed, EstimatorInterface::_imu_sample_delayed, _mag_inhibit_yaw_reset_req, EstimatorInterface::_params, estimator::filter_control_status_u::flags, fuseDrag(), estimator::parameters::fusion_mode, estimator::filter_control_status_u::in_air, MASK_USE_DRAG, RingBuffer< data_type >::pop_first_older_than(), resetWindCovariance(), resetWindStates(), estimator::imuSample::time_us, and estimator::filter_control_status_u::wind.
Referenced by controlFusionModes().
|
private |
Definition at line 174 of file control.cpp.
References EstimatorInterface::_control_status, _ev_data_ready, _ev_rot_mat, _ev_rot_mat_initialised, EstimatorInterface::_ev_sample_delayed, EstimatorInterface::_ext_vision_buffer, _fuse_height, _fuse_hor_vel, _fuse_hpos_as_odom, _fuse_pos, _fuse_vert_vel, _hpos_pred_prev, _hpos_prev_available, _hvelInnovGate, EstimatorInterface::_imu_sample_delayed, EstimatorInterface::_output_buffer, EstimatorInterface::_output_new, EstimatorInterface::_params, _pos_meas_prev, _posInnovGateNE, _posObsNoiseNE, _R_to_earth, _state, _state_reset_status, EstimatorInterface::_time_last_ext_vision, EstimatorInterface::_time_last_imu, _time_last_of_fuse, _time_last_pos_fuse, _time_last_vel_fuse, _vel_pos_innov, _velObsVarNED, _vvelInnovGate, estimator::extVisionSample::angErr, calcExtVisRotMat(), EstimatorInterface::cross_product(), estimator::imuSample::delta_ang, estimator::imuSample::delta_ang_dt, ECL_INFO_TIMESTAMPED, estimator::filter_control_status_u::ev_hgt, EV_MAX_INTERVAL, estimator::filter_control_status_u::ev_pos, estimator::parameters::ev_pos_body, estimator::parameters::ev_pos_innov_gate, estimator::filter_control_status_u::ev_vel, estimator::parameters::ev_vel_innov_gate, estimator::filter_control_status_u::ev_yaw, f(), estimator::filter_control_status_u::flags, fuseHeading(), fuseVelPosHeight(), estimator::parameters::fusion_mode, RingBuffer< data_type >::get_length(), RingBuffer< data_type >::get_newest(), estimator::filter_control_status_u::gps, estimator::parameters::imu_pos_body, increaseQuatYawErrVariance(), estimator::filter_control_status_u::mag_dec, MASK_ROTATE_EV, MASK_USE_EVPOS, MASK_USE_EVVEL, MASK_USE_EVYAW, MASK_USE_GPS, estimator::extVisionSample::pos, estimator::stateSample::pos, estimator::extVisionSample::posErr, estimator::extVisionSample::quat, estimator::outputSample::quat_nominal, estimator::stateSample::quat_nominal, estimator::parameters::reset_timeout_max, resetExtVisRotMat(), resetHeight(), resetPosition(), resetVelocity(), setControlEVHeight(), sq(), stopMag3DFusion(), stopMagHdgFusion(), estimator::filter_control_status_u::tilt_align, uncorrelateQuatStates(), VDIST_SENSOR_EV, estimator::parameters::vdist_sensor_type, estimator::extVisionSample::vel, estimator::stateSample::vel, estimator::extVisionSample::velErr, and estimator::filter_control_status_u::yaw_align.
Referenced by controlFusionModes().
|
private |
Definition at line 46 of file control.cpp.
References EstimatorInterface::_airspeed_buffer, EstimatorInterface::_airspeed_sample_delayed, EstimatorInterface::_baro_buffer, _baro_data_ready, _baro_hgt_faulty, EstimatorInterface::_baro_sample_delayed, EstimatorInterface::_control_status, EstimatorInterface::_control_status_prev, _cos_tilt_rng, _delta_time_baro_us, _ev_data_ready, EstimatorInterface::_ev_sample_delayed, EstimatorInterface::_ext_vision_buffer, EstimatorInterface::_flow_buffer, _flow_data_ready, _flow_for_terrain_data_ready, EstimatorInterface::_flow_sample_delayed, EstimatorInterface::_gps_buffer, _gps_data_ready, _gps_hgt_intermittent, EstimatorInterface::_gps_sample_delayed, EstimatorInterface::_imu_buffer_length, EstimatorInterface::_imu_sample_delayed, EstimatorInterface::_mag_buffer, _mag_data_ready, EstimatorInterface::_mag_declination_gps, EstimatorInterface::_mag_inclination_gps, _mag_lpf, EstimatorInterface::_mag_sample_delayed, EstimatorInterface::_mag_strength_gps, EstimatorInterface::_NED_origin_initialised, EstimatorInterface::_obs_buffer_length, EstimatorInterface::_params, _R_rng_to_earth_2_2, _R_to_earth, EstimatorInterface::_range_buffer, _range_data_ready, EstimatorInterface::_range_sample_delayed, _rng_hgt_valid, _sin_tilt_rng, _tas_data_ready, _time_last_hagl_fuse, EstimatorInterface::_time_last_imu, estimator::filter_control_status_u::baro_hgt, BARO_MAX_INTERVAL, calcRotVecVariances(), calculate_synthetic_mag_z_measurement(), controlAirDataFusion(), controlAuxVelFusion(), controlBetaFusion(), controlDragFusion(), controlExternalVisionFusion(), controlGpsFusion(), controlHeightFusion(), controlHeightSensorTimeouts(), controlMagFusion(), controlOpticalFlowFusion(), controlVelPosFusion(), ECL_ERR, ECL_INFO, estimator::filter_control_status_u::ev_hgt, f(), estimator::filter_control_status_u::flags, RingBuffer< data_type >::get_newest(), AlphaFilter< T >::getState(), estimator::filter_control_status_u::gps, estimator::filter_control_status_u::gps_hgt, GPS_MAX_INTERVAL, estimator::parameters::imu_pos_body, estimator::filter_control_status_u::in_air, estimator::magSample::mag, estimator::parameters::mag_declination_source, MASK_USE_GEO_DECL, estimator::filter_control_status_u::opt_flow, RingBuffer< data_type >::pop_first_older_than(), math::radians(), estimator::parameters::range_cos_max_tilt, resetMagHeading(), estimator::rangeSample::rng, estimator::filter_control_status_u::rng_hgt, estimator::parameters::rng_pos_body, sq(), estimator::parameters::synthesize_mag_z, estimator::filter_control_status_u::synthetic_mag_z, estimator::filter_control_status_u::tilt_align, estimator::imuSample::time_us, estimator::gpsSample::time_us, estimator::baroSample::time_us, update_deadreckoning_status(), updateRangeDataValidity(), estimator::filter_control_status_u::value, and estimator::filter_control_status_u::yaw_align.
Referenced by update().
|
private |
Definition at line 576 of file control.cpp.
References EstimatorInterface::_control_status, _fuse_hor_vel, _fuse_pos, _fuse_vert_vel, _gps_data_ready, EstimatorInterface::_gps_sample_delayed, _hvelInnovGate, EstimatorInterface::_imu_sample_delayed, _last_gps_fail_us, _last_gps_pass_us, _mag_inhibit_yaw_reset_req, _mag_lpf, EstimatorInterface::_NED_origin_initialised, EstimatorInterface::_params, _posInnovGateNE, _posObsNoiseNE, _R_to_earth, _state, _time_last_delpos_fuse, EstimatorInterface::_time_last_gps, EstimatorInterface::_time_last_imu, _time_last_of_fuse, _time_last_pos_fuse, _time_last_vel_fuse, _vel_pos_innov, _velObsVarNED, _velpos_reset_request, _vvelInnovGate, canResetMagHeading(), math::constrain(), EstimatorInterface::cross_product(), estimator::imuSample::delta_ang, estimator::imuSample::delta_ang_dt, do_reset(), ECL_INFO_TIMESTAMPED, ECL_WARN_TIMESTAMPED, estimator::filter_control_status_u::ev_pos, estimator::filter_control_status_u::ev_vel, estimator::filter_control_status_u::ev_yaw, EstimatorInterface::FILTER_UPDATE_PERIOD_S, estimator::filter_control_status_u::fixed_wing, estimator::filter_control_status_u::flags, fuseGpsAntYaw(), estimator::parameters::fusion_mode, AlphaFilter< T >::getState(), estimator::filter_control_status_u::gps, GPS_MAX_INTERVAL, estimator::parameters::gps_pos_body, estimator::parameters::gps_pos_innov_gate, estimator::parameters::gps_pos_noise, estimator::parameters::gps_vel_innov_gate, estimator::parameters::gps_vel_noise, estimator::filter_control_status_u::gps_yaw, estimator::gpsSample::hacc, estimator::gpsSample::hgt, estimator::parameters::imu_pos_body, estimator::filter_control_status_u::in_air, ISFINITE, estimator::filter_control_status_u::mag_aligned_in_flight, estimator::filter_control_status_u::mag_dec, MASK_ROTATE_EV, MASK_USE_GPS, MASK_USE_GPSYAW, estimator::filter_control_status_u::opt_flow, P, estimator::gpsSample::pos, estimator::stateSample::pos, estimator::parameters::pos_noaid_noise, realignYawGPS(), estimator::parameters::reset_timeout_max, resetGpsAntYaw(), resetMagHeading(), resetPosition(), resetVelocity(), estimator::gpsSample::sacc, setDiag(), sq(), stopMag3DFusion(), stopMagHdgFusion(), estimator::parameters::switch_on_gyro_bias, estimator::filter_control_status_u::tilt_align, estimator::imuSample::time_us, estimator::gpsSample::time_us, estimator::gpsSample::vel, estimator::stateSample::vel, estimator::gpsSample::yaw, and estimator::filter_control_status_u::yaw_align.
Referenced by controlFusionModes().
|
private |
Definition at line 996 of file control.cpp.
References _baro_data_ready, _baro_hgt_faulty, _baro_hgt_offset, EstimatorInterface::_baro_sample_delayed, EstimatorInterface::_control_status, EstimatorInterface::_control_status_prev, _delta_time_baro_us, _fuse_height, _gps_alt_ref, _gps_checks_passed, _gps_data_ready, _gps_hgt_intermittent, EstimatorInterface::_gps_sample_delayed, _hgt_sensor_offset, EstimatorInterface::_imu_sample_delayed, EstimatorInterface::_params, _R_rng_to_earth_2_2, _range_aid_mode_selected, _range_data_ready, EstimatorInterface::_range_sample_delayed, _rng_hgt_valid, _state, _terrain_vpos, EstimatorInterface::_time_last_gnd_effect_on, _time_last_hgt_fuse, EstimatorInterface::_time_last_imu, estimator::filter_control_status_u::baro_hgt, checkRangeAidSuitability(), math::constrain(), f(), estimator::filter_control_status_u::flags, estimator::filter_control_status_u::gnd_effect, GNDEFFECT_TIMEOUT, estimator::filter_control_status_u::gps_hgt, estimator::gpsSample::hgt, estimator::baroSample::hgt, estimator::filter_control_status_u::in_air, isRangeAidSuitable(), isTerrainEstimateValid(), estimator::stateSample::pos, estimator::parameters::range_aid, estimator::rangeSample::rng, estimator::parameters::rng_gnd_clearance, estimator::filter_control_status_u::rng_hgt, RNG_MAX_INTERVAL, setControlBaroHeight(), setControlGPSHeight(), setControlRangeHeight(), estimator::imuSample::time_us, estimator::rangeSample::time_us, VDIST_SENSOR_BARO, VDIST_SENSOR_EV, VDIST_SENSOR_GPS, VDIST_SENSOR_RANGE, and estimator::parameters::vdist_sensor_type.
Referenced by controlFusionModes().
|
private |
Definition at line 762 of file control.cpp.
References _bad_vert_accel_detected, EstimatorInterface::_baro_buffer, _baro_hgt_faulty, _baro_hgt_offset, EstimatorInterface::_baro_sample_delayed, EstimatorInterface::_control_status, EstimatorInterface::_ext_vision_buffer, EstimatorInterface::_gps_buffer, _gps_hgt_intermittent, EstimatorInterface::_gps_sample_delayed, _hgt_sensor_offset, EstimatorInterface::_imu_sample_delayed, EstimatorInterface::_params, _rng_hgt_valid, _state, _time_bad_vert_accel, _time_good_vert_accel, _time_last_hgt_fuse, EstimatorInterface::_time_last_imu, _vel_pos_innov, _vel_pos_innov_var, estimator::parameters::bad_acc_reset_delay_us, BADACC_PROBATION, estimator::filter_control_status_u::baro_hgt, estimator::parameters::baro_innov_gate, BARO_MAX_INTERVAL, estimator::parameters::baro_noise, ECL_WARN_TIMESTAMPED, estimator::filter_control_status_u::ev_hgt, EV_MAX_INTERVAL, estimator::filter_control_status_u::flags, RingBuffer< data_type >::get_newest(), estimator::filter_control_status_u::gps_hgt, GPS_MAX_INTERVAL, estimator::baroSample::hgt, P, estimator::stateSample::pos, estimator::parameters::req_vacc, resetHeight(), estimator::filter_control_status_u::rng_hgt, setControlBaroHeight(), setControlEVHeight(), setControlGPSHeight(), setControlRangeHeight(), sq(), estimator::imuSample::time_us, estimator::gpsSample::time_us, estimator::baroSample::time_us, estimator::extVisionSample::time_us, estimator::gpsSample::vacc, and estimator::parameters::vert_innov_test_lim.
Referenced by controlFusionModes().
|
private |
Definition at line 42 of file mag_control.cpp.
References EstimatorInterface::_control_status, _last_on_ground_posD, _num_bad_flight_yaw_events, EstimatorInterface::_params, _state, canRunMagFusion(), checkHaglYawResetReq(), checkMagDeclRequired(), checkMagFieldStrength(), checkMagInhibition(), estimator::filter_control_status_u::flags, estimator::filter_control_status_u::in_air, estimator::filter_control_status_u::mag_aligned_in_flight, estimator::filter_control_status_u::mag_fault, MAG_FUSE_TYPE_3D, MAG_FUSE_TYPE_AUTO, MAG_FUSE_TYPE_HEADING, MAG_FUSE_TYPE_INDOOR, MAG_FUSE_TYPE_NONE, estimator::parameters::mag_fusion_type, estimator::stateSample::pos, runInAirYawReset(), runMagAndMagDeclFusions(), runOnGroundYawReset(), runVelPosReset(), selectMagAuto(), startMag3DFusion(), startMagHdgFusion(), stopMagFusion(), updateMagFilter(), and estimator::filter_control_status_u::yaw_align.
Referenced by controlFusionModes().
|
private |
Definition at line 422 of file control.cpp.
References _accel_vec_filt, _ang_rate_mag_filt, EstimatorInterface::_control_status, _delta_time_of, _flow_data_ready, EstimatorInterface::_flow_max_rate, EstimatorInterface::_flow_sample_delayed, _flowRadXYcomp, _gps_error_norm, _imu_del_ang_of, EstimatorInterface::_imu_sample_delayed, _inhibit_flow_use, EstimatorInterface::_is_dead_reckoning, _last_known_posNE, _mag_lpf, EstimatorInterface::_params, _R_to_earth, _state, _time_bad_motion_us, _time_good_motion_us, _time_last_hagl_fuse, EstimatorInterface::_time_last_imu, _time_last_of_fuse, alignOutputFilter(), calcOptFlowBodyRateComp(), CONSTANTS_ONE_G, estimator::imuSample::delta_ang, estimator::imuSample::delta_ang_dt, do_reset(), estimator::flowSample::dt, estimator::filter_control_status_u::ev_pos, estimator::filter_control_status_u::ev_vel, f(), estimator::filter_control_status_u::flags, estimator::parameters::flow_qual_min, estimator::flowSample::flowRadXY, fuseOptFlow(), estimator::parameters::fusion_mode, AlphaFilter< T >::getState(), estimator::filter_control_status_u::gps, estimator::stateSample::gyro_bias, estimator::flowSample::gyroXYZ, estimator::filter_control_status_u::in_air, isRangeAidSuitable(), isTerrainEstimateValid(), MASK_USE_OF, estimator::filter_control_status_u::opt_flow, estimator::stateSample::pos, estimator::flowSample::quality, math::radians(), estimator::parameters::reset_timeout_max, resetMagHeading(), resetPosition(), resetVelocity(), estimator::filter_control_status_u::tilt_align, estimator::imuSample::time_us, estimator::flowSample::time_us, and estimator::filter_control_status_u::yaw_align.
Referenced by controlFusionModes().
|
private |
|
private |
Definition at line 1299 of file control.cpp.
References EstimatorInterface::_control_status, _fuse_height, _fuse_hor_vel, _fuse_hpos_as_odom, _fuse_pos, _fuse_vert_vel, _last_known_posNE, EstimatorInterface::_params, _posInnovGateNE, _posObsNoiseNE, _state, _time_last_fake_gps, EstimatorInterface::_time_last_imu, _using_synthetic_position, _vel_pos_innov, ECL_WARN_TIMESTAMPED, estimator::filter_control_status_u::ev_pos, estimator::filter_control_status_u::ev_vel, estimator::filter_control_status_u::flags, estimator::filter_control_status_u::fuse_aspd, estimator::filter_control_status_u::fuse_beta, fuseVelPosHeight(), estimator::parameters::fusion_mode, estimator::filter_control_status_u::gps, estimator::parameters::gps_pos_noise, estimator::filter_control_status_u::in_air, MASK_USE_GPS, estimator::filter_control_status_u::opt_flow, estimator::stateSample::pos, estimator::parameters::pos_noaid_noise, resetPosition(), resetVelocity(), and estimator::filter_control_status_u::tilt_align.
Referenced by controlFusionModes().
|
inline |
Definition at line 129 of file ekf.h.
References P.
Referenced by covariances_diagonal(), orientation_covariances(), position_covariances(), and velocity_covariances().
|
inline |
Definition at line 132 of file ekf.h.
References covariances().
Referenced by Ekf2::Run().
|
private |
Definition at line 728 of file covariance.cpp.
References _accel_bias_inhibit, EstimatorInterface::_control_status, _dt_ekf_avg, EstimatorInterface::_fault_status, EstimatorInterface::_params, _R_to_earth, _state, _time_acc_bias_check, EstimatorInterface::_time_last_imu, _vel_pos_innov, estimator::parameters::acc_bias_lim, estimator::stateSample::accel_bias, estimator::fault_status_u::bad_acc_bias, CONSTANTS_ONE_G, math::constrain(), ECL_WARN_TIMESTAMPED, f(), estimator::fault_status_u::flags, estimator::filter_control_status_u::flags, estimator::parameters::fusion_mode, estimator::filter_control_status_u::mag_3D, makeSymmetrical(), MASK_INHIBIT_ACC_BIAS, P, sq(), estimator::filter_control_status_u::wind, zeroCols(), and zeroRows().
Referenced by fuseAirspeed(), fuseDeclination(), fuseDrag(), fuseGpsAntYaw(), fuseHeading(), fuseMag(), fuseOptFlow(), fuseSideslip(), fuseVelPosHeight(), and predictCovariance().
|
private |
Definition at line 1201 of file ekf_helper.cpp.
References _state, estimator::stateSample::accel_bias, estimator::stateSample::gyro_bias, estimator::stateSample::mag_B, estimator::stateSample::mag_I, estimator::stateSample::pos, estimator::stateSample::quat_nominal, estimator::stateSample::vel, and estimator::stateSample::wind_vel.
Referenced by fuseAirspeed(), fuseDeclination(), fuseDrag(), fuseGpsAntYaw(), fuseHeading(), fuseMag(), fuseOptFlow(), fuseSideslip(), and fuseVelPosHeight().
|
private |
Definition at line 47 of file airspeed_fusion.cpp.
References _airspeed_innov, _airspeed_innov_var, EstimatorInterface::_airspeed_sample_delayed, EstimatorInterface::_fault_status, EstimatorInterface::_innov_check_fail_status, EstimatorInterface::_is_wind_dead_reckoning, _k_num_states, EstimatorInterface::_params, _state, EstimatorInterface::_tas_test_ratio, _time_last_arsp_fuse, EstimatorInterface::_time_last_imu, estimator::fault_status_u::bad_airspeed, math::constrain(), estimator::airspeedSample::eas2tas, estimator::parameters::eas_noise, ECL_ERR_TIMESTAMPED, f(), fixCovarianceErrors(), estimator::fault_status_u::flags, estimator::innovation_fault_status_u::flags, fuse(), initialiseCovariance(), Kfusion, P, estimator::innovation_fault_status_u::reject_airspeed, resetWindCovariance(), resetWindStates(), sq(), estimator::parameters::tas_innov_gate, estimator::airspeedSample::true_airspeed, estimator::stateSample::vel, estimator::stateSample::wind_vel, zeroCols(), and zeroRows().
Referenced by controlAirDataFusion().
|
private |
Definition at line 815 of file mag_fusion.cpp.
References EstimatorInterface::_fault_status, _k_num_states, _state, estimator::fault_status_u::bad_mag_decl, math::constrain(), f(), fixCovarianceErrors(), estimator::fault_status_u::flags, fuse(), getMagDeclination(), Kfusion, limitDeclination(), estimator::stateSample::mag_I, P, sq(), t10, t11, t12, t13, t14, t15, t18, t19, t2, t20, t21, t3, t4, t5, t6, t7, t8, t9, zeroCols(), and zeroRows().
Referenced by run3DMagAndDeclFusions().
|
private |
Definition at line 46 of file drag_fusion.cpp.
References EstimatorInterface::_air_density, _drag_innov, _drag_innov_var, EstimatorInterface::_drag_sample_delayed, EstimatorInterface::_drag_test_ratio, _dt_ekf_avg, _k_num_states, EstimatorInterface::_params, _state, estimator::stateSample::accel_bias, estimator::dragSample::accelXY, estimator::parameters::bcoef_x, estimator::parameters::bcoef_y, estimator::parameters::drag_noise, f(), fixCovarianceErrors(), fuse(), Kfusion, P, estimator::stateSample::quat_nominal, EstimatorInterface::quat_to_invrotmat(), sq(), estimator::stateSample::vel, estimator::stateSample::wind_vel, zeroCols(), and zeroRows().
Referenced by controlDragFusion().
|
private |
Definition at line 185 of file terrain_estimator.cpp.
References _flow_gyro_bias, _flow_innov, _flow_innov_var, EstimatorInterface::_flow_sample_delayed, _flowRadXYcomp, EstimatorInterface::_params, _R_to_earth, _state, _terrain_var, _terrain_vpos, EstimatorInterface::_time_last_imu, _time_last_of_fuse, calcOptFlowMeasVar(), EstimatorInterface::cross_product(), estimator::flowSample::dt, f(), estimator::parameters::flow_innov_gate, estimator::parameters::flow_pos_body, estimator::flowSample::gyroXYZ, estimator::parameters::imu_pos_body, estimator::stateSample::pos, estimator::stateSample::quat_nominal, EstimatorInterface::quat_to_invrotmat(), estimator::parameters::rng_gnd_clearance, sq(), and estimator::stateSample::vel.
Referenced by runTerrainEstimator().
|
private |
Definition at line 48 of file gps_yaw_fusion.cpp.
References EstimatorInterface::_control_status, EstimatorInterface::_fault_status, EstimatorInterface::_gps_sample_delayed, EstimatorInterface::_gps_yaw_offset, _heading_innov, _heading_innov_var, EstimatorInterface::_innov_check_fail_status, _k_num_states, EstimatorInterface::_mag_test_ratio, EstimatorInterface::_params, _R_to_earth, _state, EstimatorInterface::_yaw_test_ratio, estimator::fault_status_u::bad_hdg, math::constrain(), ECL_ERR_TIMESTAMPED, f(), fixCovarianceErrors(), estimator::fault_status_u::flags, estimator::innovation_fault_status_u::flags, estimator::filter_control_status_u::flags, fuse(), estimator::parameters::heading_innov_gate, estimator::filter_control_status_u::in_air, initialiseCovariance(), ISFINITE, Kfusion, estimator::parameters::mag_heading_noise, math::max(), P, estimator::stateSample::quat_nominal, math::radians(), estimator::innovation_fault_status_u::reject_yaw, sq(), t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t2, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t3, t30, t31, t32, t33, t34, t35, t4, t5, t6, t7, t8, t9, estimator::filter_control_status_u::wind, matrix::wrap_pi(), estimator::gpsSample::yaw, zeroCols(), and zeroRows().
Referenced by controlGpsFusion().
|
private |
Definition at line 133 of file terrain_estimator.cpp.
References _hagl_innov, _hagl_innov_var, EstimatorInterface::_innov_check_fail_status, EstimatorInterface::_params, _R_rng_to_earth_2_2, EstimatorInterface::_range_sample_delayed, _state, EstimatorInterface::_terr_test_ratio, _terrain_var, _terrain_vpos, _time_last_hagl_fuse, EstimatorInterface::_time_last_imu, f(), estimator::innovation_fault_status_u::flags, P, estimator::stateSample::pos, estimator::parameters::range_cos_max_tilt, estimator::parameters::range_innov_gate, estimator::parameters::range_noise, estimator::parameters::range_noise_scaler, estimator::innovation_fault_status_u::reject_hagl, estimator::rangeSample::rng, sq(), and estimator::parameters::vehicle_variance_scaler.
Referenced by runTerrainEstimator().
|
private |
Definition at line 438 of file mag_fusion.cpp.
References EstimatorInterface::_control_status, EstimatorInterface::_ev_sample_delayed, EstimatorInterface::_fault_status, _heading_innov, _heading_innov_var, EstimatorInterface::_innov_check_fail_status, _k_num_states, _last_static_yaw, EstimatorInterface::_mag_sample_delayed, EstimatorInterface::_mag_test_ratio, _mag_use_inhibit, _mag_use_inhibit_prev, EstimatorInterface::_params, _R_to_earth, _state, EstimatorInterface::_vehicle_at_rest, EstimatorInterface::_yaw_test_ratio, estimator::extVisionSample::angErr, estimator::fault_status_u::bad_hdg, math::constrain(), ECL_ERR_TIMESTAMPED, estimator::filter_control_status_u::ev_yaw, f(), fixCovarianceErrors(), estimator::fault_status_u::flags, estimator::innovation_fault_status_u::flags, estimator::filter_control_status_u::flags, fuse(), getMagDeclination(), estimator::parameters::heading_innov_gate, estimator::filter_control_status_u::in_air, initialiseCovariance(), Kfusion, estimator::magSample::mag, estimator::filter_control_status_u::mag_3D, estimator::stateSample::mag_B, estimator::filter_control_status_u::mag_hdg, estimator::parameters::mag_heading_noise, math::max(), P, estimator::extVisionSample::quat, estimator::stateSample::quat_nominal, estimator::innovation_fault_status_u::reject_yaw, sq(), t10, t11, t12, t13, t14, t2, t3, t4, t5, t6, t7, t8, t9, estimator::filter_control_status_u::wind, matrix::wrap_pi(), zeroCols(), and zeroRows().
Referenced by controlExternalVisionFusion(), and runMagAndMagDeclFusions().
|
private |
Definition at line 47 of file mag_fusion.cpp.
References EstimatorInterface::_control_status, EstimatorInterface::_fault_status, _flt_mag_align_converging, EstimatorInterface::_innov_check_fail_status, _k_num_states, _mag_innov, _mag_innov_var, EstimatorInterface::_mag_sample_delayed, EstimatorInterface::_mag_test_ratio, EstimatorInterface::_params, _state, EstimatorInterface::_yaw_test_ratio, estimator::fault_status_u::bad_mag_x, estimator::fault_status_u::bad_mag_y, estimator::fault_status_u::bad_mag_z, ECL_ERR_TIMESTAMPED, f(), fixCovarianceErrors(), estimator::fault_status_u::flags, estimator::filter_control_status_u::flags, fuse(), Kfusion, limitDeclination(), estimator::magSample::mag, estimator::stateSample::mag_B, estimator::stateSample::mag_I, estimator::parameters::mag_innov_gate, estimator::parameters::mag_noise, math::max(), P, estimator::stateSample::quat_nominal, EstimatorInterface::quat_to_invrotmat(), resetMagRelatedCovariances(), sq(), estimator::filter_control_status_u::synthetic_mag_z, estimator::innovation_fault_status_u::value, zeroCols(), and zeroRows().
Referenced by run3DMagAndDeclFusions().
|
private |
Definition at line 48 of file optflow_fusion.cpp.
References EstimatorInterface::_fault_status, _flow_gyro_bias, _flow_innov, _flow_innov_var, EstimatorInterface::_flow_max_rate, EstimatorInterface::_flow_sample_delayed, _flowRadXYcomp, EstimatorInterface::_innov_check_fail_status, _k_num_states, EstimatorInterface::_params, _R_to_earth, _state, _terrain_vpos, EstimatorInterface::_time_last_imu, _time_last_of_fuse, estimator::fault_status_u::bad_optflow_X, estimator::fault_status_u::bad_optflow_Y, calcOptFlowMeasVar(), EstimatorInterface::cross_product(), estimator::flowSample::dt, f(), fixCovarianceErrors(), estimator::fault_status_u::flags, estimator::parameters::flow_innov_gate, estimator::parameters::flow_pos_body, fuse(), estimator::flowSample::gyroXYZ, H_LOS, estimator::parameters::imu_pos_body, initialiseCovariance(), Kfusion, math::max(), P, estimator::stateSample::pos, estimator::stateSample::quat_nominal, EstimatorInterface::quat_to_invrotmat(), estimator::parameters::rng_gnd_clearance, sq(), t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t2, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t3, t30, t31, t32, t33, t34, t35, t36, t37, t38, t39, t4, t40, t41, t42, t43, t44, t45, t46, t47, t48, t49, t5, t50, t51, t52, t53, t54, t55, t56, t57, t58, t59, t6, t60, t61, t62, t63, t64, t65, t66, t67, t68, t69, t7, t70, t71, t72, t73, t74, t75, t76, t77, t78, t79, t8, t80, t81, t82, t83, t84, t85, t86, t87, t88, t89, t9, t90, t91, t92, t93, t94, estimator::innovation_fault_status_u::value, estimator::stateSample::vel, zeroCols(), and zeroRows().
Referenced by controlOpticalFlowFusion().
|
private |
Definition at line 47 of file sideslip_fusion.cpp.
References _beta_innov, _beta_innov_var, EstimatorInterface::_beta_test_ratio, EstimatorInterface::_control_status, EstimatorInterface::_fault_status, EstimatorInterface::_innov_check_fail_status, EstimatorInterface::_is_wind_dead_reckoning, _k_num_states, EstimatorInterface::_params, _state, _time_last_beta_fuse, EstimatorInterface::_time_last_imu, estimator::fault_status_u::bad_sideslip, estimator::parameters::beta_innov_gate, estimator::parameters::beta_noise, ECL_ERR_TIMESTAMPED, f(), fixCovarianceErrors(), estimator::fault_status_u::flags, estimator::innovation_fault_status_u::flags, estimator::filter_control_status_u::flags, fuse(), estimator::filter_control_status_u::in_air, initialiseCovariance(), Kfusion, estimator::filter_control_status_u::mag_3D, P, estimator::stateSample::quat_nominal, EstimatorInterface::quat_to_invrotmat(), estimator::innovation_fault_status_u::reject_sideslip, resetWindCovariance(), resetWindStates(), sq(), estimator::stateSample::vel, estimator::stateSample::wind_vel, zeroCols(), and zeroRows().
Referenced by controlBetaFusion().
|
private |
Definition at line 48 of file vel_pos_fusion.cpp.
References _aux_vel_innov, _baro_hgt_offset, EstimatorInterface::_baro_sample_delayed, EstimatorInterface::_control_status, EstimatorInterface::_ev_sample_delayed, EstimatorInterface::_fault_status, _fuse_height, _fuse_hor_vel, _fuse_hor_vel_aux, _fuse_hpos_as_odom, _fuse_pos, _fuse_vert_vel, _gps_alt_ref, EstimatorInterface::_gps_sample_delayed, _hgt_sensor_offset, _hvelInnovGate, EstimatorInterface::_innov_check_fail_status, _k_num_states, EstimatorInterface::_params, _posInnovGateNE, _posObsNoiseNE, _R_rng_to_earth_2_2, EstimatorInterface::_range_sample_delayed, _state, _time_last_delpos_fuse, _time_last_hgt_fuse, EstimatorInterface::_time_last_imu, _time_last_pos_fuse, _time_last_vel_fuse, _vel_pos_innov, _vel_pos_innov_var, EstimatorInterface::_vel_pos_test_ratio, _velObsVarNED, _vvelInnovGate, estimator::fault_status_u::bad_pos_D, estimator::fault_status_u::bad_pos_E, estimator::fault_status_u::bad_pos_N, estimator::fault_status_u::bad_vel_D, estimator::fault_status_u::bad_vel_E, estimator::fault_status_u::bad_vel_N, estimator::filter_control_status_u::baro_hgt, estimator::parameters::baro_innov_gate, estimator::parameters::baro_noise, math::constrain(), estimator::filter_control_status_u::ev_hgt, estimator::parameters::ev_pos_innov_gate, f(), fixCovarianceErrors(), estimator::fault_status_u::flags, estimator::innovation_fault_status_u::flags, estimator::filter_control_status_u::flags, fuse(), estimator::filter_control_status_u::gnd_effect, estimator::parameters::gnd_effect_deadzone, estimator::filter_control_status_u::gps_hgt, estimator::parameters::gps_pos_noise, estimator::gpsSample::hgt, estimator::baroSample::hgt, estimator::extVisionSample::hgtErr, Kfusion, math::max(), P, estimator::extVisionSample::pos, estimator::stateSample::pos, estimator::parameters::pos_noaid_noise, estimator::parameters::range_cos_max_tilt, estimator::parameters::range_innov_gate, estimator::parameters::range_noise, estimator::parameters::range_noise_scaler, estimator::innovation_fault_status_u::reject_pos_D, estimator::innovation_fault_status_u::reject_pos_NE, estimator::innovation_fault_status_u::reject_vel_NED, estimator::rangeSample::rng, estimator::parameters::rng_gnd_clearance, estimator::filter_control_status_u::rng_hgt, estimator::gpsSample::sacc, sq(), estimator::filter_control_status_u::tilt_align, estimator::gpsSample::vacc, zeroCols(), and zeroRows().
Referenced by controlAuxVelFusion(), controlExternalVisionFusion(), and controlVelPosFusion().
|
overridevirtual |
Implements EstimatorInterface.
Definition at line 938 of file ekf_helper.cpp.
References _dt_ekf_avg, _state, and estimator::stateSample::accel_bias.
Referenced by get_terrain_var(), Ekf2::Run(), and TEST_F().
|
overridevirtual |
Implements EstimatorInterface.
Definition at line 847 of file ekf_helper.cpp.
References _airspeed_innov.
Referenced by Ekf2::publish_wind_estimate(), and Ekf2::Run().
|
overridevirtual |
Implements EstimatorInterface.
Definition at line 878 of file ekf_helper.cpp.
References _airspeed_innov_var.
Referenced by Ekf2::publish_wind_estimate(), and Ekf2::Run().
|
overridevirtual |
Implements EstimatorInterface.
Definition at line 835 of file ekf_helper.cpp.
References _aux_vel_innov.
Referenced by Ekf2::Run().
|
overridevirtual |
Implements EstimatorInterface.
Definition at line 853 of file ekf_helper.cpp.
References _beta_innov.
Referenced by Ekf2::publish_wind_estimate(), and Ekf2::Run().
|
overridevirtual |
Implements EstimatorInterface.
Definition at line 884 of file ekf_helper.cpp.
References _beta_innov_var.
Referenced by Ekf2::publish_wind_estimate(), and Ekf2::Run().
|
overridevirtual |
Implements EstimatorInterface.
Definition at line 529 of file optflow_fusion.cpp.
References _drag_innov.
Referenced by Ekf2::Run().
|
overridevirtual |
Implements EstimatorInterface.
Definition at line 535 of file optflow_fusion.cpp.
References _drag_innov_var.
Referenced by Ekf2::Run().
|
overridevirtual |
Implements EstimatorInterface.
Definition at line 1079 of file ekf_helper.cpp.
References EstimatorInterface::_control_status, EstimatorInterface::_flow_max_distance, EstimatorInterface::_flow_max_rate, EstimatorInterface::_flow_min_distance, EstimatorInterface::_params, EstimatorInterface::_rng_valid_max_val, EstimatorInterface::_rng_valid_min_val, _state, _terrain_vpos, estimator::filter_control_status_u::ev_pos, estimator::filter_control_status_u::ev_vel, f(), estimator::filter_control_status_u::flags, estimator::filter_control_status_u::gps, estimator::filter_control_status_u::opt_flow, estimator::stateSample::pos, estimator::parameters::range_aid, and estimator::filter_control_status_u::rng_hgt.
Referenced by position_covariances(), and Ekf2::Run().
|
overridevirtual |
Implements EstimatorInterface.
Definition at line 1005 of file ekf_helper.cpp.
References EstimatorInterface::_control_status, EstimatorInterface::_gps_origin_eph, EstimatorInterface::_gps_origin_epv, EstimatorInterface::_is_dead_reckoning, _vel_pos_innov, estimator::filter_control_status_u::ev_pos, estimator::filter_control_status_u::flags, estimator::filter_control_status_u::gps, math::max(), P, and sq().
Referenced by position_covariances(), and Ekf2::Run().
|
overridevirtual |
Implements EstimatorInterface.
Definition at line 1024 of file ekf_helper.cpp.
References EstimatorInterface::_control_status, EstimatorInterface::_is_dead_reckoning, _vel_pos_innov, estimator::filter_control_status_u::ev_pos, estimator::filter_control_status_u::flags, estimator::filter_control_status_u::gps, math::max(), P, and sq().
Referenced by position_covariances(), and Ekf2::Run().
|
overridevirtual |
Implements EstimatorInterface.
Definition at line 959 of file ekf_helper.cpp.
References _gps_alt_ref, _last_gps_origin_time_us, and EstimatorInterface::_NED_origin_initialised.
Referenced by position_covariances(), and Ekf2::Run().
|
overridevirtual |
Implements EstimatorInterface.
Definition at line 1178 of file ekf_helper.cpp.
References _bad_vert_accel_detected, EstimatorInterface::_control_status, EstimatorInterface::_fault_status, EstimatorInterface::_mag_test_ratio, EstimatorInterface::_vel_pos_test_ratio, EstimatorInterface::_yaw_test_ratio, estimator::ekf_solution_status::accel_error, estimator::ekf_solution_status::attitude, estimator::filter_control_status_u::baro_hgt, estimator::ekf_solution_status::const_pos_mode, estimator::filter_control_status_u::ev_hgt, estimator::filter_control_status_u::ev_pos, estimator::filter_control_status_u::ev_vel, f(), estimator::filter_control_status_u::flags, estimator::ekf_solution_status::flags, estimator::filter_control_status_u::fuse_aspd, estimator::filter_control_status_u::fuse_beta, estimator::filter_control_status_u::gps, estimator::ekf_solution_status::gps_glitch, estimator::filter_control_status_u::gps_hgt, isTerrainEstimateValid(), estimator::filter_control_status_u::opt_flow, estimator::ekf_solution_status::pos_horiz_abs, estimator::ekf_solution_status::pos_horiz_rel, estimator::ekf_solution_status::pos_vert_abs, estimator::ekf_solution_status::pos_vert_agl, estimator::ekf_solution_status::pred_pos_horiz_abs, estimator::ekf_solution_status::pred_pos_horiz_rel, estimator::filter_control_status_u::rng_hgt, estimator::filter_control_status_u::tilt_align, estimator::fault_status_u::value, estimator::ekf_solution_status::value, estimator::ekf_solution_status::velocity_horiz, estimator::ekf_solution_status::velocity_vert, and estimator::filter_control_status_u::yaw_align.
Referenced by get_quat_reset(), and Ekf2::Run().
|
overridevirtual |
Implements EstimatorInterface.
Definition at line 1041 of file ekf_helper.cpp.
References EstimatorInterface::_control_status, _flow_innov, EstimatorInterface::_is_dead_reckoning, EstimatorInterface::_params, _state, _terrain_vpos, _vel_pos_innov, estimator::filter_control_status_u::ev_pos, estimator::filter_control_status_u::ev_vel, estimator::filter_control_status_u::flags, estimator::filter_control_status_u::gps, math::max(), estimator::filter_control_status_u::opt_flow, P, estimator::stateSample::pos, estimator::parameters::rng_gnd_clearance, and sq().
Referenced by position_covariances(), and Ekf2::Run().
|
overridevirtual |
Implements EstimatorInterface.
Definition at line 1680 of file ekf_helper.cpp.
References _ev_rot_vec_filt.
Referenced by get_quat_reset(), and Ekf2::Run().
|
overridevirtual |
Implements EstimatorInterface.
Definition at line 518 of file optflow_fusion.cpp.
References _flow_innov.
Referenced by Ekf2::Run().
|
overridevirtual |
Implements EstimatorInterface.
Definition at line 524 of file optflow_fusion.cpp.
References _flow_innov_var.
Referenced by Ekf2::Run().
|
overridevirtual |
Implements EstimatorInterface.
Definition at line 896 of file ekf_helper.cpp.
References _gps_check_fail_status, and estimator::gps_check_fail_status_u::value.
Referenced by get_terrain_var(), and Ekf2::Run().
|
overridevirtual |
Implements EstimatorInterface.
Definition at line 993 of file ekf_helper.cpp.
References EstimatorInterface::_gps_drift_metrics, EstimatorInterface::_gps_drift_updated, and EstimatorInterface::_vehicle_at_rest.
Referenced by position_covariances(), and Ekf2::Run().
|
overridevirtual |
Implements EstimatorInterface.
Definition at line 948 of file ekf_helper.cpp.
References _dt_ekf_avg, _state, and estimator::stateSample::gyro_bias.
Referenced by get_terrain_var(), Ekf2::Run(), and TEST_F().
|
overridevirtual |
Implements EstimatorInterface.
Definition at line 859 of file ekf_helper.cpp.
References _heading_innov.
Referenced by Ekf2::Run().
|
overridevirtual |
Implements EstimatorInterface.
Definition at line 890 of file ekf_helper.cpp.
References _heading_innov_var.
Referenced by Ekf2::Run().
|
overridevirtual |
Implements EstimatorInterface.
Definition at line 980 of file ekf_helper.cpp.
References EstimatorInterface::_vibe_metrics.
Referenced by position_covariances(), and Ekf2::Run().
|
overridevirtual |
Implements EstimatorInterface.
Definition at line 1157 of file ekf_helper.cpp.
References EstimatorInterface::_beta_test_ratio, EstimatorInterface::_innov_check_fail_status, EstimatorInterface::_mag_test_ratio, EstimatorInterface::_tas_test_ratio, EstimatorInterface::_terr_test_ratio, EstimatorInterface::_vel_pos_test_ratio, EstimatorInterface::_yaw_test_ratio, math::max(), and estimator::innovation_fault_status_u::value.
Referenced by get_quat_reset(), and Ekf2::Run().
|
overridevirtual |
Implements EstimatorInterface.
Definition at line 841 of file ekf_helper.cpp.
References _mag_innov.
Referenced by Ekf2::Run().
|
overridevirtual |
Implements EstimatorInterface.
Definition at line 872 of file ekf_helper.cpp.
References _mag_innov_var.
Referenced by Ekf2::Run().
|
overridevirtual |
Implements EstimatorInterface.
Definition at line 969 of file ekf_helper.cpp.
References _output_tracking_error.
Referenced by position_covariances(), and Ekf2::Run().
|
overridevirtual |
Implements EstimatorInterface.
Definition at line 121 of file covariance.cpp.
References P.
Referenced by position_covariances().
|
inlineoverridevirtual |
Implements EstimatorInterface.
Definition at line 223 of file ekf.h.
References _state_reset_status.
Referenced by Ekf2::Run().
|
inlineoverridevirtual |
Implements EstimatorInterface.
Definition at line 229 of file ekf.h.
References _state_reset_status.
Referenced by Ekf2::Run().
|
inlineoverridevirtual |
Implements EstimatorInterface.
Definition at line 243 of file ekf.h.
References _state_reset_status, calculate_quaternion(), get_ekf_soln_status(), get_ev2ekf_quaternion(), get_innovation_test_status(), and status.
Referenced by Ekf2::publish_attitude().
|
overridevirtual |
Implements EstimatorInterface.
Definition at line 902 of file ekf_helper.cpp.
References _state, estimator::stateSample::accel_bias, estimator::stateSample::gyro_bias, estimator::stateSample::mag_B, estimator::stateSample::mag_I, estimator::stateSample::pos, estimator::stateSample::quat_nominal, estimator::stateSample::vel, and estimator::stateSample::wind_vel.
Referenced by Ekf2::Run().
|
inline |
Definition at line 211 of file ekf.h.
References _terrain_var, get_accel_bias(), get_gps_check_status(), and get_gyro_bias().
|
overridevirtual |
Implements EstimatorInterface.
Definition at line 251 of file airspeed_fusion.cpp.
References _state, sq(), estimator::stateSample::vel, and estimator::stateSample::wind_vel.
|
overridevirtual |
Implements EstimatorInterface.
Definition at line 829 of file ekf_helper.cpp.
References _vel_pos_innov.
Referenced by Ekf2::Run().
|
overridevirtual |
Implements EstimatorInterface.
Definition at line 866 of file ekf_helper.cpp.
References _vel_pos_innov_var.
Referenced by Ekf2::Run().
|
overridevirtual |
Implements EstimatorInterface.
Definition at line 128 of file covariance.cpp.
References P.
Referenced by position_covariances().
|
inlineoverridevirtual |
Implements EstimatorInterface.
Definition at line 226 of file ekf.h.
References _state_reset_status.
Referenced by Ekf2::Run().
|
inlineoverridevirtual |
Implements EstimatorInterface.
Definition at line 236 of file ekf.h.
References _state_reset_status.
Referenced by Ekf2::Run().
|
overridevirtual |
Implements EstimatorInterface.
Definition at line 239 of file airspeed_fusion.cpp.
References _state, and estimator::stateSample::wind_vel.
Referenced by Ekf2::get_vel_body_wind(), and Ekf2::publish_wind_estimate().
|
overridevirtual |
Implements EstimatorInterface.
Definition at line 245 of file airspeed_fusion.cpp.
References P.
Referenced by Ekf2::publish_wind_estimate().
|
overridevirtual |
Implements EstimatorInterface.
Definition at line 311 of file terrain_estimator.cpp.
References _hagl_innov.
|
overridevirtual |
Implements EstimatorInterface.
Definition at line 317 of file terrain_estimator.cpp.
References _hagl_innov_var.
|
private |
Definition at line 750 of file ekf_helper.cpp.
References EstimatorInterface::_control_status, EstimatorInterface::_mag_declination_gps, EstimatorInterface::_NED_origin_initialised, EstimatorInterface::_params, _state, estimator::filter_control_status_u::flags, estimator::filter_control_status_u::mag_aligned_in_flight, estimator::parameters::mag_declination_deg, estimator::parameters::mag_declination_source, estimator::stateSample::mag_I, MASK_USE_GEO_DECL, and math::radians().
Referenced by fuseDeclination(), fuseHeading(), limitDeclination(), and resetMagHeading().
|
overridevirtual |
Implements EstimatorInterface.
Definition at line 306 of file terrain_estimator.cpp.
References _terrain_vpos.
Referenced by position_covariances().
|
private |
Definition at line 128 of file mag_control.cpp.
References _last_on_ground_posD, _terrain_vpos, and isTerrainEstimateValid().
Referenced by checkHaglYawResetReq().
|
overridevirtual |
Implements EstimatorInterface.
Definition at line 1317 of file ekf_helper.cpp.
References EstimatorInterface::_deadreckon_time_exceeded, EstimatorInterface::_NED_origin_initialised, and _using_synthetic_position.
Referenced by position_covariances(), Ekf2::print_status(), and Ekf2::Run().
|
private |
Definition at line 116 of file gps_checks.cpp.
References EstimatorInterface::_control_status, EstimatorInterface::_gps_alt_prev, _gps_check_fail_status, EstimatorInterface::_gps_drift_metrics, EstimatorInterface::_gps_drift_updated, _gps_drift_velD, _gps_error_norm, _gps_velD_diff_filt, _gps_velE_filt, _gps_velN_filt, _gpsDriftVelE, _gpsDriftVelN, _last_gps_fail_us, _last_gps_pass_us, _min_gps_health_time_us, EstimatorInterface::_params, _state, EstimatorInterface::_time_last_imu, EstimatorInterface::_vehicle_at_rest, estimator::gps_message::alt, math::constrain(), dt, estimator::gps_message::eph, estimator::gps_message::epv, f(), estimator::gps_check_fail_status_u::fix, estimator::gps_message::fix_type, estimator::gps_check_fail_status_u::flags, estimator::filter_control_status_u::flags, estimator::parameters::gps_check_mask, estimator::gps_check_fail_status_u::hacc, estimator::gps_check_fail_status_u::hdrift, estimator::gps_check_fail_status_u::hspeed, estimator::filter_control_status_u::in_air, estimator::gps_message::lat, estimator::gps_message::lon, map_projection_init_timestamped(), map_projection_project(), MASK_GPS_HACC, MASK_GPS_HDRIFT, MASK_GPS_HSPD, MASK_GPS_NSATS, MASK_GPS_PDOP, MASK_GPS_SACC, MASK_GPS_VACC, MASK_GPS_VDRIFT, MASK_GPS_VSPD, estimator::gps_message::nsats, estimator::gps_check_fail_status_u::nsats, estimator::gps_message::pdop, estimator::gps_check_fail_status_u::pdop, estimator::parameters::req_hacc, estimator::parameters::req_hdrift, estimator::parameters::req_nsats, estimator::parameters::req_pdop, estimator::parameters::req_sacc, estimator::parameters::req_vacc, estimator::parameters::req_vdrift, estimator::gps_message::sacc, estimator::gps_check_fail_status_u::sacc, estimator::gps_check_fail_status_u::vacc, estimator::gps_check_fail_status_u::vdrift, estimator::stateSample::vel, estimator::gps_message::vel_ned, and estimator::gps_check_fail_status_u::vspeed.
Referenced by collect_gps().
|
private |
Definition at line 1692 of file ekf_helper.cpp.
References _state, f(), P, estimator::stateSample::quat_nominal, SG, SQ, and sq().
Referenced by controlExternalVisionFusion(), initialiseFilter(), isRangeDataContinuous(), realignYawGPS(), resetGpsAntYaw(), and resetMagHeading().
|
overridevirtual |
Implements EstimatorInterface.
Definition at line 47 of file ekf.cpp.
References EstimatorInterface::initialise_interface(), and reset().
Referenced by EkfSamplingTestParametrized::SetUp(), EkfImuSamplingTestParametrized::SetUp(), and EkfInitializationTest::SetUp().
|
private |
Definition at line 46 of file terrain_estimator.cpp.
References EstimatorInterface::_control_status, _flow_for_terrain_data_ready, EstimatorInterface::_params, _R_rng_to_earth_2_2, EstimatorInterface::_range_buffer, _rng_hgt_valid, _state, _terrain_var, _terrain_vpos, _time_last_hagl_fuse, EstimatorInterface::_time_last_imu, f(), estimator::filter_control_status_u::flags, RingBuffer< data_type >::get_newest(), estimator::filter_control_status_u::in_air, estimator::stateSample::pos, estimator::parameters::range_cos_max_tilt, estimator::parameters::range_noise, estimator::rangeSample::rng, estimator::parameters::rng_gnd_clearance, sq(), and estimator::rangeSample::time_us.
Referenced by initialiseFilter(), and runTerrainEstimator().
|
private |
Definition at line 49 of file covariance.cpp.
References EstimatorInterface::_control_status, _delta_angle_bias_var_accum, _delta_vel_bias_var_accum, EstimatorInterface::_gps_sample_delayed, EstimatorInterface::_imu_sample_delayed, _k_num_states, _last_imu_bias_cov_reset_us, EstimatorInterface::_params, _prev_dvel_bias_var, estimator::parameters::baro_noise, math::constrain(), dt, f(), EstimatorInterface::FILTER_UPDATE_PERIOD_S, estimator::filter_control_status_u::flags, estimator::filter_control_status_u::gps_hgt, estimator::parameters::gps_pos_noise, estimator::parameters::gps_vel_noise, estimator::parameters::initial_tilt_err, estimator::parameters::initial_wind_uncertainty, initialiseQuatCovariances(), estimator::parameters::mag_noise, P, estimator::parameters::pos_noaid_noise, estimator::parameters::range_noise, estimator::filter_control_status_u::rng_hgt, saveMagCovData(), sq(), estimator::parameters::switch_on_accel_bias, estimator::parameters::switch_on_gyro_bias, estimator::imuSample::time_us, and estimator::gpsSample::vacc.
Referenced by fuseAirspeed(), fuseGpsAntYaw(), fuseHeading(), fuseOptFlow(), fuseSideslip(), initialiseFilter(), and resetStatesAndCovariances().
|
private |
Definition at line 152 of file ekf.cpp.
References EstimatorInterface::_baro_buffer, _baro_hgt_offset, EstimatorInterface::_baro_sample_delayed, EstimatorInterface::_control_status, _delVel_sum, _ev_counter, EstimatorInterface::_ev_sample_delayed, EstimatorInterface::_ext_vision_buffer, _gps_alt_ref, _gps_drift_velD, _hgt_counter, EstimatorInterface::_imu_buffer, EstimatorInterface::_imu_sample_delayed, EstimatorInterface::_mag_buffer, _mag_counter, _mag_lpf, EstimatorInterface::_mag_sample_delayed, EstimatorInterface::_obs_buffer_length, EstimatorInterface::_params, _primary_hgt_source, _R_rng_to_earth_2_2, _R_to_earth, _rng_filt_state, _state, _terrain_initialised, _time_last_delpos_fuse, _time_last_hagl_fuse, _time_last_hgt_fuse, EstimatorInterface::_time_last_imu, _time_last_of_fuse, _time_last_pos_fuse, _time_last_vel_fuse, estimator::stateSample::accel_bias, alignOutputFilter(), estimator::extVisionSample::angErr, estimator::filter_control_status_u::baro_hgt, estimator::imuSample::delta_vel, ECL_INFO_TIMESTAMPED, estimator::filter_control_status_u::ev_hgt, estimator::filter_control_status_u::ev_yaw, f(), estimator::filter_control_status_u::flags, RingBuffer< data_type >::get_newest(), AlphaFilter< T >::getState(), estimator::filter_control_status_u::gps_hgt, estimator::stateSample::gyro_bias, estimator::baroSample::hgt, increaseQuatYawErrVariance(), initHagl(), initialiseCovariance(), estimator::magSample::mag, estimator::stateSample::mag_B, MAG_FUSE_TYPE_3D, estimator::parameters::mag_fusion_type, estimator::parameters::mag_heading_noise, estimator::stateSample::mag_I, math::max(), RingBuffer< data_type >::pop_first_older_than(), estimator::stateSample::pos, estimator::stateSample::quat_nominal, AlphaFilter< T >::reset(), resetHeight(), resetMagHeading(), estimator::parameters::rng_gnd_clearance, estimator::filter_control_status_u::rng_hgt, setControlBaroHeight(), sq(), estimator::imuSample::time_us, estimator::magSample::time_us, estimator::baroSample::time_us, estimator::extVisionSample::time_us, AlphaFilter< T >::update(), VDIST_SENSOR_EV, estimator::parameters::vdist_sensor_type, estimator::stateSample::vel, estimator::stateSample::wind_vel, and estimator::filter_control_status_u::yaw_align.
Referenced by update().
|
private |
Definition at line 1433 of file ekf_helper.cpp.
References _state, f(), P, estimator::stateSample::quat_nominal, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t2, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t3, t30, t31, t32, t33, t34, t35, t36, t37, t38, t39, t4, t40, t41, t42, t43, t44, t5, t6, t7, t8, t9, zeroCols(), and zeroRows().
Referenced by initialiseCovariance(), and sq().
|
private |
Definition at line 232 of file mag_control.cpp.
References _mag_bias_observable.
Referenced by check3DMagFusionSuitability().
|
private |
Definition at line 308 of file mag_control.cpp.
References EstimatorInterface::_mag_sample_delayed, isMeasuredMatchingExpected(), and estimator::magSample::mag.
Referenced by checkMagFieldStrength().
|
staticprivate |
Definition at line 317 of file mag_control.cpp.
Referenced by isMeasuredMatchingAverageMagStrength(), and isMeasuredMatchingGpsMagStrength().
|
private |
Definition at line 302 of file mag_control.cpp.
References EstimatorInterface::_mag_sample_delayed, EstimatorInterface::_mag_strength_gps, isMeasuredMatchingExpected(), and estimator::magSample::mag.
Referenced by checkMagFieldStrength().
|
inlineprivate |
Definition at line 686 of file ekf.h.
References _is_range_aid_suitable, updateRangeDataStuck(), and updateRangeDataValidity().
Referenced by controlHeightFusion(), and controlOpticalFlowFusion().
|
inlineprivate |
Definition at line 749 of file ekf.h.
References _dt_last_range_update_filt_us, calculate_synthetic_mag_z_measurement(), clearMagCov(), increaseQuatYawErrVariance(), kahanSummation(), loadMagCovData(), saveMagCovData(), uncorrelateQuatStates(), and zeroMagCov().
Referenced by updateRangeDataValidity().
|
private |
Definition at line 297 of file mag_control.cpp.
References EstimatorInterface::_control_status, estimator::filter_control_status_u::flags, and estimator::filter_control_status_u::mag_field_disturbed.
Referenced by canResetMagHeading(), and shouldInhibitMag().
|
overridevirtual |
Implements EstimatorInterface.
Definition at line 287 of file terrain_estimator.cpp.
References _hagl_valid.
Referenced by checkRangeAidSuitability(), controlHeightFusion(), controlOpticalFlowFusion(), get_ekf_soln_status(), getTerrainVPos(), and position_covariances().
|
private |
Definition at line 227 of file mag_control.cpp.
References _yaw_angle_observable.
Referenced by check3DMagFusionSuitability().
|
private |
Definition at line 144 of file mag_control.cpp.
References _mag_use_inhibit.
Referenced by runInAirYawReset(), and runOnGroundYawReset().
|
private |
Definition at line 1762 of file ekf_helper.cpp.
Referenced by isRangeDataContinuous(), and predictCovariance().
|
private |
Definition at line 955 of file mag_fusion.cpp.
References EstimatorInterface::_mag_declination_gps, EstimatorInterface::_mag_inclination_gps, EstimatorInterface::_mag_strength_gps, EstimatorInterface::_NED_origin_initialised, EstimatorInterface::_params, _state, f(), getMagDeclination(), estimator::parameters::mag_declination_deg, estimator::parameters::mag_declination_source, estimator::stateSample::mag_I, MASK_USE_GEO_DECL, and math::radians().
Referenced by fuseDeclination(), and fuseMag().
|
private |
Definition at line 1748 of file ekf_helper.cpp.
References _saved_mag_bf_variance, _saved_mag_ef_covmat, and P.
Referenced by isRangeDataContinuous(), and startMag3DFusion().
|
private |
Definition at line 773 of file ekf_helper.cpp.
Referenced by fixCovarianceErrors().
|
inline |
Definition at line 135 of file ekf.h.
References covariances().
|
inline |
Definition at line 141 of file ekf.h.
References collect_gps(), collect_imu(), covariances(), get_ekf_ctrl_limits(), get_ekf_gpos_accuracy(), get_ekf_lpos_accuracy(), get_ekf_origin(), get_ekf_vel_accuracy(), get_gps_drift_metrics(), get_imu_vibe_metrics(), get_output_tracking_error(), get_pos_var(), get_vel_var(), getTerrainVertPos(), global_position_is_valid(), gps, isTerrainEstimateValid(), reset_imu_bias(), update_deadreckoning_status(), and updateTerrainValidity().
|
private |
Definition at line 135 of file covariance.cpp.
References _accel_bias_inhibit, _accel_mag_filt, _accel_vec_filt, _ang_rate_mag_filt, _bad_vert_accel_detected, EstimatorInterface::_control_status, _delta_angle_bias_var_accum, _delta_vel_bias_var_accum, _height_rate_lpf, EstimatorInterface::_imu_sample_delayed, _k_num_states, EstimatorInterface::_params, _prev_dvel_bias_var, _state, estimator::parameters::acc_bias_learn_acc_lim, estimator::parameters::acc_bias_learn_gyr_lim, estimator::parameters::acc_bias_learn_tc, estimator::stateSample::accel_bias, estimator::parameters::accel_bias_p_noise, estimator::parameters::accel_noise, BADACC_BIAS_PNOISE, math::constrain(), estimator::imuSample::delta_ang, estimator::imuSample::delta_ang_dt, estimator::imuSample::delta_vel, dt, EstimatorInterface::FILTER_UPDATE_PERIOD_S, fixCovarianceErrors(), estimator::filter_control_status_u::flags, estimator::parameters::fusion_mode, estimator::stateSample::gyro_bias, estimator::parameters::gyro_bias_p_noise, estimator::parameters::gyro_noise, estimator::parameters::initial_wind_uncertainty, kahanSummation(), estimator::filter_control_status_u::mag_3D, estimator::parameters::magb_p_noise, estimator::parameters::mage_p_noise, MASK_INHIBIT_ACC_BIAS, P, estimator::stateSample::quat_nominal, SG, SQ, sq(), estimator::stateSample::vel, estimator::filter_control_status_u::wind, estimator::parameters::wind_vel_p_noise, estimator::parameters::wind_vel_p_noise_scaler, zeroCols(), and zeroRows().
Referenced by update().
|
private |
Definition at line 318 of file ekf.cpp.
References _accel_lpf_NE, _dt_ekf_avg, _earth_rate_initialised, _earth_rate_NED, EstimatorInterface::_imu_sample_delayed, EstimatorInterface::_NED_origin_initialised, _R_to_earth, _state, estimator::stateSample::accel_bias, calcEarthRateNED(), CONSTANTS_ONE_G, math::constrain(), constrainStates(), estimator::imuSample::delta_ang, estimator::imuSample::delta_ang_dt, estimator::imuSample::delta_vel, estimator::imuSample::delta_vel_dt, f(), EstimatorInterface::FILTER_UPDATE_PERIOD_S, estimator::stateSample::gyro_bias, estimator::stateSample::pos, estimator::stateSample::quat_nominal, and estimator::stateSample::vel.
Referenced by update().
|
private |
Definition at line 405 of file ekf_helper.cpp.
References EstimatorInterface::_control_status, _flt_mag_align_start_time, EstimatorInterface::_gps_sample_delayed, EstimatorInterface::_imu_sample_delayed, _mag_lpf, EstimatorInterface::_mag_sample_delayed, _num_bad_flight_yaw_events, EstimatorInterface::_output_buffer, EstimatorInterface::_output_new, EstimatorInterface::_params, _R_to_earth, _state, _state_reset_status, EstimatorInterface::_vel_pos_test_ratio, _velpos_reset_request, clearMagCov(), math::constrain(), ECL_WARN_TIMESTAMPED, f(), estimator::filter_control_status_u::flags, RingBuffer< data_type >::get_length(), AlphaFilter< T >::getState(), estimator::filter_control_status_u::gps, increaseQuatYawErrVariance(), estimator::magSample::mag, estimator::filter_control_status_u::mag_3D, estimator::filter_control_status_u::mag_aligned_in_flight, estimator::stateSample::mag_B, estimator::filter_control_status_u::mag_fault, estimator::stateSample::mag_I, estimator::parameters::mag_noise, P, estimator::outputSample::quat_nominal, estimator::stateSample::quat_nominal, resetMagHeading(), estimator::gpsSample::sacc, saveMagCovData(), sq(), estimator::imuSample::time_us, uncorrelateQuatStates(), estimator::gpsSample::vel, estimator::stateSample::vel, estimator::filter_control_status_u::wind, estimator::stateSample::wind_vel, and estimator::filter_control_status_u::yaw_align.
Referenced by controlGpsFusion(), and runInAirYawReset().
|
overridevirtual |
Implements EstimatorInterface.
Definition at line 55 of file ekf.cpp.
References _accel_mag_filt, _ang_rate_mag_filt, EstimatorInterface::_control_status, EstimatorInterface::_control_status_prev, _cos_tilt_rng, _delta_angle_corr, _dt_ekf_avg, EstimatorInterface::_fault_status, _filter_initialised, EstimatorInterface::_gps_speed_valid, _imu_down_sampled, EstimatorInterface::_imu_updated, EstimatorInterface::_innov_check_fail_status, EstimatorInterface::_NED_origin_initialised, EstimatorInterface::_params, _prev_dvel_bias_var, _q_down_sampled, _sin_tilt_rng, _terrain_initialised, estimator::imuSample::delta_ang, estimator::imuSample::delta_ang_dt, estimator::imuSample::delta_vel, estimator::imuSample::delta_vel_dt, EstimatorInterface::FILTER_UPDATE_PERIOD_S, resetStatesAndCovariances(), estimator::parameters::rng_sens_pitch, estimator::imuSample::time_us, estimator::fault_status_u::value, estimator::innovation_fault_status_u::value, and estimator::filter_control_status_u::value.
Referenced by init().
|
overridevirtual |
Implements EstimatorInterface.
Definition at line 1122 of file ekf_helper.cpp.
References EstimatorInterface::_imu_sample_delayed, _last_imu_bias_cov_reset_us, EstimatorInterface::_params, _prev_dvel_bias_var, _state, estimator::stateSample::accel_bias, dt, EstimatorInterface::FILTER_UPDATE_PERIOD_S, estimator::stateSample::gyro_bias, P, sq(), estimator::parameters::switch_on_accel_bias, estimator::parameters::switch_on_gyro_bias, estimator::imuSample::time_us, zeroCols(), and zeroRows().
Referenced by position_covariances(), and Ekf2::Run().
|
private |
Definition at line 1657 of file ekf_helper.cpp.
References _ev_rot_mat, _ev_rot_vec_filt, EstimatorInterface::_ev_sample_delayed, _state, f(), estimator::extVisionSample::quat, and estimator::stateSample::quat_nominal.
Referenced by controlExternalVisionFusion(), resetGpsAntYaw(), and resetMagHeading().
|
private |
Definition at line 293 of file gps_yaw_fusion.cpp.
References EstimatorInterface::_control_status, EstimatorInterface::_gps_sample_delayed, EstimatorInterface::_gps_yaw_offset, EstimatorInterface::_output_buffer, EstimatorInterface::_output_new, EstimatorInterface::_params, _R_to_earth, _state, _state_reset_status, f(), estimator::filter_control_status_u::flags, estimator::parameters::fusion_mode, RingBuffer< data_type >::get_length(), increaseQuatYawErrVariance(), ISFINITE, estimator::parameters::mag_heading_noise, MASK_ROTATE_EV, MASK_USE_EVPOS, estimator::outputSample::quat_nominal, estimator::stateSample::quat_nominal, math::radians(), resetExtVisRotMat(), sq(), uncorrelateQuatStates(), matrix::wrap_pi(), estimator::gpsSample::yaw, and estimator::filter_control_status_u::yaw_align.
Referenced by controlGpsFusion().
|
private |
Definition at line 214 of file ekf_helper.cpp.
References EstimatorInterface::_baro_buffer, _baro_hgt_offset, EstimatorInterface::_control_status, EstimatorInterface::_ev_sample_delayed, EstimatorInterface::_ext_vision_buffer, _gps_alt_ref, EstimatorInterface::_gps_buffer, _hgt_sensor_offset, EstimatorInterface::_imu_sample_delayed, EstimatorInterface::_output_buffer, EstimatorInterface::_output_new, EstimatorInterface::_output_vert_buffer, EstimatorInterface::_output_vert_delayed, EstimatorInterface::_output_vert_new, EstimatorInterface::_params, _R_rng_to_earth_2_2, EstimatorInterface::_range_sample_delayed, _state, _state_reset_status, EstimatorInterface::_time_last_imu, matrix::abs(), estimator::filter_control_status_u::baro_hgt, BARO_MAX_INTERVAL, estimator::parameters::baro_noise, estimator::filter_control_status_u::ev_hgt, f(), estimator::filter_control_status_u::flags, RingBuffer< data_type >::get_length(), RingBuffer< data_type >::get_newest(), estimator::filter_control_status_u::gps, estimator::filter_control_status_u::gps_hgt, GPS_MAX_INTERVAL, estimator::gpsSample::hacc, estimator::gpsSample::hgt, estimator::baroSample::hgt, P, estimator::outputSample::pos, estimator::extVisionSample::pos, estimator::stateSample::pos, estimator::parameters::range_noise, estimator::rangeSample::rng, estimator::filter_control_status_u::rng_hgt, estimator::gpsSample::sacc, sq(), estimator::imuSample::time_us, estimator::gpsSample::time_us, estimator::baroSample::time_us, estimator::extVisionSample::time_us, estimator::outputSample::vel, estimator::gpsSample::vel, estimator::stateSample::vel, estimator::outputVert::vel_d, estimator::outputVert::vel_d_integ, zeroCols(), and zeroRows().
Referenced by controlExternalVisionFusion(), controlHeightSensorTimeouts(), and initialiseFilter().
|
private |
Definition at line 554 of file ekf_helper.cpp.
References EstimatorInterface::_control_status, EstimatorInterface::_ev_sample_delayed, _flt_mag_align_start_time, EstimatorInterface::_imu_sample_delayed, _mag_use_inhibit, EstimatorInterface::_output_buffer, EstimatorInterface::_output_new, EstimatorInterface::_params, _R_to_earth, _state, _state_reset_status, estimator::extVisionSample::angErr, clearMagCov(), estimator::filter_control_status_u::ev_yaw, f(), estimator::filter_control_status_u::flags, estimator::parameters::fusion_mode, RingBuffer< data_type >::get_length(), getMagDeclination(), increaseQuatYawErrVariance(), estimator::filter_control_status_u::mag_3D, MAG_FUSE_TYPE_3D, MAG_FUSE_TYPE_INDOOR, MAG_FUSE_TYPE_NONE, estimator::parameters::mag_fusion_type, estimator::parameters::mag_heading_noise, estimator::stateSample::mag_I, estimator::parameters::mag_noise, MASK_ROTATE_EV, P, estimator::extVisionSample::quat, estimator::outputSample::quat_nominal, estimator::stateSample::quat_nominal, resetExtVisRotMat(), saveMagCovData(), sq(), stopMagFusion(), estimator::imuSample::time_us, and uncorrelateQuatStates().
Referenced by controlFusionModes(), controlGpsFusion(), controlOpticalFlowFusion(), initialiseFilter(), realignYawGPS(), runInAirYawReset(), and runOnGroundYawReset().
|
private |
Definition at line 899 of file covariance.cpp.
References EstimatorInterface::_params, clearMagCov(), estimator::parameters::mag_noise, P, saveMagCovData(), sq(), zeroCols(), and zeroRows().
Referenced by fuseMag(), and sq().
|
private |
Definition at line 139 of file ekf_helper.cpp.
References EstimatorInterface::_control_status, _ev_rot_mat, EstimatorInterface::_ev_sample_delayed, EstimatorInterface::_gps_sample_delayed, _hpos_prev_available, _last_known_posNE, EstimatorInterface::_output_buffer, EstimatorInterface::_output_new, EstimatorInterface::_params, _state, _state_reset_status, estimator::filter_control_status_u::ev_pos, estimator::filter_control_status_u::flags, estimator::parameters::fusion_mode, RingBuffer< data_type >::get_length(), estimator::filter_control_status_u::gps, estimator::gpsSample::hacc, estimator::filter_control_status_u::in_air, MASK_ROTATE_EV, estimator::filter_control_status_u::opt_flow, P, estimator::outputSample::pos, estimator::gpsSample::pos, estimator::extVisionSample::pos, estimator::stateSample::pos, estimator::parameters::pos_noaid_noise, estimator::extVisionSample::posErr, posNE_change, setDiag(), sq(), zeroCols(), and zeroRows().
Referenced by controlExternalVisionFusion(), controlGpsFusion(), controlOpticalFlowFusion(), controlVelPosFusion(), and runVelPosReset().
|
overridevirtual |
Implements EstimatorInterface.
Definition at line 99 of file ekf.cpp.
References EstimatorInterface::_output_new, _state, estimator::stateSample::accel_bias, estimator::stateSample::gyro_bias, estimator::stateSample::mag_B, estimator::stateSample::mag_I, estimator::outputSample::pos, estimator::stateSample::pos, estimator::outputSample::quat_nominal, estimator::stateSample::quat_nominal, estimator::outputSample::vel, estimator::stateSample::vel, and estimator::stateSample::wind_vel.
Referenced by resetStatesAndCovariances().
|
overridevirtual |
Implements EstimatorInterface.
Definition at line 93 of file ekf.cpp.
References initialiseCovariance(), and resetStates().
Referenced by reset().
|
private |
Definition at line 50 of file ekf_helper.cpp.
References EstimatorInterface::_control_status, _ev_rot_mat, EstimatorInterface::_ev_sample_delayed, EstimatorInterface::_flow_sample_delayed, _flowRadXYcomp, _gps_check_fail_status, EstimatorInterface::_gps_sample_delayed, EstimatorInterface::_output_buffer, EstimatorInterface::_output_new, EstimatorInterface::_params, _R_rng_to_earth_2_2, _R_to_earth, _state, _state_reset_status, _terrain_vpos, calcOptFlowMeasVar(), estimator::flowSample::dt, estimator::filter_control_status_u::ev_pos, estimator::filter_control_status_u::ev_vel, f(), estimator::filter_control_status_u::flags, estimator::parameters::fusion_mode, RingBuffer< data_type >::get_length(), estimator::filter_control_status_u::gps, MASK_ROTATE_EV, estimator::filter_control_status_u::opt_flow, P, estimator::stateSample::pos, estimator::parameters::rng_gnd_clearance, estimator::gpsSample::sacc, setDiag(), sq(), estimator::gps_check_fail_status_u::value, estimator::outputSample::vel, estimator::gpsSample::vel, estimator::extVisionSample::vel, estimator::stateSample::vel, estimator::extVisionSample::velErr, zeroCols(), zeroOffDiag(), and zeroRows().
Referenced by controlExternalVisionFusion(), controlGpsFusion(), controlOpticalFlowFusion(), controlVelPosFusion(), and runVelPosReset().
|
private |
Definition at line 929 of file covariance.cpp.
References EstimatorInterface::_airspeed_sample_delayed, EstimatorInterface::_imu_sample_delayed, EstimatorInterface::_params, _state, _tas_data_ready, math::constrain(), estimator::airspeedSample::eas2tas, estimator::parameters::eas_noise, f(), P, math::radians(), sq(), estimator::imuSample::time_us, estimator::airspeedSample::time_us, estimator::stateSample::wind_vel, zeroCols(), and zeroRows().
Referenced by controlAirDataFusion(), controlBetaFusion(), controlDragFusion(), fuseAirspeed(), fuseSideslip(), and sq().
|
private |
Definition at line 260 of file airspeed_fusion.cpp.
References EstimatorInterface::_airspeed_sample_delayed, EstimatorInterface::_imu_sample_delayed, _state, _tas_data_ready, estimator::stateSample::quat_nominal, estimator::imuSample::time_us, estimator::airspeedSample::time_us, estimator::airspeedSample::true_airspeed, estimator::stateSample::vel, and estimator::stateSample::wind_vel.
Referenced by controlAirDataFusion(), controlBetaFusion(), controlDragFusion(), fuseAirspeed(), fuseSideslip(), and sq().
|
private |
Definition at line 333 of file mag_control.cpp.
References EstimatorInterface::_control_status, _mag_decl_cov_reset, f(), estimator::filter_control_status_u::flags, fuseDeclination(), fuseMag(), and estimator::filter_control_status_u::mag_dec.
Referenced by runMagAndMagDeclFusions().
|
private |
Definition at line 154 of file mag_control.cpp.
References EstimatorInterface::_control_status, _mag_lpf, _mag_yaw_reset_req, canRealignYawUsingGps(), canResetMagHeading(), estimator::filter_control_status_u::flags, AlphaFilter< T >::getState(), isYawResetAuthorized(), estimator::filter_control_status_u::mag_aligned_in_flight, realignYawGPS(), and resetMagHeading().
Referenced by controlMagFusion().
|
private |
Definition at line 323 of file mag_control.cpp.
References EstimatorInterface::_control_status, estimator::filter_control_status_u::flags, fuseHeading(), estimator::filter_control_status_u::mag_3D, estimator::filter_control_status_u::mag_hdg, and run3DMagAndDeclFusions().
Referenced by controlMagFusion().
|
private |
Definition at line 133 of file mag_control.cpp.
References _mag_lpf, _mag_yaw_reset_req, canResetMagHeading(), AlphaFilter< T >::getState(), isYawResetAuthorized(), and resetMagHeading().
Referenced by controlMagFusion().
|
private |
Definition at line 88 of file terrain_estimator.cpp.
References EstimatorInterface::_control_status, _cos_tilt_rng, _flow_for_terrain_data_ready, EstimatorInterface::_imu_sample_delayed, EstimatorInterface::_params, _range_data_ready, _rng_hgt_valid, _sin_tilt_rng, _state, _terrain_initialised, _terrain_var, _terrain_vpos, math::constrain(), estimator::imuSample::delta_vel_dt, f(), estimator::filter_control_status_u::flags, fuseFlowForTerrain(), fuseHagl(), estimator::filter_control_status_u::in_air, initHagl(), estimator::stateSample::pos, estimator::parameters::rng_gnd_clearance, estimator::parameters::rng_sens_pitch, sq(), estimator::parameters::terrain_gradient, estimator::parameters::terrain_p_noise, updateTerrainValidity(), and estimator::stateSample::vel.
Referenced by update().
|
private |
Definition at line 172 of file mag_control.cpp.
References _velpos_reset_request, resetPosition(), and resetVelocity().
Referenced by controlMagFusion().
|
private |
Definition at line 1733 of file ekf_helper.cpp.
References _saved_mag_bf_variance, _saved_mag_ef_covmat, and P.
Referenced by initialiseCovariance(), isRangeDataContinuous(), realignYawGPS(), resetMagHeading(), resetMagRelatedCovariances(), and stopMag3DFusion().
|
private |
Definition at line 181 of file mag_control.cpp.
References canUse3DMagFusion(), check3DMagFusionSuitability(), startMag3DFusion(), and startMagHdgFusion().
Referenced by controlMagFusion().
|
inline |
Definition at line 266 of file ekf.h.
References _min_gps_health_time_us.
Referenced by Ekf2::Ekf2().
|
private |
Definition at line 1545 of file ekf_helper.cpp.
References EstimatorInterface::_control_status, estimator::filter_control_status_u::baro_hgt, estimator::filter_control_status_u::ev_hgt, estimator::filter_control_status_u::flags, estimator::filter_control_status_u::gps_hgt, and estimator::filter_control_status_u::rng_hgt.
Referenced by controlHeightFusion(), controlHeightSensorTimeouts(), initialiseFilter(), and sq().
|
private |
Definition at line 1572 of file ekf_helper.cpp.
References EstimatorInterface::_control_status, estimator::filter_control_status_u::baro_hgt, estimator::filter_control_status_u::ev_hgt, estimator::filter_control_status_u::flags, estimator::filter_control_status_u::gps_hgt, and estimator::filter_control_status_u::rng_hgt.
Referenced by controlExternalVisionFusion(), controlHeightSensorTimeouts(), and sq().
|
private |
Definition at line 1563 of file ekf_helper.cpp.
References EstimatorInterface::_control_status, estimator::filter_control_status_u::baro_hgt, estimator::filter_control_status_u::ev_hgt, estimator::filter_control_status_u::flags, estimator::filter_control_status_u::gps_hgt, and estimator::filter_control_status_u::rng_hgt.
Referenced by controlHeightFusion(), controlHeightSensorTimeouts(), and sq().
|
private |
Definition at line 1554 of file ekf_helper.cpp.
References EstimatorInterface::_control_status, estimator::filter_control_status_u::baro_hgt, estimator::filter_control_status_u::ev_hgt, estimator::filter_control_status_u::flags, estimator::filter_control_status_u::gps_hgt, and estimator::filter_control_status_u::rng_hgt.
Referenced by controlHeightFusion(), controlHeightSensorTimeouts(), and sq().
|
private |
Definition at line 1302 of file ekf_helper.cpp.
References zeroCols(), and zeroRows().
Referenced by controlGpsFusion(), resetPosition(), resetVelocity(), and sq().
|
private |
Definition at line 269 of file mag_control.cpp.
References EstimatorInterface::_control_status, EstimatorInterface::_params, estimator::filter_control_status_u::ev_pos, estimator::filter_control_status_u::ev_vel, estimator::filter_control_status_u::flags, estimator::filter_control_status_u::gps, isStrongMagneticDisturbance(), MAG_FUSE_TYPE_INDOOR, and estimator::parameters::mag_fusion_type.
Referenced by checkMagInhibition().
|
inlinestaticprivate |
Definition at line 695 of file ekf.h.
References calcOptFlowMeasVar(), calcRotVecVariances(), initialiseQuatCovariances(), resetMagRelatedCovariances(), resetWindCovariance(), resetWindStates(), setControlBaroHeight(), setControlEVHeight(), setControlGPSHeight(), setControlRangeHeight(), setDiag(), startMag3DFusion(), startMagHdgFusion(), stopMag3DFusion(), stopMagFusion(), stopMagHdgFusion(), updateRangeDataContinuity(), zeroCols(), zeroOffDiag(), and zeroRows().
Referenced by calcOptFlowMeasVar(), calculate_synthetic_mag_z_measurement(), calculateOutputStates(), checkRangeAidSuitability(), controlExternalVisionFusion(), controlFusionModes(), controlGpsFusion(), controlHeightSensorTimeouts(), fixCovarianceErrors(), fuseAirspeed(), fuseDeclination(), fuseDrag(), fuseFlowForTerrain(), fuseGpsAntYaw(), fuseHagl(), fuseHeading(), fuseMag(), fuseOptFlow(), fuseSideslip(), fuseVelPosHeight(), get_ekf_gpos_accuracy(), get_ekf_lpos_accuracy(), get_ekf_vel_accuracy(), get_true_airspeed(), increaseQuatYawErrVariance(), initHagl(), initialiseCovariance(), initialiseFilter(), predictCovariance(), realignYawGPS(), reset_imu_bias(), resetGpsAntYaw(), resetHeight(), resetMagHeading(), resetMagRelatedCovariances(), resetPosition(), resetVelocity(), resetWindCovariance(), and runTerrainEstimator().
|
private |
Definition at line 1608 of file ekf_helper.cpp.
References EstimatorInterface::_control_status, estimator::filter_control_status_u::flags, loadMagCovData(), estimator::filter_control_status_u::mag_3D, stopMagHdgFusion(), and zeroMagCov().
Referenced by controlMagFusion(), selectMagAuto(), and sq().
|
private |
Definition at line 1602 of file ekf_helper.cpp.
References EstimatorInterface::_control_status, estimator::filter_control_status_u::flags, estimator::filter_control_status_u::mag_hdg, and stopMag3DFusion().
Referenced by controlMagFusion(), selectMagAuto(), and sq().
|
private |
Definition at line 1588 of file ekf_helper.cpp.
References EstimatorInterface::_control_status, estimator::filter_control_status_u::flags, estimator::filter_control_status_u::mag_3D, and saveMagCovData().
Referenced by controlExternalVisionFusion(), controlGpsFusion(), sq(), startMagHdgFusion(), and stopMagFusion().
|
private |
Definition at line 1581 of file ekf_helper.cpp.
References clearMagCov(), stopMag3DFusion(), and stopMagHdgFusion().
Referenced by controlMagFusion(), resetMagHeading(), and sq().
|
private |
Definition at line 1597 of file ekf_helper.cpp.
References EstimatorInterface::_control_status, estimator::filter_control_status_u::flags, and estimator::filter_control_status_u::mag_hdg.
Referenced by controlExternalVisionFusion(), controlGpsFusion(), sq(), startMag3DFusion(), and stopMagFusion().
|
private |
Definition at line 1278 of file ekf_helper.cpp.
References P, zeroCols(), and zeroRows().
Referenced by controlExternalVisionFusion(), isRangeDataContinuous(), realignYawGPS(), resetGpsAntYaw(), and resetMagHeading().
|
overridevirtual |
Implements EstimatorInterface.
Definition at line 117 of file ekf.cpp.
References _filter_initialised, EstimatorInterface::_imu_updated, calculateOutputStates(), controlFusionModes(), initialiseFilter(), predictCovariance(), predictState(), and runTerrainEstimator().
Referenced by Ekf2::Run(), and EkfInitializationTest::update_with_const_sensors().
void Ekf::update_deadreckoning_status | ( | ) |
Definition at line 1325 of file ekf_helper.cpp.
References EstimatorInterface::_control_status, EstimatorInterface::_deadreckon_time_exceeded, EstimatorInterface::_is_dead_reckoning, EstimatorInterface::_is_wind_dead_reckoning, EstimatorInterface::_params, _time_ins_deadreckon_start, _time_last_arsp_fuse, _time_last_beta_fuse, _time_last_delpos_fuse, EstimatorInterface::_time_last_imu, _time_last_of_fuse, _time_last_pos_fuse, _time_last_vel_fuse, estimator::filter_control_status_u::ev_pos, estimator::filter_control_status_u::ev_vel, estimator::filter_control_status_u::flags, estimator::filter_control_status_u::gps, estimator::parameters::no_aid_timeout_max, estimator::filter_control_status_u::opt_flow, estimator::parameters::valid_timeout_max, and estimator::filter_control_status_u::wind.
Referenced by controlFusionModes(), and position_covariances().
|
private |
Definition at line 101 of file mag_control.cpp.
References _mag_data_ready, _mag_lpf, EstimatorInterface::_mag_sample_delayed, estimator::magSample::mag, and AlphaFilter< T >::update().
Referenced by controlMagFusion().
|
private |
Definition at line 44 of file range_finder_checks.cpp.
References _dt_last_range_update_filt_us, _dt_update, EstimatorInterface::_imu_sample_delayed, EstimatorInterface::_range_sample_delayed, estimator::imuSample::time_us, and estimator::rangeSample::time_us.
Referenced by sq(), and updateRangeDataValidity().
|
private |
Definition at line 110 of file range_finder_checks.cpp.
References EstimatorInterface::_control_status, EstimatorInterface::_params, EstimatorInterface::_range_sample_delayed, _rng_stuck_max_val, _rng_stuck_min_val, _time_last_rng_ready, f(), estimator::filter_control_status_u::flags, estimator::filter_control_status_u::in_air, estimator::parameters::range_stuck_threshold, estimator::rangeSample::rng, estimator::filter_control_status_u::rng_stuck, and estimator::rangeSample::time_us.
Referenced by isRangeAidSuitable(), and updateRangeDataValidity().
|
private |
Definition at line 57 of file range_finder_checks.cpp.
References EstimatorInterface::_control_status, EstimatorInterface::_imu_sample_delayed, EstimatorInterface::_params, _R_rng_to_earth_2_2, _range_data_ready, EstimatorInterface::_range_sample_delayed, _rng_hgt_valid, EstimatorInterface::_rng_valid_max_val, EstimatorInterface::_rng_valid_min_val, _time_bad_rng_signal_quality, estimator::filter_control_status_u::flags, estimator::filter_control_status_u::in_air, isRangeDataContinuous(), estimator::rangeSample::quality, estimator::parameters::range_cos_max_tilt, estimator::parameters::range_signal_hysteresis_ms, estimator::rangeSample::rng, estimator::parameters::rng_gnd_clearance, RNG_MAX_INTERVAL, estimator::filter_control_status_u::rng_stuck, estimator::imuSample::time_us, estimator::rangeSample::time_us, updateRangeDataContinuity(), and updateRangeDataStuck().
Referenced by controlFusionModes(), and isRangeAidSuitable().
void Ekf::updateTerrainValidity | ( | ) |
Definition at line 292 of file terrain_estimator.cpp.
References EstimatorInterface::_control_status, _hagl_valid, _terrain_initialised, _time_last_hagl_fuse, EstimatorInterface::_time_last_imu, _time_last_of_fuse, estimator::filter_control_status_u::flags, and estimator::filter_control_status_u::opt_flow.
Referenced by position_covariances(), and runTerrainEstimator().
|
inline |
Definition at line 138 of file ekf.h.
References covariances().
|
private |
Definition at line 1249 of file ekf_helper.cpp.
Referenced by fixCovarianceErrors(), fuseAirspeed(), fuseDeclination(), fuseDrag(), fuseGpsAntYaw(), fuseHeading(), fuseMag(), fuseOptFlow(), fuseSideslip(), fuseVelPosHeight(), initialiseQuatCovariances(), predictCovariance(), reset_imu_bias(), resetHeight(), resetMagRelatedCovariances(), resetPosition(), resetVelocity(), resetWindCovariance(), setDiag(), sq(), uncorrelateQuatStates(), zeroMagCov(), and zeroOffDiag().
|
private |
Definition at line 923 of file covariance.cpp.
References P, zeroCols(), and zeroRows().
Referenced by clearMagCov(), isRangeDataContinuous(), and startMag3DFusion().
|
private |
Definition at line 1258 of file ekf_helper.cpp.
References _k_num_states, zeroCols(), and zeroRows().
Referenced by resetVelocity(), and sq().
|
private |
Definition at line 1239 of file ekf_helper.cpp.
Referenced by fixCovarianceErrors(), fuseAirspeed(), fuseDeclination(), fuseDrag(), fuseGpsAntYaw(), fuseHeading(), fuseMag(), fuseOptFlow(), fuseSideslip(), fuseVelPosHeight(), initialiseQuatCovariances(), predictCovariance(), reset_imu_bias(), resetHeight(), resetMagRelatedCovariances(), resetPosition(), resetVelocity(), resetWindCovariance(), setDiag(), sq(), uncorrelateQuatStates(), zeroMagCov(), and zeroOffDiag().
|
private |
true when the accel bias learning is being inhibited
Definition at line 450 of file ekf.h.
Referenced by fixCovarianceErrors(), and predictCovariance().
|
private |
Low pass filtered horizontal earth frame acceleration (m/sec**2)
Definition at line 351 of file ekf.h.
Referenced by checkYawAngleObservability(), and predictState().
|
private |
acceleration magnitude after application of a decaying envelope filter (rad/sec)
Definition at line 452 of file ekf.h.
Referenced by predictCovariance(), and reset().
|
private |
acceleration vector after application of a low pass filter (m/sec**2)
Definition at line 451 of file ekf.h.
Referenced by controlOpticalFlowFusion(), and predictCovariance().
|
private |
airspeed measurement innovation (m/sec)
Definition at line 379 of file ekf.h.
Referenced by fuseAirspeed(), and get_airspeed_innov().
|
private |
airspeed measurement innovation variance ((m/sec)**2)
Definition at line 380 of file ekf.h.
Referenced by fuseAirspeed(), and get_airspeed_innov_var().
|
private |
angular rate magnitude after application of a decaying envelope filter (rad/sec)
Definition at line 453 of file ekf.h.
Referenced by controlOpticalFlowFusion(), predictCovariance(), and reset().
|
private |
NE auxiliary velocity innovations: (m/sec)
Definition at line 374 of file ekf.h.
Referenced by controlAuxVelFusion(), fuseVelPosHeight(), and get_aux_vel_innov().
|
private |
true when bad vertical accelerometer data has been detected
Definition at line 479 of file ekf.h.
Referenced by controlHeightSensorTimeouts(), get_ekf_soln_status(), and predictCovariance().
|
private |
true when new baro height data has fallen behind the fusion time horizon and is available to be fused
Definition at line 319 of file ekf.h.
Referenced by controlFusionModes(), and controlHeightFusion().
|
private |
true if valid baro data is unavailable for use
Definition at line 470 of file ekf.h.
Referenced by controlFusionModes(), controlHeightFusion(), and controlHeightSensorTimeouts().
|
private |
baro height reading at the local NED origin (m)
Definition at line 436 of file ekf.h.
Referenced by controlHeightFusion(), controlHeightSensorTimeouts(), fuseVelPosHeight(), initialiseFilter(), and resetHeight().
|
private |
synthetic sideslip measurement innovation (rad)
Definition at line 382 of file ekf.h.
Referenced by fuseSideslip(), and get_beta_innov().
|
private |
synthetic sideslip measurement innovation variance (rad**2)
Definition at line 383 of file ekf.h.
Referenced by fuseSideslip(), and get_beta_innov_var().
|
private |
cosine of the range finder tilt rotation about the Y body axis
Definition at line 464 of file ekf.h.
Referenced by controlFusionModes(), reset(), and runTerrainEstimator().
|
private |
kahan summation algorithm accumulator for delta angle bias variance
Definition at line 370 of file ekf.h.
Referenced by initialiseCovariance(), and predictCovariance().
|
private |
delta angle correction vector (rad)
Definition at line 403 of file ekf.h.
Referenced by calculate_quaternion(), calculateOutputStates(), and reset().
|
private |
delta time between two consecutive delayed baro samples from the buffer (uSec)
Definition at line 342 of file ekf.h.
Referenced by controlFusionModes(), and controlHeightFusion().
|
private |
time in sec that _imu_del_ang_of was accumulated over (sec)
Definition at line 396 of file ekf.h.
Referenced by calcOptFlowBodyRateComp(), and controlOpticalFlowFusion().
|
private |
kahan summation algorithm accumulator for delta velocity bias variance
Definition at line 369 of file ekf.h.
Referenced by initialiseCovariance(), and predictCovariance().
|
private |
summed delta velocity (m/sec)
Definition at line 434 of file ekf.h.
Referenced by initialiseFilter().
|
private |
multirotor drag measurement innovation (m/sec**2)
Definition at line 385 of file ekf.h.
Referenced by fuseDrag(), and get_drag_innov().
|
private |
multirotor drag measurement innovation variance ((m/sec**2)**2)
Definition at line 386 of file ekf.h.
Referenced by fuseDrag(), and get_drag_innov_var().
|
private |
average update rate of the ekf
Definition at line 285 of file ekf.h.
Referenced by calculate_quaternion(), calculateOutputStates(), constrainStates(), fixCovarianceErrors(), fuseDrag(), get_accel_bias(), get_gyro_bias(), predictState(), and reset().
|
private |
filtered value of the delta time elapsed since the last range measurement came into the filter (uSec)
Definition at line 466 of file ekf.h.
Referenced by isRangeDataContinuous(), and updateRangeDataContinuity().
|
private |
delta time since last ekf update. This time can be used for filters which run at the same rate as the Ekf::update() function. (sec)
Definition at line 286 of file ekf.h.
Referenced by updateRangeDataContinuity().
|
private |
true when we know the earth rotatin rate (requires GPS)
Definition at line 291 of file ekf.h.
Referenced by predictState().
|
private |
earth rotation vector (NED) in rad/s
Definition at line 346 of file ekf.h.
Referenced by predictState().
|
private |
number of external vision samples read during initialisation
Definition at line 431 of file ekf.h.
Referenced by initialiseFilter().
|
private |
true when new external vision system data has fallen behind the fusion time horizon and is available to be fused
Definition at line 322 of file ekf.h.
Referenced by controlExternalVisionFusion(), and controlFusionModes().
|
private |
previous time that the calculation of the EV to EKF rotation matrix was updated (uSec)
Definition at line 313 of file ekf.h.
Referenced by calcExtVisRotMat().
|
private |
transformation matrix that rotates observations from the EV to the EKF navigation frame, initialized with Identity
Definition at line 312 of file ekf.h.
Referenced by calcExtVisRotMat(), controlExternalVisionFusion(), resetExtVisRotMat(), resetPosition(), and resetVelocity().
|
private |
_ev_rot_mat should only be initialised once in the beginning through the reset function
Definition at line 314 of file ekf.h.
Referenced by controlExternalVisionFusion().
|
private |
filtered rotation vector defining the rotation EV to EKF reference, initiliazied to zero rotation (rad)
Definition at line 311 of file ekf.h.
Referenced by calcExtVisRotMat(), get_ev2ekf_quaternion(), and resetExtVisRotMat().
|
private |
|
private |
true when the leading edge of the optical flow integration period has fallen behind the fusion time horizon
Definition at line 321 of file ekf.h.
Referenced by controlFusionModes(), and controlOpticalFlowFusion().
|
private |
Definition at line 324 of file ekf.h.
Referenced by controlFusionModes(), initHagl(), and runTerrainEstimator().
|
private |
bias errors in optical flow sensor rate gyro outputs (rad/sec)
Definition at line 394 of file ekf.h.
Referenced by calcOptFlowBodyRateComp(), fuseFlowForTerrain(), and fuseOptFlow().
|
private |
flow measurement innovation (rad/sec)
Definition at line 392 of file ekf.h.
Referenced by fuseFlowForTerrain(), fuseOptFlow(), get_ekf_vel_accuracy(), and get_flow_innov().
|
private |
flow innovation variance ((rad/sec)**2)
Definition at line 393 of file ekf.h.
Referenced by fuseFlowForTerrain(), fuseOptFlow(), and get_flow_innov_var().
|
private |
measured delta angle of the image about the X and Y body axes after removal of body rotation (rad), RH rotation is positive
Definition at line 400 of file ekf.h.
Referenced by controlOpticalFlowFusion(), fuseFlowForTerrain(), fuseOptFlow(), and resetVelocity().
|
private |
|
private |
time that inflight magnetic field alignment started (uSec)
Definition at line 441 of file ekf.h.
Referenced by realignYawGPS(), and resetMagHeading().
|
private |
true when baro height data should be fused
Definition at line 293 of file ekf.h.
Referenced by controlAuxVelFusion(), controlExternalVisionFusion(), controlHeightFusion(), controlVelPosFusion(), and fuseVelPosHeight().
|
private |
true when gps horizontal velocity measurement should be fused
Definition at line 295 of file ekf.h.
Referenced by controlAuxVelFusion(), controlExternalVisionFusion(), controlGpsFusion(), controlVelPosFusion(), and fuseVelPosHeight().
|
private |
true when auxiliary horizontal velocity measurement should be fused
Definition at line 297 of file ekf.h.
Referenced by controlAuxVelFusion(), and fuseVelPosHeight().
|
private |
true when the NE position data is being fused using an odometry assumption
Definition at line 307 of file ekf.h.
Referenced by controlExternalVisionFusion(), controlVelPosFusion(), and fuseVelPosHeight().
|
private |
true when gps position data should be fused
Definition at line 294 of file ekf.h.
Referenced by controlAuxVelFusion(), controlExternalVisionFusion(), controlGpsFusion(), controlVelPosFusion(), and fuseVelPosHeight().
|
private |
true when gps vertical velocity measurement should be fused
Definition at line 296 of file ekf.h.
Referenced by controlAuxVelFusion(), controlExternalVisionFusion(), controlGpsFusion(), controlVelPosFusion(), and fuseVelPosHeight().
|
private |
WGS-84 height (m)
Definition at line 425 of file ekf.h.
Referenced by collect_gps(), controlHeightFusion(), fuseVelPosHeight(), get_ekf_origin(), initialiseFilter(), and resetHeight().
|
private |
Definition at line 447 of file ekf.h.
Referenced by get_gps_check_status(), gps_is_good(), and resetVelocity().
|
private |
Definition at line 421 of file ekf.h.
Referenced by collect_gps(), and controlHeightFusion().
|
private |
true when new GPS data has fallen behind the fusion time horizon and is available to be fused
Definition at line 317 of file ekf.h.
Referenced by controlFusionModes(), controlGpsFusion(), and controlHeightFusion().
|
private |
GPS down position derivative (m/sec)
Definition at line 413 of file ekf.h.
Referenced by gps_is_good(), and initialiseFilter().
|
private |
normalised gps error
Definition at line 419 of file ekf.h.
Referenced by controlOpticalFlowFusion(), and gps_is_good().
|
private |
true if gps height into the buffer is intermittent
Definition at line 471 of file ekf.h.
Referenced by controlFusionModes(), controlHeightFusion(), and controlHeightSensorTimeouts().
|
private |
GPS filtered Down velocity (m/sec)
Definition at line 414 of file ekf.h.
Referenced by gps_is_good().
|
private |
GPS filtered East velocity (m/sec)
Definition at line 416 of file ekf.h.
Referenced by gps_is_good().
|
private |
GPS filtered North velocity (m/sec)
Definition at line 415 of file ekf.h.
Referenced by gps_is_good().
|
private |
GPS east position derivative (m/sec)
Definition at line 412 of file ekf.h.
Referenced by gps_is_good().
|
private |
GPS north position derivative (m/sec)
Definition at line 411 of file ekf.h.
Referenced by gps_is_good().
|
private |
innovation of the last height above terrain measurement (m)
Definition at line 459 of file ekf.h.
Referenced by checkRangeAidSuitability(), fuseHagl(), and getHaglInnov().
|
private |
innovation variance for the last height above terrain measurement (m**2)
Definition at line 460 of file ekf.h.
Referenced by checkRangeAidSuitability(), fuseHagl(), and getHaglInnovVar().
|
private |
true when the height above ground estimate is valid
Definition at line 467 of file ekf.h.
Referenced by isTerrainEstimateValid(), and updateTerrainValidity().
|
private |
heading measurement innovation (rad)
Definition at line 388 of file ekf.h.
Referenced by fuseGpsAntYaw(), fuseHeading(), and get_heading_innov().
|
private |
heading measurement innovation variance (rad**2)
Definition at line 389 of file ekf.h.
Referenced by fuseGpsAntYaw(), fuseHeading(), and get_heading_innov_var().
|
private |
Definition at line 489 of file ekf.h.
Referenced by predictCovariance().
|
private |
number of height samples read during initialisation
Definition at line 428 of file ekf.h.
Referenced by initialiseFilter().
|
private |
set as necessary if desired to maintain the same height after a height reset (m)
Definition at line 435 of file ekf.h.
Referenced by collect_gps(), controlHeightFusion(), controlHeightSensorTimeouts(), fuseVelPosHeight(), and resetHeight().
|
private |
previous value of NE position state used by odometry fusion (m)
Definition at line 309 of file ekf.h.
Referenced by controlExternalVisionFusion().
|
private |
true when previous values of the estimate and measurement are available for use
Definition at line 310 of file ekf.h.
Referenced by controlExternalVisionFusion(), and resetPosition().
|
private |
Number of standard deviations used for the horizontal velocity fusion innovation consistency check.
Definition at line 303 of file ekf.h.
Referenced by controlAuxVelFusion(), controlExternalVisionFusion(), controlGpsFusion(), and fuseVelPosHeight().
|
private |
the amount of time the IMU collection needs to be advanced to meet the target set by FILTER_UPDATE_PERIOD_MS (sec)
Definition at line 339 of file ekf.h.
Referenced by collect_imu().
|
private |
bias corrected delta angle measurements accumulated across the same time frame as the optical flow rates (rad)
Definition at line 395 of file ekf.h.
Referenced by calcOptFlowBodyRateComp(), and controlOpticalFlowFusion().
|
private |
down sampled imu data (sensor rate -> filter update rate)
Definition at line 404 of file ekf.h.
Referenced by collect_imu(), and reset().
|
private |
true when use of optical flow and range finder is being inhibited
Definition at line 399 of file ekf.h.
Referenced by controlOpticalFlowFusion().
|
private |
true when range finder can be used in flight as the height reference instead of the primary height sensor
Definition at line 482 of file ekf.h.
Referenced by checkRangeAidSuitability(), and isRangeAidSuitable().
|
staticprivate |
number of EKF states
Definition at line 270 of file ekf.h.
Referenced by fuseAirspeed(), fuseDeclination(), fuseDrag(), fuseGpsAntYaw(), fuseHeading(), fuseMag(), fuseOptFlow(), fuseSideslip(), fuseVelPosHeight(), initialiseCovariance(), predictCovariance(), and zeroOffDiag().
|
private |
last system time in usec that the GPS failed it's checks
Definition at line 417 of file ekf.h.
Referenced by controlGpsFusion(), and gps_is_good().
|
private |
true when all active GPS checks have passed
time the origin was last set (uSec)
Definition at line 424 of file ekf.h.
Referenced by collect_gps(), and get_ekf_origin().
|
private |
last system time in usec that the GPS passed it's checks
Definition at line 418 of file ekf.h.
Referenced by controlGpsFusion(), and gps_is_good().
|
private |
time the last reset of IMU delta angle and velocity state covariances was performed (uSec)
Definition at line 344 of file ekf.h.
Referenced by initialiseCovariance(), and reset_imu_bias().
|
private |
last known local NE position vector (m)
Definition at line 338 of file ekf.h.
Referenced by controlOpticalFlowFusion(), controlVelPosFusion(), and resetPosition().
|
private |
last vertical position when the in_air status was false (m)
Definition at line 439 of file ekf.h.
Referenced by controlMagFusion(), and getTerrainVPos().
|
private |
last yaw angle recorded when on ground motion checks were passing (rad)
Definition at line 362 of file ekf.h.
Referenced by fuseHeading().
|
private |
true when there is enough rotation to make magnetometer bias errors observable
Definition at line 354 of file ekf.h.
Referenced by checkMagBiasObservability(), and isMagBiasObservable().
|
private |
number of magnetometer samples read during initialisation
Definition at line 430 of file ekf.h.
Referenced by initialiseFilter().
|
private |
true when new magnetometer data has fallen behind the fusion time horizon and is available to be fused
Definition at line 318 of file ekf.h.
Referenced by canRunMagFusion(), controlFusionModes(), and updateMagFilter().
|
private |
true after the fuseDeclination() function has been used to modify the earth field covariances after a magnetic field reset event.
Definition at line 364 of file ekf.h.
Referenced by clearMagCov(), and run3DMagAndDeclFusions().
|
private |
true when magnetometer inhibit has been active for long enough to require a yaw reset when conditions improve.
Definition at line 361 of file ekf.h.
Referenced by checkMagInhibition(), controlDragFusion(), and controlGpsFusion().
|
private |
earth magnetic field innovations (Gauss)
Definition at line 376 of file ekf.h.
Referenced by fuseMag(), and get_mag_innov().
|
private |
earth magnetic field innovation variance (Gauss**2)
Definition at line 377 of file ekf.h.
Referenced by fuseMag(), and get_mag_innov_var().
|
private |
filtered magnetometer measurement (Gauss)
Definition at line 433 of file ekf.h.
Referenced by controlFusionModes(), controlGpsFusion(), controlOpticalFlowFusion(), initialiseFilter(), realignYawGPS(), runInAirYawReset(), runOnGroundYawReset(), and updateMagFilter().
|
private |
true when magnetometer use is being inhibited
Definition at line 359 of file ekf.h.
Referenced by checkMagInhibition(), fuseHeading(), isYawResetAuthorized(), and resetMagHeading().
|
private |
true when magnetometer use was being inhibited the previous frame
Definition at line 360 of file ekf.h.
Referenced by fuseHeading().
|
private |
last system time in usec before magnetometer use was inhibited
Definition at line 358 of file ekf.h.
Referenced by checkMagInhibition().
|
private |
true when a reset of the yaw using the magnetometer data has been requested
Definition at line 363 of file ekf.h.
Referenced by checkHaglYawResetReq(), collect_gps(), runInAirYawReset(), and runOnGroundYawReset().
|
private |
GPS is marked as healthy only after this amount of time.
Definition at line 420 of file ekf.h.
Referenced by gps_is_good(), and set_min_required_gps_health_time().
|
private |
number of times a bad heading has been detected in flight and required a yaw reset
Definition at line 357 of file ekf.h.
Referenced by controlMagFusion(), and realignYawGPS().
|
private |
contains the magnitude of the angle, velocity and position track errors (rad, m/s, m)
Definition at line 408 of file ekf.h.
Referenced by calculateOutputStates(), and get_output_tracking_error().
|
private |
integral of position tracking error (m.s)
Definition at line 407 of file ekf.h.
Referenced by calculateOutputStates().
|
private |
previous value of NED position measurement fused using odometry assumption (m)
Definition at line 308 of file ekf.h.
Referenced by controlExternalVisionFusion().
|
private |
Number of standard deviations used for the NE position fusion innovation consistency check.
Definition at line 300 of file ekf.h.
Referenced by controlExternalVisionFusion(), controlGpsFusion(), controlVelPosFusion(), and fuseVelPosHeight().
|
private |
1-STD observation noise used for the fusion of NE position data (m)
Definition at line 299 of file ekf.h.
Referenced by controlExternalVisionFusion(), controlGpsFusion(), controlVelPosFusion(), and fuseVelPosHeight().
|
private |
saved delta velocity XYZ bias variances (m/sec)**2
Definition at line 454 of file ekf.h.
Referenced by initialiseCovariance(), predictCovariance(), reset(), and reset_imu_bias().
|
private |
specifies primary source of height data
Definition at line 473 of file ekf.h.
Referenced by collect_gps(), and initialiseFilter().
|
private |
down sampled quaternion (tracking delta angles between ekf update steps)
Definition at line 405 of file ekf.h.
Referenced by collect_imu(), and reset().
|
private |
2,2 element of the rotation matrix from sensor frame to earth frame
Definition at line 465 of file ekf.h.
Referenced by controlFusionModes(), controlHeightFusion(), fuseHagl(), fuseVelPosHeight(), initHagl(), initialiseFilter(), resetHeight(), resetVelocity(), and updateRangeDataValidity().
|
private |
transformation matrix from body frame to earth frame from last EKF prediction
Definition at line 348 of file ekf.h.
Referenced by calculate_synthetic_mag_z_measurement(), controlExternalVisionFusion(), controlFusionModes(), controlGpsFusion(), controlOpticalFlowFusion(), fixCovarianceErrors(), fuseFlowForTerrain(), fuseGpsAntYaw(), fuseHeading(), fuseOptFlow(), initialiseFilter(), predictState(), realignYawGPS(), resetGpsAntYaw(), resetMagHeading(), and resetVelocity().
|
private |
true when range finder is being used as the height reference instead of the primary height sensor
Definition at line 483 of file ekf.h.
Referenced by controlHeightFusion().
|
private |
true when new range finder data has fallen behind the fusion time horizon and is available to be fused
Definition at line 320 of file ekf.h.
Referenced by controlFusionModes(), controlHeightFusion(), runTerrainEstimator(), and updateRangeDataValidity().
|
private |
filtered height measurement (m)
Definition at line 429 of file ekf.h.
Referenced by initialiseFilter().
|
private |
true if range finder sample retrieved from buffer is valid
Definition at line 472 of file ekf.h.
Referenced by checkRangeAidSuitability(), controlFusionModes(), controlHeightFusion(), controlHeightSensorTimeouts(), initHagl(), runTerrainEstimator(), and updateRangeDataValidity().
|
private |
maximum value for new rng measurement when being stuck
Definition at line 487 of file ekf.h.
Referenced by updateRangeDataStuck().
|
private |
minimum value for new rng measurement when being stuck
Definition at line 486 of file ekf.h.
Referenced by updateRangeDataStuck().
|
private |
magnetic field state variances that have been saved for use at the next initialisation (Gauss**2)
Definition at line 443 of file ekf.h.
Referenced by loadMagCovData(), and saveMagCovData().
|
private |
NE magnetic field state covariance sub-matrix saved for use at the next initialisation (Gauss**2)
Definition at line 444 of file ekf.h.
Referenced by loadMagCovData(), and saveMagCovData().
|
private |
sine of the range finder tilt rotation about the Y body axis
Definition at line 463 of file ekf.h.
Referenced by controlFusionModes(), reset(), and runTerrainEstimator().
|
private |
state struct of the ekf running at the delayed time horizon
Definition at line 288 of file ekf.h.
Referenced by alignOutputFilter(), calcExtVisRotMat(), calcRotVecVariances(), calculate_quaternion(), calculateOutputStates(), checkHaglYawResetReq(), checkRangeAidSuitability(), collect_gps(), constrainStates(), controlAuxVelFusion(), controlExternalVisionFusion(), controlGpsFusion(), controlHeightFusion(), controlHeightSensorTimeouts(), controlMagFusion(), controlOpticalFlowFusion(), controlVelPosFusion(), fixCovarianceErrors(), fuse(), fuseAirspeed(), fuseDeclination(), fuseDrag(), fuseFlowForTerrain(), fuseGpsAntYaw(), fuseHagl(), fuseHeading(), fuseMag(), fuseOptFlow(), fuseSideslip(), fuseVelPosHeight(), get_accel_bias(), get_ekf_ctrl_limits(), get_ekf_vel_accuracy(), get_gyro_bias(), get_state_delayed(), get_true_airspeed(), get_wind_velocity(), getMagDeclination(), gps_is_good(), increaseQuatYawErrVariance(), initHagl(), initialiseFilter(), initialiseQuatCovariances(), limitDeclination(), predictCovariance(), predictState(), realignYawGPS(), reset_imu_bias(), resetExtVisRotMat(), resetGpsAntYaw(), resetHeight(), resetMagHeading(), resetPosition(), resetStates(), resetVelocity(), resetWindCovariance(), resetWindStates(), and runTerrainEstimator().
struct { ... } Ekf::_state_reset_status |
reset event monitoring structure containing velocity, position, height and yaw reset information
Referenced by controlExternalVisionFusion(), get_posD_reset(), get_posNE_reset(), get_quat_reset(), get_velD_reset(), get_velNE_reset(), realignYawGPS(), resetGpsAntYaw(), resetHeight(), resetMagHeading(), resetPosition(), and resetVelocity().
|
private |
|
private |
true when new true airspeed data has fallen behind the fusion time horizon and is available to be fused
Definition at line 323 of file ekf.h.
Referenced by controlAirDataFusion(), controlFusionModes(), resetWindCovariance(), and resetWindStates().
|
private |
true when the terrain estimator has been initialized
Definition at line 462 of file ekf.h.
Referenced by initialiseFilter(), reset(), runTerrainEstimator(), and updateTerrainValidity().
|
private |
variance of terrain position estimate (m**2)
Definition at line 458 of file ekf.h.
Referenced by fuseFlowForTerrain(), fuseHagl(), get_terrain_var(), initHagl(), and runTerrainEstimator().
|
private |
estimated vertical position of the terrain underneath the vehicle in local NED frame (m)
Definition at line 457 of file ekf.h.
Referenced by checkRangeAidSuitability(), controlHeightFusion(), fuseFlowForTerrain(), fuseHagl(), fuseOptFlow(), get_ekf_ctrl_limits(), get_ekf_vel_accuracy(), getTerrainVertPos(), getTerrainVPos(), initHagl(), resetVelocity(), and runTerrainEstimator().
|
private |
last time the accel bias check passed (uSec)
Definition at line 341 of file ekf.h.
Referenced by fixCovarianceErrors().
|
private |
last system time that on-ground motion exceeded limits (uSec)
Definition at line 397 of file ekf.h.
Referenced by controlOpticalFlowFusion().
|
private |
timestamp at which range finder signal quality was 0 (used for hysteresis)
Definition at line 474 of file ekf.h.
Referenced by updateRangeDataValidity().
|
private |
last time a bad vertical accel was detected (uSec)
Definition at line 477 of file ekf.h.
Referenced by controlHeightSensorTimeouts().
|
private |
last system time that on-ground motion was within limits (uSec)
Definition at line 398 of file ekf.h.
Referenced by controlOpticalFlowFusion().
|
private |
last time a good vertical accel was detected (uSec)
Definition at line 478 of file ekf.h.
Referenced by controlHeightSensorTimeouts().
|
private |
amount of time we have been doing inertial only deadreckoning (uSec)
Definition at line 327 of file ekf.h.
Referenced by update_deadreckoning_status().
|
private |
time the last fusion of airspeed measurements were performed (uSec)
Definition at line 335 of file ekf.h.
Referenced by controlAirDataFusion(), controlBetaFusion(), fuseAirspeed(), and update_deadreckoning_status().
|
private |
time the last fusion of synthetic sideslip measurements were performed (uSec)
Definition at line 336 of file ekf.h.
Referenced by controlAirDataFusion(), controlBetaFusion(), fuseSideslip(), and update_deadreckoning_status().
|
private |
time the last fusion of incremental horizontal position measurements was performed (uSec)
Definition at line 331 of file ekf.h.
Referenced by controlGpsFusion(), fuseVelPosHeight(), initialiseFilter(), and update_deadreckoning_status().
|
private |
same flag as "_flow_data_ready" but used for separate terrain estimator
last time we faked GPS position measurements to constrain tilt errors during operation without external aiding (uSec)
Definition at line 326 of file ekf.h.
Referenced by controlVelPosFusion().
|
private |
last system time that the hagl measurement failed it's checks (uSec)
Definition at line 461 of file ekf.h.
Referenced by controlFusionModes(), controlOpticalFlowFusion(), fuseHagl(), initHagl(), initialiseFilter(), and updateTerrainValidity().
|
private |
time the last fusion of height measurements was performed (uSec)
Definition at line 333 of file ekf.h.
Referenced by controlHeightFusion(), controlHeightSensorTimeouts(), fuseVelPosHeight(), and initialiseFilter().
|
private |
|
private |
last system time that sufficient movement to use 3-axis magnetometer fusion was detected (uSec)
Definition at line 442 of file ekf.h.
Referenced by canUse3DMagFusion(), and check3DMagFusionSuitability().
|
private |
time the last fusion of optical flow measurements were performed (uSec)
Definition at line 334 of file ekf.h.
Referenced by controlExternalVisionFusion(), controlGpsFusion(), controlOpticalFlowFusion(), fuseFlowForTerrain(), fuseOptFlow(), initialiseFilter(), update_deadreckoning_status(), and updateTerrainValidity().
|
private |
time the last fusion of horizontal position measurements was performed (uSec)
Definition at line 330 of file ekf.h.
Referenced by controlExternalVisionFusion(), controlGpsFusion(), fuseVelPosHeight(), initialiseFilter(), and update_deadreckoning_status().
|
private |
time the last range finder measurement was ready (uSec)
Definition at line 337 of file ekf.h.
Referenced by updateRangeDataStuck().
|
private |
time the last fusion of velocity measurements was performed (uSec)
Definition at line 332 of file ekf.h.
Referenced by controlExternalVisionFusion(), controlGpsFusion(), fuseVelPosHeight(), initialiseFilter(), and update_deadreckoning_status().
|
private |
last system time in usec that a yaw rotation manoeuvre was detected
Definition at line 356 of file ekf.h.
Referenced by checkMagBiasObservability().
|
private |
true if we are using a synthetic position to constrain drift
Definition at line 328 of file ekf.h.
Referenced by controlVelPosFusion(), and global_position_is_valid().
|
private |
integral of velocity tracking error (m)
Definition at line 406 of file ekf.h.
Referenced by calculateOutputStates().
|
private |
NED velocity and position innovations: 0-2 vel (m/sec), 3-5 pos (m)
Definition at line 372 of file ekf.h.
Referenced by controlExternalVisionFusion(), controlGpsFusion(), controlHeightSensorTimeouts(), controlVelPosFusion(), fixCovarianceErrors(), fuseVelPosHeight(), get_ekf_gpos_accuracy(), get_ekf_lpos_accuracy(), get_ekf_vel_accuracy(), and get_vel_pos_innov().
|
private |
NED velocity and position innovation variances: 0-2 vel ((m/sec)**2), 3-5 pos (m**2)
Definition at line 373 of file ekf.h.
Referenced by controlHeightSensorTimeouts(), fuseVelPosHeight(), and get_vel_pos_innov_var().
|
private |
1-STD observation noise variance used for the fusion of NED velocity data (m/sec)**2
Definition at line 302 of file ekf.h.
Referenced by controlAuxVelFusion(), controlExternalVisionFusion(), controlGpsFusion(), and fuseVelPosHeight().
|
private |
true when a large yaw error has been fixed and a velocity and position state reset is required
Definition at line 445 of file ekf.h.
Referenced by controlGpsFusion(), realignYawGPS(), and runVelPosReset().
|
private |
Number of standard deviations used for the vertical velocity fusion innovation consistency check.
Definition at line 304 of file ekf.h.
Referenced by controlExternalVisionFusion(), controlGpsFusion(), and fuseVelPosHeight().
|
private |
true when there is enough horizontal acceleration to make yaw observable
Definition at line 355 of file ekf.h.
Referenced by checkYawAngleObservability(), and isYawAngleObservable().
|
private |
Recent change in yaw angle measured about the earth frame D axis (rad)
Definition at line 352 of file ekf.h.
Referenced by calculateOutputStates(), and checkMagBiasObservability().
|
private |
Filtered angular rate about earth frame D axis (rad/sec)
Definition at line 353 of file ekf.h.
Referenced by calculateOutputStates(), and checkMagBiasObservability().
|
private |
state covariance matrix
Definition at line 367 of file ekf.h.
Referenced by calcRotVecVariances(), controlGpsFusion(), controlHeightSensorTimeouts(), covariances(), fixCovarianceErrors(), fuseAirspeed(), fuseDeclination(), fuseDrag(), fuseGpsAntYaw(), fuseHagl(), fuseHeading(), fuseMag(), fuseOptFlow(), fuseSideslip(), fuseVelPosHeight(), get_ekf_gpos_accuracy(), get_ekf_lpos_accuracy(), get_ekf_vel_accuracy(), get_pos_var(), get_vel_var(), get_wind_velocity_var(), increaseQuatYawErrVariance(), initialiseCovariance(), initialiseQuatCovariances(), loadMagCovData(), predictCovariance(), realignYawGPS(), reset_imu_bias(), resetHeight(), resetMagHeading(), resetMagRelatedCovariances(), resetPosition(), resetVelocity(), resetWindCovariance(), saveMagCovData(), uncorrelateQuatStates(), and zeroMagCov().
float Ekf::posD_change |
uint8_t Ekf::posD_counter |
Vector2f Ekf::posNE_change |
North, East position change due to last reset (m)
Definition at line 280 of file ekf.h.
Referenced by resetPosition().
uint8_t Ekf::posNE_counter |
Quatf Ekf::quat_change |
uint8_t Ekf::quat_counter |
float Ekf::velD_change |
uint8_t Ekf::velD_counter |
Vector2f Ekf::velNE_change |
uint8_t Ekf::velNE_counter |