hormone v.1 for optimizing COT
Dependents: TurtleBot_with_AHS
Fork of calculator by
calculator.h@0:22ebaf70b60e, 2018-08-13 (annotated)
- Committer:
- worasuchad
- Date:
- Mon Aug 13 11:38:52 2018 +0000
- Revision:
- 0:22ebaf70b60e
- Child:
- 1:b6345fbad095
hormone v.1 for optimizing COT
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
worasuchad | 0:22ebaf70b60e | 1 | #ifndef CALCULATOR_H |
worasuchad | 0:22ebaf70b60e | 2 | #define CALCULATOR_H |
worasuchad | 0:22ebaf70b60e | 3 | |
worasuchad | 0:22ebaf70b60e | 4 | #include "mbed.h" |
worasuchad | 0:22ebaf70b60e | 5 | |
worasuchad | 0:22ebaf70b60e | 6 | class calculator |
worasuchad | 0:22ebaf70b60e | 7 | { |
worasuchad | 0:22ebaf70b60e | 8 | protected: |
worasuchad | 0:22ebaf70b60e | 9 | float sum, mean, standardDeviation; |
worasuchad | 0:22ebaf70b60e | 10 | int i; |
worasuchad | 0:22ebaf70b60e | 11 | public: |
worasuchad | 0:22ebaf70b60e | 12 | calculator(); |
worasuchad | 0:22ebaf70b60e | 13 | float calculateSD(const float *sdData, int size); |
worasuchad | 0:22ebaf70b60e | 14 | float calculateMean(const float *meanData, int size); |
worasuchad | 0:22ebaf70b60e | 15 | float calcSDVectorA(const float *arrAx, const float *arrAy, const float *arrAz, int size); |
worasuchad | 0:22ebaf70b60e | 16 | float calcG4(const float *arrRoll, const float *arrPitch, int size); |
worasuchad | 0:22ebaf70b60e | 17 | }; |
worasuchad | 0:22ebaf70b60e | 18 | #endif |