Merge pull request #371 from CarlOlsson/pr-push_beta_test_ratio

ekf: return beta test ratio in get_innovation_test_status
This commit is contained in:
Paul Riseborough 2017-12-28 08:29:15 +11:00 committed by GitHub
commit a39c376c26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 3 deletions

View File

@ -224,7 +224,7 @@ public:
// Innovation Test Ratios - these are the ratio of the innovation to the acceptance threshold.
// A value > 1 indicates that the sensor measurement has exceeded the maximum acceptable level and has been rejected by the EKF
// Where a measurement type is a vector quantity, eg magnetoemter, GPS position, etc, the maximum value is returned.
void get_innovation_test_status(uint16_t *status, float *mag, float *vel, float *pos, float *hgt, float *tas, float *hagl);
void get_innovation_test_status(uint16_t *status, float *mag, float *vel, float *pos, float *hgt, float *tas, float *hagl, float *beta);
// return a bitmask integer that describes which state estimates can be used for flight control
void get_ekf_soln_status(uint16_t *status);

View File

@ -1100,7 +1100,7 @@ bool Ekf::reset_imu_bias()
// Innovation Test Ratios - these are the ratio of the innovation to the acceptance threshold.
// A value > 1 indicates that the sensor measurement has exceeded the maximum acceptable level and has been rejected by the EKF
// Where a measurement type is a vector quantity, eg magnetoemter, GPS position, etc, the maximum value is returned.
void Ekf::get_innovation_test_status(uint16_t *status, float *mag, float *vel, float *pos, float *hgt, float *tas, float *hagl)
void Ekf::get_innovation_test_status(uint16_t *status, float *mag, float *vel, float *pos, float *hgt, float *tas, float *hagl, float *beta)
{
// return the integer bitmask containing the consistency check pass/fail satus
*status = _innov_check_fail_status.value;
@ -1116,6 +1116,8 @@ void Ekf::get_innovation_test_status(uint16_t *status, float *mag, float *vel, f
*tas = sqrtf(_tas_test_ratio);
// return the terrain height innovation test ratio
*hagl = sqrtf(_terr_test_ratio);
// return the synthetic sideslip innovation test ratio
*beta = sqrtf(_beta_test_ratio);
}
// return a bitmask integer that describes which state estimates are valid

View File

@ -338,7 +338,7 @@ public:
// Innovation Test Ratios - these are the ratio of the innovation to the acceptance threshold.
// A value > 1 indicates that the sensor measurement has exceeded the maximum acceptable level and has been rejected by the EKF
// Where a measurement type is a vector quantity, eg magnetoemter, GPS position, etc, the maximum value is returned.
virtual void get_innovation_test_status(uint16_t *status, float *mag, float *vel, float *pos, float *hgt, float *tas, float *hagl) = 0;
virtual void get_innovation_test_status(uint16_t *status, float *mag, float *vel, float *pos, float *hgt, float *tas, float *hagl, float *beta) = 0;
// return a bitmask integer that describes which state estimates can be used for flight control
virtual void get_ekf_soln_status(uint16_t *status) = 0;