fixed some compiler warnings
added equality checks to sensor-data classes more robust sensor reader [fixed some issues] added support for gps added support for compass added sensor-data-writer added test-cases minor changes
This commit is contained in:
38
sensors/offline/Sensors.h
Normal file
38
sensors/offline/Sensors.h
Normal file
@@ -0,0 +1,38 @@
|
||||
#ifndef OFFLINE_SENSORS_H
|
||||
#define OFFLINE_SENSORS_H
|
||||
|
||||
namespace Offline {
|
||||
|
||||
enum class Sensor {
|
||||
ACC = 0,
|
||||
GRAVITY = 1,
|
||||
LIN_ACC = 2,
|
||||
GYRO = 3,
|
||||
BARO = 5,
|
||||
WIFI = 8,
|
||||
BEACON = 9,
|
||||
COMPASS = 15,
|
||||
GPS = 16,
|
||||
GROUND_TRUTH = 99,
|
||||
POS = 1001, // IPIN2016
|
||||
};
|
||||
|
||||
template <typename T> struct TS {
|
||||
const uint64_t ts;
|
||||
T data;
|
||||
TS(const uint64_t ts) : ts(ts) {;}
|
||||
TS(const uint64_t ts, const T& data) : ts(ts), data(data) {;}
|
||||
};
|
||||
|
||||
/** entry for one sensor */
|
||||
struct Entry {
|
||||
Sensor type;
|
||||
uint64_t ts;
|
||||
int idx;
|
||||
Entry(Sensor type, uint64_t ts, int idx) : type(type), ts(ts), idx(idx) {;}
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif // OFFLINE_SENSORS_H
|
||||
Reference in New Issue
Block a user