added code from fusion2016

This commit is contained in:
Toni
2016-03-01 15:04:46 +01:00
commit 8d2be0f8a0
97 changed files with 19831 additions and 0 deletions

36
code/lukas/TurnReader.h Executable file
View File

@@ -0,0 +1,36 @@
#ifndef TURNREADER_H
#define TURNREADER_H
#include "../reader/SensorReaderTurn.h"
#include "TurnObservation.h"
class TurnReader {
public:
static TurnObservation* readTurn(const SensorEntryTurn& se) {
std::string tmp = se.data;
TurnObservation* obs = new TurnObservation();
while(!tmp.empty()) {
int pos = tmp.find(',');
std::string heading = tmp.substr(0, pos);
tmp = tmp.substr(pos);
assert(tmp[0] == ';'); tmp = tmp.substr(1);
std::string motion = tmp;
TurnObservation t(std::stof(heading), std::stof(motion));
}
return obs;
}
};
#endif // TURNREADER_H