mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-27 17:50:36 +08:00
validation: remove unused vibration metric
This commit is contained in:
@@ -214,52 +214,6 @@ float *DataValidatorGroup::get_best(uint64_t timestamp, int *index) {
|
||||
return (best) ? best->value() : nullptr;
|
||||
}
|
||||
|
||||
float DataValidatorGroup::get_vibration_factor(uint64_t timestamp) {
|
||||
|
||||
DataValidator *next = _first;
|
||||
|
||||
float vibe = 0.0f;
|
||||
|
||||
/* find the best RMS value of a non-timed out sensor */
|
||||
while (next != nullptr) {
|
||||
if (next->confidence(timestamp) > 0.5f) {
|
||||
float *rms = next->rms();
|
||||
|
||||
for (unsigned j = 0; j < 3; j++) {
|
||||
if (rms[j] > vibe) {
|
||||
vibe = rms[j];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
next = next->sibling();
|
||||
}
|
||||
|
||||
return vibe;
|
||||
}
|
||||
|
||||
float DataValidatorGroup::get_vibration_offset(uint64_t timestamp, int axis) {
|
||||
|
||||
DataValidator *next = _first;
|
||||
|
||||
float vibe = -1.0f;
|
||||
|
||||
/* find the best vibration value of a non-timed out sensor */
|
||||
while (next != nullptr) {
|
||||
if (next->confidence(timestamp) > 0.5f) {
|
||||
float *vibration_offset = next->vibration_offset();
|
||||
|
||||
if (vibe < 0.0f || vibration_offset[axis] < vibe) {
|
||||
vibe = vibration_offset[axis];
|
||||
}
|
||||
}
|
||||
|
||||
next = next->sibling();
|
||||
}
|
||||
|
||||
return vibe;
|
||||
}
|
||||
|
||||
void DataValidatorGroup::print() {
|
||||
|
||||
ECL_INFO("validator: best: %d, prev best: %d, failsafe: %s (%u events)", _curr_best, _prev_best,
|
||||
|
||||
Reference in New Issue
Block a user