initial commit

-converter .txt -> MatLab matrices
This commit is contained in:
2015-12-25 10:07:48 +01:00
parent 28caf25ea8
commit c41200cb6a
11 changed files with 902 additions and 0 deletions

View 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