Add vibration magnitude estimation

This commit is contained in:
Lorenz Meier
2016-02-25 16:54:24 +01:00
parent 5483e7a477
commit cd5857e900
4 changed files with 42 additions and 1 deletions
+7
View File
@@ -117,6 +117,12 @@ public:
*/
float* rms() { return _rms; }
/**
* Get the vibration offset
* @return the stored vibration offset
*/
float* vibration_offset() { return _vibe; }
/**
* Print the validator value
*
@@ -154,6 +160,7 @@ private:
float _M2[3]; /**< RMS component value */
float _rms[3]; /**< root mean square error */
float _value[3]; /**< last value */
float _vibe[3]; /**< vibration level, in sensor unit */
float _value_equal_count; /**< equal values in a row */
DataValidator *_sibling; /**< sibling in the group */
const unsigned NORETURN_ERRCOUNT = 10000; /**< if the error count reaches this value, return sensor as invalid */