initial commit
-converter .txt -> MatLab matrices
This commit is contained in:
29
workspace/sensors/SensorReadings.h
Normal file
29
workspace/sensors/SensorReadings.h
Normal file
@@ -0,0 +1,29 @@
|
||||
#ifndef SENSORREADINGS_H
|
||||
#define SENSORREADINGS_H
|
||||
|
||||
#include <vector>
|
||||
|
||||
template <typename T> class SensorReadings {
|
||||
|
||||
/** combine sensor-values with a timestamp */
|
||||
struct TimedEntry {
|
||||
uint64_t ts;
|
||||
T val;
|
||||
TimedEntry(const uint64_t ts, const T& val) : ts(ts), val(val) {;}
|
||||
};
|
||||
|
||||
public:
|
||||
|
||||
/** all readings (with timestamp) for one sensor */
|
||||
std::vector<TimedEntry> values;
|
||||
|
||||
public:
|
||||
|
||||
/** add a new sensor-reading with timestamp */
|
||||
void add(const uint64_t ts, const T& val) {
|
||||
values.push_back(TimedEntry(ts, val));
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#endif // SENSORREADINGS_H
|
||||
Reference in New Issue
Block a user