huge commit
- worked on about everything - grid walker using plugable modules - wifi models - new distributions - worked on geometric data-structures - added typesafe timestamps - worked on grid-building - added sensor-classes - added sensor analysis (step-detection, turn-detection) - offline data reader - many test-cases
This commit is contained in:
23
sensors/imu/AccelerometerData.h
Normal file
23
sensors/imu/AccelerometerData.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#ifndef ACCELEROMETERDATA_H
|
||||
#define ACCELEROMETERDATA_H
|
||||
|
||||
#include <cmath>
|
||||
|
||||
/** data received from an accelerometer sensor */
|
||||
struct AccelerometerData {
|
||||
|
||||
float x;
|
||||
float y;
|
||||
float z;
|
||||
|
||||
AccelerometerData() : x(0), y(0), z(0) {;}
|
||||
|
||||
AccelerometerData(const float x, const float y, const float z) : x(x), y(y), z(z) {;}
|
||||
|
||||
float magnitude() const {
|
||||
return std::sqrt( x*x + y*y + z*z );
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#endif // ACCELEROMETERDATA_H
|
||||
Reference in New Issue
Block a user