48 lines
1.0 KiB
C++
Executable File
48 lines
1.0 KiB
C++
Executable File
#ifndef STRUCTS_H
|
|
#define STRUCTS_H
|
|
|
|
#include <Indoor/sensors/radio/setup/WiFiOptimizerLogDistCeiling.h>
|
|
#include <Indoor/floorplan/v2/FloorplanHelper.h>
|
|
|
|
struct OptStats {
|
|
|
|
const Point3 unknown = Point3(-1, -1, -1);
|
|
|
|
MACAddress mac;
|
|
std::string name; // AP's name from map (if known)
|
|
Point3 realPos = unknown; // real position from map (if known)
|
|
WiFiOptimizer::LogDistCeiling::Stats opt;
|
|
WiFiOptimizer::LogDistCeiling::APParams params;
|
|
|
|
const Point3 getRealEstDiff() const {
|
|
if (realPos == unknown) {throw Exception("error!");}
|
|
return realPos - getEstPos();
|
|
}
|
|
|
|
bool knownToMap() const {
|
|
return name != "";
|
|
}
|
|
|
|
float getEstErrorAvg() const {
|
|
return opt.error_db;
|
|
}
|
|
|
|
|
|
/** get the AP's estimation position */
|
|
Point3 getEstPos() const {
|
|
return Point3(params.x, params.y, params.z);
|
|
}
|
|
|
|
WiFiOptimizer::ErrorAtPosition getEstErrorMaxNeg() const {
|
|
return opt.getEstErrorMaxNeg();
|
|
}
|
|
|
|
WiFiOptimizer::ErrorAtPosition getEstErrorMaxPos() const {
|
|
return opt.getEstErrorMaxPos();
|
|
}
|
|
|
|
|
|
};
|
|
|
|
#endif // STRUCTS_H
|