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,11 @@
#ifndef ORIENTATIONOBSERVATION_H
#define ORIENTATIONOBSERVATION_H
/** android device orientation */
struct OrientationObservation {
float values[3];
};
#endif // ORIENTATIONOBSERVATION_H

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

View File

@@ -22,6 +22,7 @@ public:
const double pl = 2.7; // 2.7
const double tx = -46;
const float ibPLE = 1.9;
addAP(("00:04:96:6b:64:99"), "i.3.20", 290, 1300, Helper::getHeight(3), tx, pl);
addAP(("00:04:96:6b:70:c9"), "i.3.25", 290, 3930, Helper::getHeight(3), tx, pl);
@@ -52,7 +53,9 @@ public:
addAP(("00:04:96:6B:46:09"), "I.0.xx", 6860, 3690, Helper::getHeight(0), tx, pl);
addAP(("00:04:96:6C:5E:39"), "I.0.36", 4480, 4800, Helper::getHeight(0), tx, pl); // vague!!
addBeacon("48:EF:8D:77:66:DF", -81, ibPLE, 6984, 4526, Helper::getHeight(2));
addBeacon("6F:5F:39:0C:51:E4", -81, ibPLE, 7829, 3916, 200);
addBeacon("49:23:D8:7F:E8:D2", -81, ibPLE, 6946, 4536, Helper::getHeight(1));
// OLD

View File

@@ -15,15 +15,16 @@ class WiFiAP {
public:
/** the AP's MAC-Address */
MACAddress mac;
const MACAddress mac;
/** the AP's readable SSID */
std::string ssid;
const std::string ssid;
double tx;
/** AP tx-power */
const float tx;
/** path loss for this ap. for testing */
double pl;
const float pl;