changed visualisation

added new eval code for new walkers
improved barometer (moving avg and median)
floorplan-staircase-fixes
disabled step-turn (now part of transition)
added abs-orientation-reader (for testing)
added beacons
This commit is contained in:
2016-02-05 20:21:46 +01:00
parent 9e9b6882cd
commit 716b004f3c
15 changed files with 188 additions and 179 deletions

View File

@@ -1,4 +1,42 @@
#ifndef ORIENTATIONSENSORREADER_H
#define ORIENTATIONSENSORREADER_H
#include "../reader/SensorReader.h"
#include "OrientationObservation.h"
#include <cassert>
class OrientationSensorReader {
public:
/** get wifi observation data from one CSV entry */
static OrientationObservation read(const SensorEntry& se) {
std::string tmp = se.data;
OrientationObservation obs;
size_t pos1 = tmp.find(';');
size_t pos2 = tmp.find(';', pos1+1);
size_t pos3 = tmp.find(';', pos2+1);
assert(pos1 != std::string::npos);
assert(pos2 != std::string::npos);
assert(pos3 != std::string::npos);
const std::string s1 = tmp.substr(0, pos1);
const std::string s2 = tmp.substr(pos1+1, pos2-pos1-1);
const std::string s3 = tmp.substr(pos2+1, pos3-pos2-1);
obs.values[0] = std::stof(s1);
obs.values[1] = std::stof(s2);
obs.values[2] = std::stof(s3);
return obs;
}
};
#endif // ORIENTATIONSENSORREADER_H