huge commit
- worked on about everything - grid walker using plugable modules - wifi models - new distributions - worked on geometric data-structures - added typesafe timestamps - worked on grid-building - added sensor-classes - added sensor analysis (step-detection, turn-detection) - offline data reader - many test-cases
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#ifndef FLOORPLAN_H
|
||||
#define FLOORPLAN_H
|
||||
#ifndef FLOORPLAN2_H
|
||||
#define FLOORPLAN2_H
|
||||
|
||||
#include <algorithm>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <initializer_list>
|
||||
@@ -11,6 +12,11 @@
|
||||
|
||||
namespace Floorplan {
|
||||
|
||||
/** convert string to upper case */
|
||||
inline std::string toUpperCase(std::string str) {
|
||||
std::transform(str.begin(), str.end(), str.begin(), ::toupper);
|
||||
return str;
|
||||
}
|
||||
|
||||
/** a free key-value meta element */
|
||||
struct Meta {
|
||||
@@ -138,6 +144,7 @@ namespace Floorplan {
|
||||
};
|
||||
|
||||
|
||||
|
||||
/** a POI located somewhere on a floor */
|
||||
struct POI {
|
||||
POIType type;
|
||||
@@ -154,7 +161,7 @@ namespace Floorplan {
|
||||
std::string mac;
|
||||
Point3 pos; // z is relative to the floor's height
|
||||
AccessPoint() : name(), mac(), pos() {;}
|
||||
AccessPoint(const std::string& name, const std::string& mac, const Point3& pos) : name(name), mac(mac), pos(pos) {;}
|
||||
AccessPoint(const std::string& name, const std::string& mac, const Point3& pos) : name(name), mac(toUpperCase(mac)), pos(pos) {;}
|
||||
bool operator == (const AccessPoint& o) const {return (o.name == name) && (o.mac == mac) && (o.pos == pos);}
|
||||
Point3 getPos(const Floor* f) const {return pos + Point3(0,0,f->atHeight);} // relative to the floor's ground
|
||||
};
|
||||
@@ -414,4 +421,4 @@ namespace Floorplan {
|
||||
|
||||
}
|
||||
|
||||
#endif // FLOORPLAN_H
|
||||
#endif // FLOORPLAN2_H
|
||||
|
||||
Reference in New Issue
Block a user