Added variable Test SideToF sensore

Dependencies:   QEI2 chair_BNO055 PID Watchdog VL53L1X_Filter ros_lib_kinetic

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers statistics.h Source File

statistics.h

00001 #ifndef statistics_h               //improvement: #ifndef _STATISTICS_h  (purpose: good coding practice)
00002 #define statistics_h               //             #define _STATISTICS_h
00003  
00004 #include "mbed.h"
00005 
00006 // Capitalize the first letter of class name (good coding practice/how to distinguish class from function)
00007 class statistics 
00008 { 
00009 public: 
00010     //Defining default constructor
00011     statistics(int* Input, double dataLength, int firstDataPoint = 0); 
00012     //Defining methods
00013     double stdev();
00014     double mean();
00015     
00016   private:
00017    int* data;                                       //pointer to data
00018    double dataLength;
00019    int firstDataPoint;
00020 
00021     
00022 };
00023 
00024 #endif