Added more code for side and angled sensor

Dependencies:   QEI2 PID Watchdog VL53L1X_Filter BNOWrapper ros_lib_kinetic

Committer:
t1jain
Date:
Mon Jul 01 23:20:48 2019 +0000
Revision:
31:06f2362caf12
Parent:
28:6d6bd8ad04dc
aa

Who changed what in which revision?

UserRevisionLine numberNew contents of line
jvfausto 28:6d6bd8ad04dc 1 #ifndef statistics_h //improvement: #ifndef _STATISTICS_h (purpose: good coding practice)
jvfausto 28:6d6bd8ad04dc 2 #define statistics_h // #define _STATISTICS_h
jvfausto 27:da718b990837 3
jvfausto 27:da718b990837 4 #include "mbed.h"
jvfausto 27:da718b990837 5
jvfausto 28:6d6bd8ad04dc 6 // Capitalize the first letter of class name (good coding practice/how to distinguish class from function)
jvfausto 27:da718b990837 7 class statistics
jvfausto 27:da718b990837 8 {
jvfausto 27:da718b990837 9 public:
jvfausto 28:6d6bd8ad04dc 10 //Defining default constructor
t1jain 31:06f2362caf12 11 statistics(int* Input, double dataLength, int firstDataPoint = 0);
jvfausto 28:6d6bd8ad04dc 12 //Defining methods
jvfausto 27:da718b990837 13 double stdev();
jvfausto 27:da718b990837 14 double mean();
jvfausto 27:da718b990837 15
jvfausto 27:da718b990837 16 private:
jvfausto 28:6d6bd8ad04dc 17 int* data; //pointer to data
t1jain 31:06f2362caf12 18 double dataLength;
jvfausto 28:6d6bd8ad04dc 19 int firstDataPoint;
jvfausto 27:da718b990837 20
jvfausto 27:da718b990837 21
jvfausto 27:da718b990837 22 };
jvfausto 27:da718b990837 23
jvfausto 28:6d6bd8ad04dc 24 #endif