hormone v.1 for optimizing COT
Dependents: TurtleBot_with_AHS
Fork of calculator by
Diff: calculator.h
- Revision:
- 0:22ebaf70b60e
- Child:
- 1:b6345fbad095
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/calculator.h Mon Aug 13 11:38:52 2018 +0000 @@ -0,0 +1,18 @@ +#ifndef CALCULATOR_H +#define CALCULATOR_H + +#include "mbed.h" + +class calculator +{ + protected: + float sum, mean, standardDeviation; + int i; + public: + calculator(); + float calculateSD(const float *sdData, int size); + float calculateMean(const float *meanData, int size); + float calcSDVectorA(const float *arrAx, const float *arrAy, const float *arrAz, int size); + float calcG4(const float *arrRoll, const float *arrPitch, int size); +}; +#endif \ No newline at end of file