validation: remove unused vibration metric

This commit is contained in:
Daniel Agar
2020-02-03 12:28:55 -05:00
parent e52e2b88ed
commit ed260c4f1d
6 changed files with 0 additions and 138 deletions
-46
View File
@@ -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,