hormone v.1 for optimizing COT

Dependents:   TurtleBot_with_AHS

Fork of calculator by worasuchad haomachai

Committer:
worasuchad
Date:
Fri Aug 24 10:57:58 2018 +0000
Revision:
1:b6345fbad095
Parent:
0:22ebaf70b60e
experiment done

Who changed what in which revision?

UserRevisionLine numberNew 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 1:b6345fbad095 13 float calculateSD(const float *sdData, const int size);
worasuchad 1:b6345fbad095 14 float calculateMean(const float *meanData, const int size);
worasuchad 1:b6345fbad095 15 float calcSDVectorA(const float *arrAx, const float *arrAy, const float *arrAz, const int size);
worasuchad 1:b6345fbad095 16 float calcG4(const float *arrRoll, const float *arrPitch, const int sizeG4);
worasuchad 0:22ebaf70b60e 17 };
worasuchad 0:22ebaf70b60e 18 #endif