added support for pillars
some new helper methods/classes
This commit is contained in:
@@ -29,6 +29,18 @@ public:
|
||||
return std::make_pair(nullptr, nullptr);
|
||||
}
|
||||
|
||||
/** get the AP for the given Name [if available] */
|
||||
static std::pair<Floorplan::AccessPoint*, Floorplan::Floor*> getAPByName(const Floorplan::IndoorMap* map, const std::string& name) {
|
||||
for (Floorplan::Floor* f : map->floors) {
|
||||
for (Floorplan::AccessPoint* ap : f->accesspoints) {
|
||||
if (name == ap->name) {
|
||||
return std::make_pair(ap, f);
|
||||
}
|
||||
}
|
||||
}
|
||||
return std::make_pair(nullptr, nullptr);
|
||||
}
|
||||
|
||||
/** get all APs within the map */
|
||||
static std::vector<std::pair<Floorplan::AccessPoint*, Floorplan::Floor*>> getAPs(const Floorplan::IndoorMap* map) {
|
||||
std::vector<std::pair<Floorplan::AccessPoint*, Floorplan::Floor*>> res;
|
||||
@@ -40,6 +52,18 @@ public:
|
||||
return res;
|
||||
}
|
||||
|
||||
/** get the Fingerprint-Loation for the given Name [if available] */
|
||||
static std::pair<Floorplan::FingerprintLocation*, Floorplan::Floor*> getFingerprintLocationByName(const Floorplan::IndoorMap* map, const std::string& name) {
|
||||
for (Floorplan::Floor* f : map->floors) {
|
||||
for (Floorplan::FingerprintLocation* fpl : f->fpLocations) {
|
||||
if (name == fpl->name) {
|
||||
return std::make_pair(fpl, f);
|
||||
}
|
||||
}
|
||||
}
|
||||
return std::make_pair(nullptr, nullptr);
|
||||
}
|
||||
|
||||
/** get all ground-truth points within the map as hash-map: id->pos */
|
||||
static std::unordered_map<int, Point3> getGroundTruthPoints(const Floorplan::IndoorMap* map) {
|
||||
std::unordered_map<int, Point3> res;
|
||||
|
||||
Reference in New Issue
Block a user