Merge branch 'master' of https://git.frank-ebner.de/FHWS/FtmPrologic
This commit is contained in:
@@ -34,10 +34,10 @@ FILE(GLOB HEADERS
|
||||
Settings.h
|
||||
FtmKalman.h
|
||||
main.h
|
||||
mainFtm.h
|
||||
trilateration.h
|
||||
Plotta.h
|
||||
misc.h
|
||||
Eval.h
|
||||
)
|
||||
|
||||
|
||||
@@ -45,9 +45,10 @@ FILE(GLOB SOURCES
|
||||
../../Indoor/lib/tinyxml/tinyxml2.cpp
|
||||
../../Indoor/lib/Recast/*.cpp
|
||||
main.cpp
|
||||
mainFtm.cpp
|
||||
mainTrilat.cpp
|
||||
mainProb.cpp
|
||||
Eval.cpp
|
||||
FtmKalman.cpp
|
||||
)
|
||||
|
||||
|
||||
|
||||
70
code/Eval.cpp
Normal file
70
code/Eval.cpp
Normal file
@@ -0,0 +1,70 @@
|
||||
#include "Eval.h"
|
||||
|
||||
#include "Settings.h"
|
||||
|
||||
#include <Indoor/math/distribution/Normal.h>
|
||||
|
||||
double ftmEval(SensorMode UseSensor, const Timestamp& currentTime, const Point3& particlePos, const std::vector<WiFiMeasurement>& measurements, std::shared_ptr<std::unordered_map<MACAddress, Kalman>> ftmKalmanFilters)
|
||||
{
|
||||
double result = 1.0;
|
||||
|
||||
for (WiFiMeasurement wifi : measurements)
|
||||
{
|
||||
if (wifi.getNumSuccessfulMeasurements() < 3)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
const MACAddress& mac = wifi.getAP().getMAC();
|
||||
int nucIndex = Settings::nucIndex(mac);
|
||||
|
||||
const Point3 apPos = Settings::CurrentPath.nucInfo(nucIndex).position;
|
||||
// particlePos.z = 1.3; // smartphone höhe
|
||||
const float apDist = particlePos.getDistance(apPos);
|
||||
|
||||
// compute ftm distance
|
||||
float ftm_offset = Settings::CurrentPath.NUCs.at(mac).ftm_offset;
|
||||
float ftmDist = wifi.getFtmDist() + ftm_offset; // in m; plus static offset
|
||||
|
||||
float rssi_pathloss = Settings::CurrentPath.NUCs.at(mac).rssi_pathloss;
|
||||
float rssiDist = LogDistanceModel::rssiToDistance(-40, rssi_pathloss, wifi.getRSSI());
|
||||
|
||||
if (UseSensor == SensorMode::FTM)
|
||||
{
|
||||
if (ftmDist > 0)
|
||||
{
|
||||
//double sigma = wifi.getFtmDistStd()*wifi.getFtmDistStd(); // 3.5; // TODO
|
||||
double sigma = 5;
|
||||
|
||||
if (ftmKalmanFilters != nullptr)
|
||||
{
|
||||
Kalman& kalman = ftmKalmanFilters->at(mac);
|
||||
ftmDist = kalman.predict(currentTime, ftmDist);
|
||||
//sigma = std::sqrt(kalman.P(0, 0));
|
||||
|
||||
Assert::isTrue(sigma > 0, "sigma");
|
||||
|
||||
double x = Distribution::Normal<double>::getProbability(ftmDist, sigma, apDist);
|
||||
|
||||
result *= x;
|
||||
}
|
||||
else
|
||||
{
|
||||
double x = Distribution::Normal<double>::getProbability(ftmDist, sigma, apDist);
|
||||
|
||||
result *= x;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// RSSI
|
||||
double sigma = 5;
|
||||
|
||||
double x = Distribution::Normal<double>::getProbability(rssiDist, sigma, apDist);
|
||||
result *= x;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
23
code/Eval.h
Normal file
23
code/Eval.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
#include <Indoor/geo/Point3.h>
|
||||
|
||||
#include "FtmKalman.h"
|
||||
#include <Indoor/sensors/radio/WiFiMeasurements.h>
|
||||
#include <Indoor/sensors/radio/model/LogDistanceModel.h>
|
||||
|
||||
|
||||
enum class SensorMode
|
||||
{
|
||||
FTM,
|
||||
RSSI
|
||||
};
|
||||
|
||||
double ftmEval(SensorMode UseSensor,
|
||||
const Timestamp& currentTime,
|
||||
const Point3& particlePos,
|
||||
const std::vector<WiFiMeasurement>& measurements,
|
||||
std::shared_ptr<std::unordered_map<MACAddress, Kalman>> ftmKalmanFilters);
|
||||
51
code/FtmKalman.cpp
Normal file
51
code/FtmKalman.cpp
Normal file
@@ -0,0 +1,51 @@
|
||||
#include "FtmKalman.h"
|
||||
|
||||
#include <eigen3/Eigen/Eigen>
|
||||
|
||||
float Kalman::predict(const Timestamp timestamp, const float measurment)
|
||||
{
|
||||
constexpr auto square = [](float x) { return x * x; };
|
||||
const auto I = Eigen::Matrix2f::Identity();
|
||||
|
||||
Eigen::Map<Eigen::Matrix<float, 2, 1>> x(this->x);
|
||||
Eigen::Map<Eigen::Matrix<float, 2, 2>> P(this->P);
|
||||
|
||||
// init kalman filter
|
||||
if (isnan(lastTimestamp))
|
||||
{
|
||||
P << 10, 0,
|
||||
0, 10; // Initial Uncertainty
|
||||
|
||||
x << measurment,
|
||||
0;
|
||||
}
|
||||
|
||||
const float dt = isnan(lastTimestamp) ? 1 : timestamp.sec() - lastTimestamp;
|
||||
lastTimestamp = timestamp.sec();
|
||||
|
||||
Eigen::Matrix<float, 1, 2> H; // Measurement function
|
||||
H << 1, 0;
|
||||
|
||||
Eigen::Matrix2f A; // Transition Matrix
|
||||
A << 1, dt,
|
||||
0, 1;
|
||||
|
||||
Eigen::Matrix2f Q; // Process Noise Covariance
|
||||
Q << square(processNoiseDistance), 0,
|
||||
0, square(processNoiseVelocity);
|
||||
|
||||
// Prediction
|
||||
x = A * x; // Prädizierter Zustand aus Bisherigem und System
|
||||
P = A * P*A.transpose() + Q; // Prädizieren der Kovarianz
|
||||
|
||||
// Correction
|
||||
float Z = measurment;
|
||||
auto y = Z - (H*x); // Innovation aus Messwertdifferenz
|
||||
auto S = (H*P*H.transpose() + R); // Innovationskovarianz
|
||||
auto K = P * H.transpose()* (1 / S); //Filter-Matrix (Kalman-Gain)
|
||||
|
||||
x = x + (K*y); // aktualisieren des Systemzustands
|
||||
P = (I - (K*H))*P; // aktualisieren der Kovarianz
|
||||
|
||||
return x(0);
|
||||
}
|
||||
@@ -1,17 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include <eigen3/Eigen/Eigen>
|
||||
|
||||
#include <Indoor/data/Timestamp.h>
|
||||
|
||||
|
||||
struct Kalman
|
||||
{
|
||||
int nucID = 0; // debug only
|
||||
|
||||
Eigen::Matrix<float, 2, 1> x; // predicted state
|
||||
Eigen::Matrix<float, 2, 2> P; // Covariance
|
||||
|
||||
float x[2]; // predicted state
|
||||
float P[4]; // Covariance
|
||||
|
||||
float R = 30; // measurement noise covariance
|
||||
float processNoiseDistance; // stdDev
|
||||
float processNoiseVelocity; // stdDev
|
||||
@@ -28,50 +25,7 @@ struct Kalman
|
||||
: nucID(nucID), R(measStdDev*measStdDev), processNoiseDistance(processNoiseDistance), processNoiseVelocity(processNoiseVelocity)
|
||||
{}
|
||||
|
||||
float predict(const Timestamp timestamp, const float measurment)
|
||||
{
|
||||
constexpr auto square = [](float x) { return x * x; };
|
||||
const auto I = Eigen::Matrix2f::Identity();
|
||||
|
||||
// init kalman filter
|
||||
if (isnan(lastTimestamp))
|
||||
{
|
||||
P << 10, 0,
|
||||
0, 10; // Initial Uncertainty
|
||||
|
||||
x << measurment,
|
||||
0;
|
||||
}
|
||||
|
||||
const float dt = isnan(lastTimestamp) ? 1 : timestamp.sec() - lastTimestamp;
|
||||
lastTimestamp = timestamp.sec();
|
||||
|
||||
Eigen::Matrix<float, 1, 2> H; // Measurement function
|
||||
H << 1, 0;
|
||||
|
||||
Eigen::Matrix2f A; // Transition Matrix
|
||||
A << 1, dt,
|
||||
0, 1;
|
||||
|
||||
Eigen::Matrix2f Q; // Process Noise Covariance
|
||||
Q << square(processNoiseDistance), 0,
|
||||
0, square(processNoiseVelocity);
|
||||
|
||||
// Prediction
|
||||
x = A * x; // Prädizierter Zustand aus Bisherigem und System
|
||||
P = A * P*A.transpose()+Q; // Prädizieren der Kovarianz
|
||||
|
||||
// Correction
|
||||
float Z = measurment;
|
||||
auto y = Z - (H*x); // Innovation aus Messwertdifferenz
|
||||
auto S = (H*P*H.transpose()+R); // Innovationskovarianz
|
||||
auto K = P * H.transpose()* (1/S); //Filter-Matrix (Kalman-Gain)
|
||||
|
||||
x = x + (K*y); // aktualisieren des Systemzustands
|
||||
P = (I - (K*H))*P; // aktualisieren der Kovarianz
|
||||
|
||||
return x(0);
|
||||
}
|
||||
float predict(const Timestamp timestamp, const float measurment);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include <vector>
|
||||
#include <unordered_map>
|
||||
#include <iostream>
|
||||
#include <array>
|
||||
|
||||
namespace Plotta
|
||||
{
|
||||
@@ -39,6 +40,8 @@ namespace Plotta
|
||||
{
|
||||
// send data
|
||||
std::ofstream stream;
|
||||
stream.exceptions(stream.exceptions() | std::ios::failbit);
|
||||
|
||||
stream.open(dataFile);
|
||||
|
||||
std::time_t t = std::time(nullptr);
|
||||
@@ -126,6 +129,12 @@ namespace Plotta
|
||||
return writeNumpyArray(stream, list.begin(), list.end());
|
||||
}
|
||||
|
||||
template<typename T, size_t S>
|
||||
plottastream& operator<<(plottastream& stream, const std::array<T, S>& list)
|
||||
{
|
||||
return writeNumpyArray(stream, list.begin(), list.end());
|
||||
}
|
||||
|
||||
|
||||
template<typename T>
|
||||
static plottastream& operator<<(plottastream& stream, const T& value)
|
||||
|
||||
@@ -108,6 +108,7 @@ public:
|
||||
|
||||
K::GnuplotSplotElementEmpty emptyElem;
|
||||
|
||||
std::vector<int> distanceCircles;
|
||||
|
||||
K::GnuplotSplotElementPM3D pm3doutline;
|
||||
|
||||
@@ -186,6 +187,31 @@ public:
|
||||
|
||||
}
|
||||
|
||||
void addDistanceCircle(const Point2& center, float radius, const K::GnuplotColor& strokeColor)
|
||||
{
|
||||
auto c = K::GnuplotCoordinate2(center.x, center.y, K::GnuplotCoordinateSystem::FIRST);
|
||||
auto r = K::GnuplotCoordinate1(radius, K::GnuplotCoordinateSystem::FIRST);
|
||||
|
||||
K::GnuplotFill fill(K::GnuplotFillStyle::EMPTY, K::GnuplotColor::fromRGB(0, 0, 0));
|
||||
K::GnuplotStroke stroke(K::GnuplotDashtype::SOLID, 1, strokeColor);
|
||||
|
||||
K::GnuplotObjectCircle* obj = new K::GnuplotObjectCircle(c, r, fill, stroke);
|
||||
|
||||
splot.getObjects().add(obj);
|
||||
|
||||
distanceCircles.push_back(obj->getID());
|
||||
}
|
||||
|
||||
void clearDistanceCircles()
|
||||
{
|
||||
for (int oldID : distanceCircles)
|
||||
{
|
||||
splot.getObjects().remove(oldID);
|
||||
}
|
||||
|
||||
distanceCircles.clear();
|
||||
}
|
||||
|
||||
void addBBoxes(const BBoxes3& boxes, const K::GnuplotColor& c) {
|
||||
for (BBox3 bb : boxes.get()) {
|
||||
//&&addBBoxPoly(bb, c);
|
||||
@@ -554,9 +580,14 @@ public:
|
||||
|
||||
void saveToFile(std::ofstream& stream){
|
||||
gp.draw(splot);
|
||||
|
||||
#if defined(_WINDOWS)
|
||||
stream << "set terminal windows size 2000,1500\n";
|
||||
#elif
|
||||
stream << "set terminal x11 size 2000,1500\n";
|
||||
#endif
|
||||
stream << gp.getBuffer();
|
||||
stream << "pause -1\n";
|
||||
// stream << "pause -1\n";
|
||||
gp.flush();
|
||||
}
|
||||
|
||||
@@ -588,8 +619,8 @@ public:
|
||||
// K::GnuplotPoint3(bbox.getMax().x, bbox.getMax().y, bbox.getMax().z)
|
||||
// );
|
||||
|
||||
splot.getAxisX().setRange(K::GnuplotAxis::Range(bbox.getMin().x, bbox.getMax().x));
|
||||
splot.getAxisY().setRange(K::GnuplotAxis::Range(bbox.getMin().y, bbox.getMax().y));
|
||||
splot.getAxisX().setRange(K::GnuplotAxis::Range(bbox.getMin().x-5, bbox.getMax().x+5));
|
||||
splot.getAxisY().setRange(K::GnuplotAxis::Range(bbox.getMin().y-5, bbox.getMax().y+5));
|
||||
splot.getAxisZ().setRange(K::GnuplotAxis::Range(0 /*bbox.getMin().z*/, bbox.getMax().z));
|
||||
|
||||
// process each selected floor
|
||||
|
||||
205
code/Settings.h
205
code/Settings.h
@@ -2,100 +2,17 @@
|
||||
|
||||
#include <cassert>
|
||||
|
||||
#include <Indoor/grid/GridPoint.h>
|
||||
#include <Indoor/data/Timestamp.h>
|
||||
#include <Indoor/sensors/radio/VAPGrouper.h>
|
||||
|
||||
namespace Settings {
|
||||
|
||||
const bool useKLB = false;
|
||||
|
||||
const int numParticles = 5000;
|
||||
const int numBSParticles = 50;
|
||||
|
||||
namespace IMU {
|
||||
const float turnSigma = 2.5; // 3.5
|
||||
const float stepLength = 1.00;
|
||||
const float stepSigma = 0.15; //toni changed
|
||||
}
|
||||
|
||||
const float smartphoneAboveGround = 1.3;
|
||||
|
||||
const float offlineSensorSpeedup = 2;
|
||||
|
||||
namespace Grid {
|
||||
constexpr int gridSize_cm = 20;
|
||||
}
|
||||
|
||||
namespace Smoothing {
|
||||
const bool activated = true;
|
||||
const double stepLength = 0.7;
|
||||
const double stepSigma = 0.2;
|
||||
const double headingSigma = 25.0;
|
||||
const double zChange = 0.0; // mu change in height between two time steps
|
||||
const double zSigma = 0.1;
|
||||
const int lag = 5;
|
||||
|
||||
}
|
||||
|
||||
namespace KDE {
|
||||
const Point2 bandwidth(1,1);
|
||||
const float gridSize = 0.2;
|
||||
}
|
||||
|
||||
namespace KDE3D {
|
||||
const Point3 bandwidth(1, 1, 1);
|
||||
const Point3 gridSize(0.2, 0.2, 1); // in meter
|
||||
}
|
||||
|
||||
//const GridPoint destination = GridPoint(70*100, 35*100, 0*100); // use destination
|
||||
const GridPoint destination = GridPoint(0,0,0); // do not use destination
|
||||
|
||||
namespace SensorDebug {
|
||||
const Timestamp updateEvery = Timestamp::fromMS(200);
|
||||
}
|
||||
|
||||
namespace WiFiModel {
|
||||
constexpr float sigma = 8.0;
|
||||
/** if the wifi-signal-strengths are stored on the grid-nodes, this needs a grid rebuild! */
|
||||
constexpr float TXP = -45;
|
||||
constexpr float EXP = 2.3;
|
||||
constexpr float WAF = -11.0;
|
||||
|
||||
const bool optimize = false;
|
||||
const bool useRegionalOpt = false;
|
||||
|
||||
// how to perform VAP grouping. see
|
||||
// - calibration in Controller.cpp
|
||||
// - eval in Filter.h
|
||||
// NOTE: maybe the UAH does not allow valid VAP grouping? delete the grid and rebuild without!
|
||||
const VAPGrouper vg_calib = VAPGrouper(VAPGrouper::Mode::LAST_MAC_DIGIT_TO_ZERO, VAPGrouper::Aggregation::MAXIMUM, VAPGrouper::TimeAggregation::AVERAGE, 1); // Frank: WAS MAXIMUM
|
||||
const VAPGrouper vg_eval = VAPGrouper(VAPGrouper::Mode::LAST_MAC_DIGIT_TO_ZERO, VAPGrouper::Aggregation::MAXIMUM, VAPGrouper::TimeAggregation::AVERAGE, 1); // Frank: WAS MAXIMUM
|
||||
}
|
||||
|
||||
namespace BeaconModel {
|
||||
constexpr float sigma = 8.0;
|
||||
constexpr float TXP = -71;
|
||||
constexpr float EXP = 1.5;
|
||||
constexpr float WAF = -20.0; //-5 //20??
|
||||
}
|
||||
|
||||
namespace MapView3D {
|
||||
const int maxColorPoints = 1000;
|
||||
constexpr int fps = 15;
|
||||
const Timestamp msPerFrame = Timestamp::fromMS(1000/fps);
|
||||
}
|
||||
|
||||
namespace Filter {
|
||||
const Timestamp updateEvery = Timestamp::fromMS(500);
|
||||
constexpr bool useMainThread = false; // perform filtering in the main thread
|
||||
}
|
||||
|
||||
const std::string mapDir = "../map/";
|
||||
const std::string dataDir = "../measurements/data/";
|
||||
const std::string errorDir = "../measurements/error/";
|
||||
const std::string plotDataDir = "../plots/data/";
|
||||
const std::string outputDir = "../output/";
|
||||
|
||||
const bool UseKalman = false;
|
||||
const bool UseKalman = true;
|
||||
|
||||
/** describes one dataset (map, training, parameter-estimation, ...) */
|
||||
|
||||
@@ -110,7 +27,9 @@ namespace Settings {
|
||||
if (addr == Settings::NUC2) return 1;
|
||||
if (addr == Settings::NUC3) return 2;
|
||||
if (addr == Settings::NUC4) return 3;
|
||||
else assert(false);
|
||||
else {
|
||||
assert(false); return 0;
|
||||
}
|
||||
}
|
||||
|
||||
static MACAddress nucFromIndex(int idx)
|
||||
@@ -121,7 +40,7 @@ namespace Settings {
|
||||
case 1: return NUC2;
|
||||
case 2: return NUC3;
|
||||
case 3: return NUC4;
|
||||
default: assert(false);
|
||||
default: assert(false); return NUC1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -138,21 +57,29 @@ namespace Settings {
|
||||
};
|
||||
|
||||
struct DataSetup {
|
||||
std::string name;
|
||||
std::string map;
|
||||
std::vector<std::string> training;
|
||||
std::unordered_map<MACAddress, NUCSettings> NUCs;
|
||||
std::vector<int> gtPath;
|
||||
bool HasNanoSecondTimestamps;
|
||||
|
||||
NUCSettings nucInfo(int idx) const
|
||||
{
|
||||
return NUCs.at(nucFromIndex(idx));
|
||||
}
|
||||
|
||||
NUCSettings nuc(const MACAddress& mac) const
|
||||
{
|
||||
return NUCs.at(mac);
|
||||
}
|
||||
};
|
||||
|
||||
/** all configured datasets */
|
||||
const struct Data {
|
||||
|
||||
const DataSetup Path0 = {
|
||||
"path0",
|
||||
mapDir + "map0_ap_path0.xml",
|
||||
{
|
||||
dataDir + "Pixel2/Path0_0605.csv",
|
||||
@@ -164,11 +91,13 @@ namespace Settings {
|
||||
{ NUC3, {3, {21.6, 19.1, 0.8}, 1.75, 3.375, 6.107} }, // NUC 3
|
||||
{ NUC4, {4, {20.8, 27.1, 0.8}, 2.75, 2.750, 3.985} }, // NUC 4
|
||||
},
|
||||
{ 0, 1, 2, 3 }
|
||||
{ 0, 1, 2, 3 },
|
||||
false
|
||||
};
|
||||
|
||||
// 1 Path: U von TR nach TD und zurück;
|
||||
const DataSetup Path1 = {
|
||||
"path1",
|
||||
mapDir + "map2_ap_path1.xml",
|
||||
{
|
||||
dataDir + "Pixel2/path1/1560153927208_2_1.csv",
|
||||
@@ -184,11 +113,13 @@ namespace Settings {
|
||||
{ NUC3, {3, {21.3, 19.3, 0.8}, 2.50, 0, 10.0f} }, // NUC 3
|
||||
{ NUC4, {4, {20.6, 26.8, 0.8}, 3.00, 0, 10.0f} }, // NUC 4
|
||||
},
|
||||
{ 1, 2, 6, 7, 6, 2, 1 }
|
||||
{ 1, 2, 6, 7, 6, 2, 1 },
|
||||
false
|
||||
};
|
||||
|
||||
// 2 Path: Wie 2 nur von TD zu TR
|
||||
const DataSetup Path2 = {
|
||||
"path2",
|
||||
mapDir + "map2_ap_path1.xml",
|
||||
{
|
||||
dataDir + "Pixel2/path2/1560154622883_3_1.csv",
|
||||
@@ -204,12 +135,14 @@ namespace Settings {
|
||||
{ NUC3, {3, {21.3, 19.3, 0.8}, 2.25, 0, 3.0f} }, // NUC 3
|
||||
{ NUC4, {4, {20.6, 26.8, 0.8}, 2.00, 0, 3.0f} }, // NUC 4
|
||||
},
|
||||
{ 7, 6, 2, 1, 2, 6, 7 }
|
||||
{ 7, 6, 2, 1, 2, 6, 7 },
|
||||
false
|
||||
};
|
||||
|
||||
|
||||
// 3 Path: U von TR nach TD; 4 mal das U
|
||||
const DataSetup Path3 = {
|
||||
"path3",
|
||||
mapDir + "map2_ap_path2.xml",
|
||||
{
|
||||
dataDir + "Pixel2/path3/1560155227376_4_1.csv",
|
||||
@@ -225,11 +158,13 @@ namespace Settings {
|
||||
{ NUC3, {3, {21.3, 19.3, 0.8}, 1.75, 0, 3.0f} }, // NUC 3
|
||||
{ NUC4, {4, {20.6, 26.8, 0.8}, 2.25, 0, 3.0f} }, // NUC 4
|
||||
},
|
||||
{ 1, 2, 6, 7, 6, 2, 1, 2, 6, 7, 6, 2, 1 }
|
||||
{ 1, 2, 6, 7, 6, 2, 1, 2, 6, 7, 6, 2, 1 },
|
||||
false
|
||||
};
|
||||
|
||||
// 4 Path: In Räumen
|
||||
const DataSetup Path4 = {
|
||||
"path4",
|
||||
mapDir + "map2_ap_path2.xml",
|
||||
{
|
||||
dataDir + "Pixel2/path4/1560156876457_5_1.csv",
|
||||
@@ -245,12 +180,14 @@ namespace Settings {
|
||||
{ NUC3, {3, {21.3, 19.3, 0.8}, 2.25, 0, 3.0f} }, // NUC 3
|
||||
{ NUC4, {4, {20.6, 26.8, 0.8}, 2.25, 0, 3.0f} }, // NUC 4
|
||||
},
|
||||
{ 0, 1, 2, 3, 2, 6, 5, 6, 7, 8 }
|
||||
{ 0, 1, 2, 3, 2, 6, 5, 6, 7, 8 },
|
||||
false
|
||||
};
|
||||
|
||||
|
||||
// 5 Path: In Räumen extendend
|
||||
const DataSetup Path5 = {
|
||||
"path5",
|
||||
mapDir + "map2_ap_path2.xml",
|
||||
{
|
||||
dataDir + "Pixel2/path5/1560158444772_6_1.csv",
|
||||
@@ -266,12 +203,90 @@ namespace Settings {
|
||||
{ NUC3, {3, {21.3, 19.3, 0.8}, 2.75, 3.250, 3.0f} }, // NUC 3
|
||||
{ NUC4, {4, {20.6, 26.8, 0.8}, 2.25, 3.375, 3.0f} }, // NUC 4
|
||||
},
|
||||
{ 0, 1, 2, 11, 10, 9, 10, 11, 2, 6, 5, 12, 13, 12, 5, 6, 7, 8 }
|
||||
{ 0, 1, 2, 11, 10, 9, 10, 11, 2, 6, 5, 12, 13, 12, 5, 6, 7, 8 },
|
||||
false
|
||||
};
|
||||
|
||||
const DataSetup CurrentPath = Path5;
|
||||
|
||||
// 6 Path: SHL Path 1
|
||||
const DataSetup Path6 = {
|
||||
"path6",
|
||||
mapDir + "shl.xml",
|
||||
{
|
||||
dataDir + "Pixel2/path6/14681054221905_6_1.csv"
|
||||
},
|
||||
{
|
||||
// NUC, ID Pos X Y Z offset loss kalman stddev
|
||||
{ NUC1, {1, { 54, 46, 0.8}, 5.00, 3.375, 3.0f} }, // NUC 1
|
||||
{ NUC2, {2, { 45, 37, 0.8}, 5.00, 3.375, 3.0f} }, // NUC 2
|
||||
{ NUC3, {3, { 27, 45, 0.8}, 5.00, 3.250, 3.0f} }, // NUC 3
|
||||
{ NUC4, {4, { 16, 36, 0.8}, 5.75, 3.375, 3.0f} }, // NUC 4
|
||||
},
|
||||
{ 100, 101, 102, 103, 104, 103, 102, 101, 100 },
|
||||
true
|
||||
};
|
||||
|
||||
// 7 Path: SHL Path 2; Versuche mit NUCs in den Räumen war nicht vielversprechend ...
|
||||
const DataSetup Path7 = {
|
||||
"path7",
|
||||
mapDir + "shl.xml",
|
||||
{
|
||||
dataDir + "Pixel2/path7/23388354821394.csv",
|
||||
dataDir + "Pixel2/path7/23569363647863.csv",
|
||||
dataDir + "Pixel2/path7/23776390928852.csv",
|
||||
dataDir + "Pixel2/path7/23938602403553.csv"
|
||||
},
|
||||
{
|
||||
// NUC, ID Pos X Y Z offset loss kalman stddev
|
||||
{ NUC1, {1, { 54, 46, 0.8}, 0.0, 3.375, 3.0f} }, // NUC 1
|
||||
{ NUC2, {2, { 45, 37, 0.8}, 0.0, 3.375, 3.0f} }, // NUC 2
|
||||
{ NUC3, {3, { 27, 45, 0.8}, 0.0, 3.250, 3.0f} }, // NUC 3
|
||||
{ NUC4, {4, { 16, 36, 0.8}, 0.0, 3.375, 3.0f} }, // NUC 4
|
||||
},
|
||||
{ 100, 102, 103, 104, 105, 104, 103, 102, 100 },
|
||||
true
|
||||
};
|
||||
|
||||
// 8 Path: Wie SHL Path 2 nur, dass die NUCs im Gang stehen
|
||||
const DataSetup Path8 = {
|
||||
"path8",
|
||||
mapDir + "shl.xml",
|
||||
{
|
||||
dataDir + "Pixel2/path8/25967118530318.csv", // gang
|
||||
dataDir + "Pixel2/path8/25439520303384.csv", // tür
|
||||
},
|
||||
{
|
||||
// NUC, ID Pos X Y Z offset loss kalman stddev
|
||||
{ NUC1, {1, { 55, 44, 0.8}, 0.00, 2.500, 3.0f} }, // NUC 1
|
||||
{ NUC2, {2, { 46, 40, 0.8}, 0.00, 2.500, 3.0f} }, // NUC 2
|
||||
{ NUC3, {3, { 27, 44, 0.8}, 0.00, 2.500, 3.0f} }, // NUC 3
|
||||
{ NUC4, {4, { 15, 40, 0.8}, 0.00, 2.500, 3.0f} }, // NUC 4
|
||||
},
|
||||
{ 100, 102, 103, 104, 105, 104, 103, 102, 100 },
|
||||
true
|
||||
};
|
||||
|
||||
// 9 Path: SHL Path 3, NUCs stehen im Gang
|
||||
const DataSetup Path9 = {
|
||||
"path9",
|
||||
mapDir + "shl_nuc_gang.xml",
|
||||
{
|
||||
dataDir + "Pixel2/path9/27911186920065.csv",
|
||||
dataDir + "Pixel2/path9/28255150484121.csv",
|
||||
dataDir + "Pixel2/path9/28404719230167.csv",
|
||||
},
|
||||
{
|
||||
// NUC, ID Pos X Y Z offset loss kalman stddev
|
||||
{ NUC1, {1, { 55, 44, 0.8}, 0.00, 2.500, 3.0f} }, // NUC 1
|
||||
{ NUC2, {2, { 46, 40, 0.8}, 0.00, 2.500, 3.0f} }, // NUC 2
|
||||
{ NUC3, {3, { 27, 44, 0.8}, 0.00, 2.500, 3.0f} }, // NUC 3
|
||||
{ NUC4, {4, { 15, 40, 0.8}, 0.00, 2.500, 3.0f} }, // NUC 4
|
||||
},
|
||||
{ 200, 201, 203, 104, 204, 205, 206, 207, 206, 208, 209, 210, 211, 212 },
|
||||
true
|
||||
};
|
||||
} data;
|
||||
|
||||
static DataSetup CurrentPath = data.Path7;
|
||||
}
|
||||
|
||||
|
||||
107
code/filter.h
107
code/filter.h
@@ -3,7 +3,9 @@
|
||||
#include "mesh.h"
|
||||
#include "Settings.h"
|
||||
#include <omp.h>
|
||||
#include <array>
|
||||
|
||||
#include <Indoor/Assertions.h>
|
||||
#include <Indoor/geo/Heading.h>
|
||||
#include <Indoor/math/distribution/Uniform.h>
|
||||
#include <Indoor/math/distribution/Normal.h>
|
||||
@@ -32,6 +34,7 @@
|
||||
#include <Indoor/sensors/activity/ActivityDetector.h>
|
||||
|
||||
#include "FtmKalman.h"
|
||||
#include "Eval.h"
|
||||
|
||||
struct MyState {
|
||||
|
||||
@@ -111,19 +114,13 @@ struct MyControl {
|
||||
|
||||
struct MyObservation {
|
||||
|
||||
// pressure
|
||||
float sigmaPressure = 0.10f;
|
||||
float relativePressure = 0;
|
||||
|
||||
//wifi
|
||||
std::unordered_map<MACAddress, WiFiMeasurement> wifi;
|
||||
std::unordered_map<MACAddress, WiFiMeasurement> wifi; // deprecated
|
||||
|
||||
std::vector<WiFiMeasurement> ftm;
|
||||
|
||||
//time
|
||||
Timestamp currentTime;
|
||||
|
||||
//activity
|
||||
Activity activity;
|
||||
|
||||
};
|
||||
|
||||
class MyPFInitUniform : public SMC::ParticleFilterInitializer<MyState> {
|
||||
@@ -183,8 +180,10 @@ class MyPFTransStatic : public SMC::ParticleFilterTransition<MyState, MyControl>
|
||||
struct MyPFTransRandom : public SMC::ParticleFilterTransition<MyState, MyControl>{
|
||||
|
||||
Distribution::Normal<float> dStepSize;
|
||||
Distribution::Uniform<float> dHeading;
|
||||
|
||||
MyPFTransRandom()
|
||||
: dStepSize(0.0f, 0.6f)
|
||||
: dStepSize(2.0f, 0.2f), dHeading(0, 2*M_PI)
|
||||
{}
|
||||
|
||||
void transition(std::vector<SMC::Particle<MyState>>& particles, const MyControl* control) override {
|
||||
@@ -192,8 +191,12 @@ struct MyPFTransRandom : public SMC::ParticleFilterTransition<MyState, MyControl
|
||||
#pragma omp parallel for num_threads(3)
|
||||
for (int i = 0; i < particles.size(); ++i) {
|
||||
SMC::Particle<MyState>& p = particles[i];
|
||||
p.state.pos.pos.x += dStepSize.draw();
|
||||
p.state.pos.pos.y += dStepSize.draw();
|
||||
|
||||
const float angle = dHeading.draw();
|
||||
const float stepSize = dStepSize.draw();
|
||||
|
||||
p.state.pos.pos.x += std::cos(angle) * stepSize;
|
||||
p.state.pos.pos.y += std::sin(angle) * stepSize;
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -260,95 +263,35 @@ public:
|
||||
//control->afterEval();
|
||||
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
class MyPFEval : public SMC::ParticleFilterEvaluation<MyState, MyObservation> {
|
||||
|
||||
//TODO: add this to transition probability
|
||||
double getStairProb(const SMC::Particle<MyState>& p, const Activity act) {
|
||||
|
||||
const float kappa = 0.75;
|
||||
|
||||
switch (act) {
|
||||
|
||||
case Activity::WALKING:
|
||||
if (p.state.pos.tria->getType() == (int) NM::NavMeshType::FLOOR_INDOOR) {return kappa;}
|
||||
if (p.state.pos.tria->getType() == (int) NM::NavMeshType::DOOR) {return kappa;}
|
||||
if (p.state.pos.tria->getType() == (int) NM::NavMeshType::STAIR_LEVELED) {return kappa;}
|
||||
{return 1-kappa;}
|
||||
|
||||
case Activity::WALKING_UP:
|
||||
case Activity::WALKING_DOWN:
|
||||
if (p.state.pos.tria->getType() == (int) NM::NavMeshType::STAIR_SKEWED) {return kappa;}
|
||||
if (p.state.pos.tria->getType() == (int) NM::NavMeshType::STAIR_LEVELED) {return kappa;}
|
||||
if (p.state.pos.tria->getType() == (int) NM::NavMeshType::ELEVATOR) {return kappa;}
|
||||
{return 1-kappa;}
|
||||
}
|
||||
return 1.0;
|
||||
}
|
||||
|
||||
public:
|
||||
struct MyPFEval : public SMC::ParticleFilterEvaluation<MyState, MyObservation> {
|
||||
|
||||
// FRANK
|
||||
MyPFEval() { };
|
||||
|
||||
bool assignProps = false;
|
||||
|
||||
std::shared_ptr<std::unordered_map<MACAddress, Kalman>> kalmanMap;
|
||||
std::shared_ptr<std::unordered_map<MACAddress, Kalman>> ftmKalmanFilters;
|
||||
|
||||
virtual double evaluation(std::vector<SMC::Particle<MyState>>& particles, const MyObservation& observation) override {
|
||||
|
||||
double sum = 0;
|
||||
|
||||
//#pragma omp parallel for num_threads(3)
|
||||
|
||||
#pragma omp parallel for num_threads(3)
|
||||
for (int i = 0; i < particles.size(); ++i) {
|
||||
SMC::Particle<MyState>& p = particles[i];
|
||||
|
||||
double pFtm = 1.0;
|
||||
auto kalmanFilters = ftmKalmanFilters;
|
||||
|
||||
if (observation.wifi.size() == 0)
|
||||
if (!Settings::UseKalman)
|
||||
{
|
||||
printf("");
|
||||
kalmanFilters = nullptr;
|
||||
}
|
||||
|
||||
for (auto& wifi : observation.wifi) {
|
||||
|
||||
if ( (true && wifi.second.getAP().getMAC() == Settings::NUC1)
|
||||
|| (true && wifi.second.getAP().getMAC() == Settings::NUC2)
|
||||
|| (true && wifi.second.getAP().getMAC() == Settings::NUC3)
|
||||
|| (true && wifi.second.getAP().getMAC() == Settings::NUC4)
|
||||
)
|
||||
{
|
||||
float rssi_pathloss = Settings::data.CurrentPath.NUCs.at(wifi.second.getAP().getMAC()).rssi_pathloss;
|
||||
|
||||
float rssiDist = LogDistanceModel::rssiToDistance(-40, rssi_pathloss, wifi.second.getRSSI());
|
||||
float ftmDist = wifi.second.getFtmDist();
|
||||
|
||||
Point3 apPos = Settings::data.CurrentPath.NUCs.find(wifi.first)->second.position;
|
||||
Point3 particlePos = p.state.pos.pos;
|
||||
particlePos.z = 1.3; // smartphone höhe
|
||||
float apDist = particlePos.getDistance(apPos);
|
||||
|
||||
if (Settings::UseKalman)
|
||||
{
|
||||
auto kalman = kalmanMap->at(wifi.second.getAP().getMAC());
|
||||
pFtm *= Distribution::Normal<float>::getProbability(ftmDist, std::sqrt(kalman.P(0,0)), apDist);
|
||||
}
|
||||
else
|
||||
{
|
||||
pFtm *= Distribution::Normal<float>::getProbability(apDist, 3.5, ftmDist);
|
||||
//pFtm *= Distribution::Region<float>::getProbability(apDist, 3.5/2, ftmDist);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
double prob = pFtm;
|
||||
double prob = ftmEval(SensorMode::FTM, observation.currentTime, p.state.pos.pos, observation.ftm, kalmanFilters);
|
||||
|
||||
if (assignProps)
|
||||
p.weight = prob; // p.weight *= prob
|
||||
p.weight = prob;
|
||||
else
|
||||
p.weight *= prob;
|
||||
|
||||
@@ -357,9 +300,7 @@ public:
|
||||
}
|
||||
|
||||
return sum;
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
402
code/main.cpp
402
code/main.cpp
@@ -5,6 +5,7 @@
|
||||
#include "Settings.h"
|
||||
#include "meshPlotter.h"
|
||||
#include "Plotty.h"
|
||||
#include "Plotta.h"
|
||||
|
||||
#include <array>
|
||||
#include <memory>
|
||||
@@ -27,7 +28,6 @@
|
||||
#include <Indoor/math/stats/Statistics.h>
|
||||
|
||||
#include "FtmKalman.h"
|
||||
#include "mainFtm.h"
|
||||
#include "misc.h"
|
||||
|
||||
#include <sys/stat.h>
|
||||
@@ -50,7 +50,7 @@ std::vector<std::tuple<float, float, float>> getFtmValues(Offline::FileReader& f
|
||||
|
||||
if (wifi.getAP().getMAC() == nuc)
|
||||
{
|
||||
Point3 apPos = Settings::data.CurrentPath.NUCs.find(wifi.getAP().getMAC())->second.position;
|
||||
Point3 apPos = Settings::CurrentPath.NUCs.find(wifi.getAP().getMAC())->second.position;
|
||||
float apDist = gtPos.getDistance(apPos);
|
||||
float ftmDist = wifi.getFtmDist();
|
||||
float rssi = wifi.getRSSI();
|
||||
@@ -155,9 +155,9 @@ void exportFtmValues(Offline::FileReader& fr, Interpolator<uint64_t, Point3>& gt
|
||||
|
||||
auto wifi = fr.getWifiFtm()[e.idx].data;
|
||||
|
||||
int nucid = Settings::data.CurrentPath.NUCs.at(wifi.getAP().getMAC()).ID;
|
||||
float ftm_offset = Settings::data.CurrentPath.NUCs.at(wifi.getAP().getMAC()).ftm_offset;
|
||||
float rssi_pathloss = Settings::data.CurrentPath.NUCs.at(wifi.getAP().getMAC()).rssi_pathloss;
|
||||
int nucid = Settings::CurrentPath.NUCs.at(wifi.getAP().getMAC()).ID;
|
||||
float ftm_offset = Settings::CurrentPath.NUCs.at(wifi.getAP().getMAC()).ftm_offset;
|
||||
float rssi_pathloss = Settings::CurrentPath.NUCs.at(wifi.getAP().getMAC()).rssi_pathloss;
|
||||
|
||||
float rssiDist = LogDistanceModel::rssiToDistance(-40, rssi_pathloss, wifi.getRSSI());
|
||||
float ftmDist = wifi.getFtmDist() + ftm_offset; //in m; plus static offset
|
||||
@@ -165,7 +165,7 @@ void exportFtmValues(Offline::FileReader& fr, Interpolator<uint64_t, Point3>& gt
|
||||
int numMeas = wifi.getNumAttemptedMeasurements();
|
||||
int numSuccessMeas = wifi.getNumSuccessfulMeasurements();
|
||||
|
||||
Point3 apPos = Settings::data.CurrentPath.NUCs.find(wifi.getAP().getMAC())->second.position;
|
||||
Point3 apPos = Settings::CurrentPath.NUCs.find(wifi.getAP().getMAC())->second.position;
|
||||
float apDist = gtPos.getDistance(apPos);
|
||||
|
||||
fs << ts.ms() << ";" << nucid << ";" << apDist << ";" << rssiDist << ";" << ftmDist << ";" << ftmStdDev << ";" << numMeas << ";" << numSuccessMeas << "\n";
|
||||
@@ -180,18 +180,18 @@ void exportFtmValues(Offline::FileReader& fr, Interpolator<uint64_t, Point3>& gt
|
||||
static float kalman_procNoiseDistStdDev = 1.2f; // standard deviation of distance for process noise
|
||||
static float kalman_procNoiseVelStdDev = 0.1f; // standard deviation of velocity for process noise
|
||||
|
||||
static Stats::Statistics<float> run(Settings::DataSetup setup, int walkIdx, std::string folder) {
|
||||
static CombinedStats<float> run(Settings::DataSetup setup, int walkIdx, std::string folder) {
|
||||
|
||||
// reading file
|
||||
std::string currDir = std::filesystem::current_path().string();
|
||||
|
||||
Floorplan::IndoorMap* map = Floorplan::Reader::readFromFile(setup.map);
|
||||
Offline::FileReader fr(setup.training[walkIdx]);
|
||||
|
||||
Offline::FileReader fr(setup.training[walkIdx], setup.HasNanoSecondTimestamps);
|
||||
|
||||
// ground truth
|
||||
std::vector<int> gtPath = setup.gtPath;
|
||||
Interpolator<uint64_t, Point3> gtInterpolator = fr.getGroundTruthPath(map, gtPath);
|
||||
Stats::Statistics<float> errorStats;
|
||||
CombinedStats<float> errorStats;
|
||||
|
||||
//calculate distance of path
|
||||
std::vector<Interpolator<uint64_t, Point3>::InterpolatorEntry> gtEntries = gtInterpolator.getEntries();
|
||||
@@ -214,6 +214,13 @@ static Stats::Statistics<float> run(Settings::DataSetup setup, int walkIdx, std:
|
||||
std::ofstream errorFile;
|
||||
errorFile.open (evalDir.string() + "/" + std::to_string(walkIdx) + "_" + std::to_string(t) + ".csv");
|
||||
|
||||
// Output dir
|
||||
auto outputDir = std::filesystem::path(Settings::outputDir);
|
||||
outputDir.append(Settings::CurrentPath.name + "_" + std::to_string(walkIdx));
|
||||
|
||||
if (!std::filesystem::exists(outputDir)) {
|
||||
std::filesystem::create_directories(outputDir);
|
||||
}
|
||||
|
||||
// wifi
|
||||
auto kalmanMap = std::make_shared<std::unordered_map<MACAddress, Kalman>>();
|
||||
@@ -232,13 +239,6 @@ static Stats::Statistics<float> run(Settings::DataSetup setup, int walkIdx, std:
|
||||
MyNavMeshFactory fac(&mesh, set);
|
||||
fac.build(map);
|
||||
|
||||
const Point3 srcPath0(9.8, 24.9, 0); // fixed start pos
|
||||
|
||||
// add shortest-path to destination
|
||||
//const Point3 dst(51, 45, 1.7);
|
||||
//const Point3 dst(25, 45, 0);
|
||||
//NM::NavMeshDijkstra::stamp<MyNavMeshTriangle>(mesh, dst);
|
||||
|
||||
// debug show
|
||||
//MeshPlotter dbg;
|
||||
//dbg.addFloors(map);
|
||||
@@ -252,10 +252,10 @@ static Stats::Statistics<float> run(Settings::DataSetup setup, int walkIdx, std:
|
||||
plot.setGroundTruth(gtPath);
|
||||
plot.setView(30, 0);
|
||||
// APs Positions
|
||||
plot.addCircle(100000 + 0, Settings::data.CurrentPath.nucInfo(0).position.xy(), 0.05);
|
||||
plot.addCircle(100000 + 1, Settings::data.CurrentPath.nucInfo(1).position.xy(), 0.05);
|
||||
plot.addCircle(100000 + 2, Settings::data.CurrentPath.nucInfo(2).position.xy(), 0.05);
|
||||
plot.addCircle(100000 + 3, Settings::data.CurrentPath.nucInfo(3).position.xy(), 0.05);
|
||||
plot.addCircle(100000 + 0, Settings::CurrentPath.nucInfo(0).position.xy(), 0.1);
|
||||
plot.addCircle(100000 + 1, Settings::CurrentPath.nucInfo(1).position.xy(), 0.1);
|
||||
plot.addCircle(100000 + 2, Settings::CurrentPath.nucInfo(2).position.xy(), 0.1);
|
||||
plot.addCircle(100000 + 3, Settings::CurrentPath.nucInfo(3).position.xy(), 0.1);
|
||||
plot.plot();
|
||||
|
||||
// particle-filter
|
||||
@@ -263,13 +263,14 @@ static Stats::Statistics<float> run(Settings::DataSetup setup, int walkIdx, std:
|
||||
//auto init = std::make_unique<MyPFInitFixed>(&mesh, srcPath0); // known position
|
||||
auto init = std::make_unique<MyPFInitUniform>(&mesh); // uniform distribution
|
||||
auto eval = std::make_unique<MyPFEval>();
|
||||
eval->kalmanMap = kalmanMap;
|
||||
eval->ftmKalmanFilters = kalmanMap;
|
||||
|
||||
auto trans = std::make_unique<MyPFTransRandom>();
|
||||
//auto trans = std::make_unique<MyPFTransStatic>();
|
||||
|
||||
auto resample = std::make_unique<SMC::ParticleFilterResamplingSimple<MyState>>();
|
||||
auto estimate = std::make_unique<SMC::ParticleFilterEstimationWeightedAverage<MyState>>();
|
||||
//auto estimate = std::make_unique<SMC::ParticleFilterEstimationMax<MyState>>();
|
||||
|
||||
// setup
|
||||
MyFilter pf(numParticles, std::move(init));
|
||||
@@ -283,172 +284,132 @@ static Stats::Statistics<float> run(Settings::DataSetup setup, int walkIdx, std:
|
||||
MyControl ctrl;
|
||||
MyObservation obs;
|
||||
|
||||
StepDetection sd;
|
||||
PoseDetection pd;
|
||||
TurnDetection td(&pd);
|
||||
RelativePressure relBaro;
|
||||
ActivityDetector act;
|
||||
relBaro.setCalibrationTimeframe( Timestamp::fromMS(5000) );
|
||||
Timestamp lastTimestamp = Timestamp::fromMS(0);
|
||||
|
||||
std::vector<float> errorValuesFtm, errorValuesRssi;
|
||||
std::vector<int> timestamps;
|
||||
std::vector<std::array<float, 4>> gtDistances, ftmDistances, rssiDistances; // distance per AP
|
||||
|
||||
int i = 0;
|
||||
// parse each sensor-value within the offline data
|
||||
for (const Offline::Entry& e : fr.getEntries()) {
|
||||
Plotta::Plotta errorPlot("errorPlot", outputDir.string() + "/errorData.py");
|
||||
Plotta::Plotta distsPlot("distsPlot", outputDir.string() + "/distances.py");
|
||||
|
||||
const Timestamp ts = Timestamp::fromMS(e.ts);
|
||||
|
||||
if (e.type == Offline::Sensor::WIFI_FTM) {
|
||||
auto ftm = fr.getWifiFtm()[e.idx].data;
|
||||
|
||||
float ftm_offset = Settings::data.CurrentPath.NUCs.at(ftm.getAP().getMAC()).ftm_offset;
|
||||
float ftmDist = ftm.getFtmDist() + ftm_offset; // in m; plus static offset
|
||||
|
||||
|
||||
if (Settings::UseKalman)
|
||||
{
|
||||
auto& kalman = kalmanMap->at(ftm.getAP().getMAC());
|
||||
float predictDist = kalman.predict(ts, ftmDist);
|
||||
|
||||
ftm.setFtmDist(predictDist);
|
||||
|
||||
obs.wifi.insert_or_assign(ftm.getAP().getMAC(), ftm);
|
||||
}
|
||||
else
|
||||
{
|
||||
// MOV AVG
|
||||
if (obs.wifi.count(ftm.getAP().getMAC()) == 0)
|
||||
{
|
||||
obs.wifi.insert_or_assign(ftm.getAP().getMAC(), ftm);
|
||||
}
|
||||
else
|
||||
{
|
||||
auto currFtm = obs.wifi.find(ftm.getAP().getMAC());
|
||||
|
||||
float currDist = currFtm->second.getFtmDist();
|
||||
|
||||
const float alpha = 0.6;
|
||||
float newDist = alpha * currDist + (1 - alpha) * ftmDist;
|
||||
|
||||
currFtm->second.setFtmDist(newDist);
|
||||
}
|
||||
}
|
||||
} else if (e.type == Offline::Sensor::WIFI) {
|
||||
//obs.wifi = fr.getWiFiGroupedByTime()[e.idx].data;
|
||||
//ctrl.wifi = fr.getWiFiGroupedByTime()[e.idx].data;
|
||||
} else if (e.type == Offline::Sensor::ACC) {
|
||||
if (sd.add(ts, fr.getAccelerometer()[e.idx].data)) {
|
||||
++ctrl.numStepsSinceLastEval;
|
||||
}
|
||||
const Offline::TS<AccelerometerData>& _acc = fr.getAccelerometer()[e.idx];
|
||||
pd.addAccelerometer(ts, _acc.data);
|
||||
|
||||
//simpleActivity walking / standing
|
||||
act.add(ts, fr.getAccelerometer()[e.idx].data);
|
||||
|
||||
} else if (e.type == Offline::Sensor::GYRO) {
|
||||
const Offline::TS<GyroscopeData>& _gyr = fr.getGyroscope()[e.idx];
|
||||
const float delta_gyro = td.addGyroscope(ts, _gyr.data);
|
||||
|
||||
ctrl.headingChangeSinceLastEval += delta_gyro;
|
||||
|
||||
} else if (e.type == Offline::Sensor::BARO) {
|
||||
relBaro.add(ts, fr.getBarometer()[e.idx].data);
|
||||
obs.relativePressure = relBaro.getPressureRealtiveToStart();
|
||||
obs.sigmaPressure = relBaro.getSigma();
|
||||
|
||||
//simpleActivity stairs up / down
|
||||
act.add(ts, fr.getBarometer()[e.idx].data);
|
||||
obs.activity = act.get();
|
||||
for (const Offline::Entry& e : fr.getEntries())
|
||||
{
|
||||
if (e.type != Offline::Sensor::WIFI_FTM) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (ctrl.numStepsSinceLastEval > 0)
|
||||
//if (ts - lastTimestamp >= Timestamp::fromMS(500))
|
||||
//if (obs.wifi.size() == 4)
|
||||
{
|
||||
// TIME
|
||||
const Timestamp ts = Timestamp::fromMS(e.ts);
|
||||
|
||||
auto wifiFtm = fr.getWifiFtm()[e.idx].data;
|
||||
obs.ftm.push_back(wifiFtm);
|
||||
|
||||
|
||||
if (ts - lastTimestamp >= Timestamp::fromMS(500))
|
||||
{
|
||||
// Do update step
|
||||
Point2 gtPos = gtInterpolator.get(static_cast<uint64_t>(ts.ms())).xy();
|
||||
plot.setGroundTruth(Point3(gtPos.x, gtPos.y, 0.1));
|
||||
|
||||
gtDistances.push_back({ gtPos.getDistance(Settings::CurrentPath.nucInfo(0).position.xy()),
|
||||
gtPos.getDistance(Settings::CurrentPath.nucInfo(1).position.xy()),
|
||||
gtPos.getDistance(Settings::CurrentPath.nucInfo(2).position.xy()),
|
||||
gtPos.getDistance(Settings::CurrentPath.nucInfo(3).position.xy()) });
|
||||
|
||||
Point3 estPos;
|
||||
float distErrorFtm = 0;
|
||||
float distErrorRssi = 0;
|
||||
|
||||
// Run PF
|
||||
obs.currentTime = ts;
|
||||
ctrl.currentTime = ts;
|
||||
|
||||
// if(ctrl.numStepsSinceLastEval > 0){
|
||||
// pf.updateTransitionOnly(&ctrl);
|
||||
// }
|
||||
MyState est = pf.update(&ctrl, obs); //pf.updateEvaluationOnly(obs);
|
||||
MyState est = pf.update(&ctrl, obs);
|
||||
ctrl.afterEval();
|
||||
Point3 gtPos = gtInterpolator.get(static_cast<uint64_t>(ts.ms())) + Point3(0,0,0.1);
|
||||
lastTimestamp = ts;
|
||||
|
||||
ctrl.lastEstimate = est.pos.pos;
|
||||
estPos = est.pos.pos;
|
||||
ctrl.lastEstimate = estPos;
|
||||
|
||||
plot.setCurEst(Point3(estPos.x, estPos.y, 0.1));
|
||||
plot.addEstimationNode(Point3(estPos.x, estPos.y, 0.1));
|
||||
|
||||
// Error
|
||||
distErrorFtm = gtPos.getDistance(estPos.xy());
|
||||
errorStats.ftm.add(distErrorFtm);
|
||||
|
||||
// draw wifi ranges
|
||||
for (auto& ftm : obs.wifi)
|
||||
{
|
||||
int nucid = Settings::data.CurrentPath.NUCs.at(ftm.second.getAP().getMAC()).ID;
|
||||
plot.clearDistanceCircles();
|
||||
|
||||
if (nucid == 1)
|
||||
for (size_t i = 0; i < obs.ftm.size(); i++)
|
||||
{
|
||||
WiFiMeasurement wifi2 = obs.ftm[i];
|
||||
|
||||
Point3 apPos = Settings::CurrentPath.nuc(wifi2.getAP().getMAC()).position;
|
||||
|
||||
K::GnuplotColor color;
|
||||
switch (Settings::CurrentPath.nuc(wifi2.getAP().getMAC()).ID)
|
||||
{
|
||||
Point3 apPos = Settings::data.CurrentPath.NUCs.find(ftm.first)->second.position;
|
||||
//plot.addCircle(nucid, apPos.xy(), ftm.second.getFtmDist());
|
||||
case 1: color = K::GnuplotColor::fromRGB(0, 255, 0); break;
|
||||
case 2: color = K::GnuplotColor::fromRGB(0, 0, 255); break;
|
||||
case 3: color = K::GnuplotColor::fromRGB(255, 255, 0); break;
|
||||
default: color = K::GnuplotColor::fromRGB(255, 0, 0); break;
|
||||
}
|
||||
|
||||
plot.addDistanceCircle(apPos.xy(), wifi2.getFtmDist(), color);
|
||||
}
|
||||
|
||||
obs.wifi.clear();
|
||||
obs.ftm.clear();
|
||||
|
||||
//plot
|
||||
//dbg.showParticles(pf.getParticles());
|
||||
//dbg.setCurPos(est.pos.pos);
|
||||
//dbg.setGT(gtPos);
|
||||
//dbg.addEstimationNode(est.pos.pos);
|
||||
//dbg.addGroundTruthNode(gtPos);
|
||||
//dbg.setTimeInMinute(static_cast<int>(ts.sec()) / 60, static_cast<int>(static_cast<int>(ts.sec())%60));
|
||||
//dbg.draw();
|
||||
|
||||
//plot.printOverview("test");
|
||||
errorValuesFtm.push_back(distErrorFtm);
|
||||
errorValuesRssi.push_back(distErrorRssi);
|
||||
timestamps.push_back(ts.ms());
|
||||
|
||||
// Error plot
|
||||
errorPlot.add("t", timestamps);
|
||||
errorPlot.add("errorFtm", errorValuesFtm);
|
||||
errorPlot.add("errorRssi", errorValuesRssi);
|
||||
errorPlot.frame();
|
||||
|
||||
// Distances plot
|
||||
//distsPlot.add("t", timestamps);
|
||||
//distsPlot.add("gtDists", gtDistances);
|
||||
//distsPlot.add("ftmDists", ftmDistances);
|
||||
//distsPlot.frame();
|
||||
|
||||
// Plotting
|
||||
plot.showParticles(pf.getParticles());
|
||||
plot.setCurEst(est.pos.pos);
|
||||
plot.setGroundTruth(gtPos);
|
||||
|
||||
plot.addEstimationNode(est.pos.pos);
|
||||
plot.setActivity((int) act.get());
|
||||
plot.setCurEst(estPos);
|
||||
plot.setGroundTruth(Point3(gtPos.x, gtPos.y, 0.1));
|
||||
|
||||
plot.addEstimationNode(estPos);
|
||||
//plot.setActivity((int)act.get());
|
||||
//plot.splot.getView().setEnabled(false);
|
||||
//plot.splot.getView().setCamera(0, 0);
|
||||
//plot.splot.getView().setEqualXY(true);
|
||||
|
||||
// plot.plot();
|
||||
|
||||
plot.plot();
|
||||
//plot.closeStream();
|
||||
std::this_thread::sleep_for(100ms);
|
||||
|
||||
// error calc
|
||||
// float err_m = gtPos.getDistance(est.pos.pos);
|
||||
// errorStats.add(err_m);
|
||||
// errorFile << ts.ms() << " " << err_m << "\n";
|
||||
|
||||
//error calc with penalty for wrong floor
|
||||
double errorFactor = 3.0;
|
||||
Point3 gtPosError = Point3(gtPos.x, gtPos.y, errorFactor * gtPos.z);
|
||||
Point3 estError = Point3(est.pos.pos.x, est.pos.pos.y, errorFactor * est.pos.pos.z);
|
||||
float err_m = gtPosError.getDistance(estError);
|
||||
errorStats.add(err_m);
|
||||
errorFile << ts.ms() << " " << err_m << "\n";
|
||||
}
|
||||
}
|
||||
|
||||
printErrorStats(errorStats);
|
||||
|
||||
std::ofstream plot_out;
|
||||
plot_out.open(outputDir.string() + "/plot.gp");
|
||||
|
||||
// get someting on console
|
||||
std::cout << "Statistical Analysis Filtering: " << std::endl;
|
||||
std::cout << "Median: " << errorStats.getMedian() << " Average: " << errorStats.getAvg() << " Std: " << errorStats.getStdDev() << std::endl;
|
||||
plot.clearDistanceCircles();
|
||||
plot.saveToFile(plot_out);
|
||||
|
||||
// save the statistical data in file
|
||||
errorFile << "========================================================== \n";
|
||||
errorFile << "Average of all statistical data: \n";
|
||||
errorFile << "Median: " << errorStats.getMedian() << "\n";
|
||||
errorFile << "Average: " << errorStats.getAvg() << "\n";
|
||||
errorFile << "Standard Deviation: " << errorStats.getStdDev() << "\n";
|
||||
errorFile << "75 Quantil: " << errorStats.getQuantile(0.75) << "\n";
|
||||
errorFile.close();
|
||||
std::ofstream errorStats_out;
|
||||
errorStats_out.open(outputDir.string() + "/error_stats.txt");
|
||||
printErrorStats(errorStats_out, errorStats);
|
||||
|
||||
errorPlot.frame();
|
||||
|
||||
//system("pause");
|
||||
|
||||
return errorStats;
|
||||
}
|
||||
@@ -468,20 +429,71 @@ int main(int argc, char** argv)
|
||||
return mainTrilat(argc, argv);
|
||||
}
|
||||
|
||||
//mainFtm(argc, argv);
|
||||
//return 0;
|
||||
|
||||
Stats::Statistics<float> statsAVG;
|
||||
Stats::Statistics<float> statsMedian;
|
||||
Stats::Statistics<float> statsSTD;
|
||||
Stats::Statistics<float> statsQuantil;
|
||||
Stats::Statistics<float> tmp;
|
||||
CombinedStats<float> statsAVG;
|
||||
CombinedStats<float> statsMedian;
|
||||
CombinedStats<float> statsSTD;
|
||||
CombinedStats<float> statsQuantil;
|
||||
CombinedStats<float> tmp;
|
||||
|
||||
std::string evaluationName = "prologic/tmp";
|
||||
|
||||
std::vector<Settings::DataSetup> setupsToRun = { Settings::data.Path7,
|
||||
Settings::data.Path8,
|
||||
Settings::data.Path9 };
|
||||
|
||||
std::vector<std::array<float, 3>> error;
|
||||
std::ofstream error_out;
|
||||
error_out.open(Settings::errorDir + evaluationName + "_error_path1" + ".csv", std::ios_base::app);
|
||||
for (Settings::DataSetup setupToRun : setupsToRun)
|
||||
{
|
||||
Settings::CurrentPath = setupToRun;
|
||||
|
||||
|
||||
for (size_t walkIdx = 0; walkIdx < 1 /*Settings::CurrentPath.training.size()*/; walkIdx++)
|
||||
{
|
||||
std::cout << "Executing walk " << walkIdx << "\n";
|
||||
for (int i = 0; i < 1; ++i)
|
||||
{
|
||||
std::cout << "Start of iteration " << i << "\n";
|
||||
|
||||
tmp = run(Settings::CurrentPath, walkIdx, evaluationName);
|
||||
|
||||
statsAVG.ftm.add(tmp.ftm.getAvg());
|
||||
statsMedian.ftm.add(tmp.ftm.getMedian());
|
||||
statsSTD.ftm.add(tmp.ftm.getStdDev());
|
||||
statsQuantil.ftm.add(tmp.ftm.getQuantile(0.75));
|
||||
|
||||
statsAVG.rssi.add(tmp.rssi.getAvg());
|
||||
statsMedian.rssi.add(tmp.rssi.getMedian());
|
||||
statsSTD.rssi.add(tmp.rssi.getStdDev());
|
||||
statsQuantil.rssi.add(tmp.rssi.getQuantile(0.75));
|
||||
|
||||
std::cout << "Iteration " << i << " completed" << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
std::cout << "Results for path " << Settings::CurrentPath.name << std::endl;
|
||||
std::cout << "==========================================================" << std::endl;
|
||||
std::cout << "Average of all statistical data FTM: " << std::endl;
|
||||
std::cout << "Median: " << statsMedian.ftm.getAvg() << std::endl;
|
||||
std::cout << "Average: " << statsAVG.ftm.getAvg() << std::endl;
|
||||
std::cout << "Standard Deviation: " << statsSTD.ftm.getAvg() << std::endl;
|
||||
std::cout << "75 Quantil: " << statsQuantil.ftm.getAvg() << std::endl;
|
||||
std::cout << "==========================================================" << std::endl;
|
||||
|
||||
std::cout << "==========================================================" << std::endl;
|
||||
std::cout << "Average of all statistical data RSSI: " << std::endl;
|
||||
std::cout << "Median: " << statsMedian.rssi.getAvg() << std::endl;
|
||||
std::cout << "Average: " << statsAVG.rssi.getAvg() << std::endl;
|
||||
std::cout << "Standard Deviation: " << statsSTD.rssi.getAvg() << std::endl;
|
||||
std::cout << "75 Quantil: " << statsQuantil.rssi.getAvg() << std::endl;
|
||||
std::cout << "==========================================================" << std::endl;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//std::vector<std::array<float, 3>> error;
|
||||
//std::ofstream error_out;
|
||||
//error_out.open(Settings::errorDir + evaluationName + "_error_path1" + ".csv", std::ios_base::app);
|
||||
|
||||
|
||||
//for (kalman_procNoiseDistStdDev = 0.8f; kalman_procNoiseDistStdDev < 1.5f; kalman_procNoiseDistStdDev += 0.1f)
|
||||
@@ -489,24 +501,24 @@ int main(int argc, char** argv)
|
||||
// for (kalman_procNoiseVelStdDev = 0.1f; kalman_procNoiseVelStdDev < 0.5f; kalman_procNoiseVelStdDev += 0.1f)
|
||||
// {
|
||||
|
||||
for (size_t walkIdx = 0; walkIdx < 6; walkIdx++)
|
||||
{
|
||||
std::cout << "Executing walk " << walkIdx << "\n";
|
||||
for (int i = 0; i < 1; ++i)
|
||||
{
|
||||
std::cout << "Start of iteration " << i << "\n";
|
||||
//for (size_t walkIdx = 0; walkIdx < Settings::data.CurrentPath.training.size(); walkIdx++)
|
||||
//{
|
||||
// std::cout << "Executing walk " << walkIdx << "\n";
|
||||
// for (int i = 0; i < 1; ++i)
|
||||
// {
|
||||
// std::cout << "Start of iteration " << i << "\n";
|
||||
|
||||
tmp = run(Settings::data.CurrentPath, walkIdx, evaluationName);
|
||||
statsMedian.add(tmp.getMedian());
|
||||
statsAVG.add(tmp.getAvg());
|
||||
statsSTD.add(tmp.getStdDev());
|
||||
statsQuantil.add(tmp.getQuantile(0.75));
|
||||
// tmp = run(Settings::data.CurrentPath, walkIdx, evaluationName);
|
||||
// statsMedian.add(tmp.getMedian());
|
||||
// statsAVG.add(tmp.getAvg());
|
||||
// statsSTD.add(tmp.getStdDev());
|
||||
// statsQuantil.add(tmp.getQuantile(0.75));
|
||||
|
||||
std::cout << kalman_procNoiseDistStdDev << " " << kalman_procNoiseVelStdDev << std::endl;
|
||||
std::cout << "Iteration " << i << " completed" << std::endl;
|
||||
// std::cout << kalman_procNoiseDistStdDev << " " << kalman_procNoiseVelStdDev << std::endl;
|
||||
// std::cout << "Iteration " << i << " completed" << std::endl;
|
||||
|
||||
}
|
||||
}
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
// error.push_back({{ kalman_procNoiseDistStdDev, kalman_procNoiseVelStdDev, statsAVG.getAvg() }});
|
||||
@@ -536,38 +548,6 @@ int main(int argc, char** argv)
|
||||
//error_out.close();
|
||||
|
||||
|
||||
//for(int i = 0; i < 2; ++i){
|
||||
//
|
||||
// tmp = run(Settings::data.CurrentPath, 0, evaluationName);
|
||||
// statsMedian.add(tmp.getMedian());
|
||||
// statsAVG.add(tmp.getAvg());
|
||||
// statsSTD.add(tmp.getStdDev());
|
||||
// statsQuantil.add(tmp.getQuantile(0.75));
|
||||
|
||||
// std::cout << "Iteration " << i << " completed" << std::endl;
|
||||
//}
|
||||
|
||||
std::cout << "==========================================================" << std::endl;
|
||||
std::cout << "Average of all statistical data: " << std::endl;
|
||||
std::cout << "Median: " << statsMedian.getAvg() << std::endl;
|
||||
std::cout << "Average: " << statsAVG.getAvg() << std::endl;
|
||||
std::cout << "Standard Deviation: " << statsSTD.getAvg() << std::endl;
|
||||
std::cout << "75 Quantil: " << statsQuantil.getAvg() << std::endl;
|
||||
std::cout << "==========================================================" << std::endl;
|
||||
|
||||
//EDIT THIS EDIT THIS EDIT THIS EDIT THIS EDIT THIS EDIT THIS EDIT THIS EDIT THIS
|
||||
std::ofstream finalStatisticFile;
|
||||
finalStatisticFile.open (Settings::errorDir + evaluationName + ".csv", std::ios_base::app);
|
||||
|
||||
finalStatisticFile << "========================================================== \n";
|
||||
finalStatisticFile << "Average of all statistical data: \n";
|
||||
finalStatisticFile << "Median: " << statsMedian.getAvg() << "\n";
|
||||
finalStatisticFile << "Average: " << statsAVG.getAvg() << "\n";
|
||||
finalStatisticFile << "Standard Deviation: " << statsSTD.getAvg() << "\n";
|
||||
finalStatisticFile << "75 Quantil: " << statsQuantil.getAvg() << "\n";
|
||||
finalStatisticFile << "========================================================== \n";
|
||||
|
||||
finalStatisticFile.close();
|
||||
|
||||
//std::this_thread::sleep_for(std::chrono::seconds(60));
|
||||
|
||||
|
||||
279
code/mainFtm.cpp
279
code/mainFtm.cpp
@@ -1,279 +0,0 @@
|
||||
#include "mainFtm.h"
|
||||
|
||||
#include "mesh.h"
|
||||
#include "filter.h"
|
||||
#include "Settings.h"
|
||||
//#include "meshPlotter.h"
|
||||
#include "Plotty.h"
|
||||
|
||||
#include <memory>
|
||||
#include <thread>
|
||||
#include <filesystem>
|
||||
#include <chrono>
|
||||
|
||||
#include <Indoor/floorplan/v2/FloorplanReader.h>
|
||||
#include <Indoor/sensors/offline/FileReader.h>
|
||||
#include <Indoor/geo/Heading.h>
|
||||
#include <Indoor/geo/Point2.h>
|
||||
#include <Indoor/sensors/imu/TurnDetection.h>
|
||||
#include <Indoor/sensors/imu/StepDetection.h>
|
||||
#include <Indoor/sensors/imu/PoseDetection.h>
|
||||
#include <Indoor/sensors/imu/MotionDetection.h>
|
||||
#include <Indoor/sensors/pressure/RelativePressure.h>
|
||||
#include <Indoor/data/Timestamp.h>
|
||||
|
||||
|
||||
#include <Indoor/math/stats/Statistics.h>
|
||||
|
||||
#include "FtmKalman.h"
|
||||
|
||||
#include <sys/stat.h>
|
||||
|
||||
static Stats::Statistics<float> run(Settings::DataSetup setup, int numFile, std::string folder) {
|
||||
|
||||
// reading file
|
||||
std::string currDir = std::filesystem::current_path().string();
|
||||
|
||||
Floorplan::IndoorMap* map = Floorplan::Reader::readFromFile(setup.map);
|
||||
Offline::FileReader fr(setup.training[numFile]);
|
||||
|
||||
// ground truth
|
||||
std::vector<int> gtPath = setup.gtPath;
|
||||
Interpolator<uint64_t, Point3> gtInterpolator = fr.getGroundTruthPath(map, gtPath);
|
||||
Stats::Statistics<float> errorStats;
|
||||
|
||||
//calculate distance of path
|
||||
std::vector<Interpolator<uint64_t, Point3>::InterpolatorEntry> gtEntries = gtInterpolator.getEntries();
|
||||
double distance = 0;
|
||||
for(int i = 1; i < gtEntries.size(); ++i){
|
||||
distance += gtEntries[i].value.getDistance(gtEntries[i-1].value);
|
||||
}
|
||||
|
||||
std::cout << "Distance of Path: " << distance << std::endl;
|
||||
|
||||
// error file
|
||||
const long int t = static_cast<long int>(time(NULL));
|
||||
auto evalDir = std::filesystem::path(Settings::errorDir);
|
||||
evalDir.append(folder);
|
||||
|
||||
if (!std::filesystem::exists(evalDir)) {
|
||||
std::filesystem::create_directory(evalDir);
|
||||
}
|
||||
|
||||
std::ofstream errorFile;
|
||||
errorFile.open (evalDir.string() + "/" + std::to_string(numFile) + "_" + std::to_string(t) + ".csv");
|
||||
|
||||
|
||||
// wifi
|
||||
auto kalmanMap = std::make_shared<std::unordered_map<MACAddress, Kalman>>();
|
||||
kalmanMap->insert({ Settings::NUC1, Kalman(1, setup.NUCs.at(Settings::NUC1).kalman_measStdDev) });
|
||||
kalmanMap->insert({ Settings::NUC2, Kalman(2, setup.NUCs.at(Settings::NUC2).kalman_measStdDev) });
|
||||
kalmanMap->insert({ Settings::NUC3, Kalman(3, setup.NUCs.at(Settings::NUC3).kalman_measStdDev) });
|
||||
kalmanMap->insert({ Settings::NUC4, Kalman(4, setup.NUCs.at(Settings::NUC4).kalman_measStdDev) });
|
||||
|
||||
// mesh
|
||||
NM::NavMeshSettings set;
|
||||
MyNavMesh mesh;
|
||||
MyNavMeshFactory fac(&mesh, set);
|
||||
fac.build(map);
|
||||
|
||||
const Point3 srcPath0(9.8, 24.9, 0); // fixed start pos
|
||||
|
||||
// add shortest-path to destination
|
||||
//const Point3 dst(51, 45, 1.7);
|
||||
//const Point3 dst(25, 45, 0);
|
||||
//NM::NavMeshDijkstra::stamp<MyNavMeshTriangle>(mesh, dst);
|
||||
|
||||
// debug show
|
||||
//MeshPlotter dbg;
|
||||
//dbg.addFloors(map);
|
||||
//dbg.addOutline(map);
|
||||
//dbg.addMesh(mesh);
|
||||
////dbg.addDijkstra(mesh);
|
||||
//dbg.draw();
|
||||
|
||||
Plotty plot(map);
|
||||
plot.buildFloorplan();
|
||||
plot.setGroundTruth(gtPath);
|
||||
plot.plot();
|
||||
|
||||
// particle-filter
|
||||
const int numParticles = 5000;
|
||||
//auto init = std::make_unique<MyPFInitFixed>(&mesh, srcPath0); // known position
|
||||
auto init = std::make_unique<MyPFInitUniform>(&mesh); // uniform distribution
|
||||
auto eval = std::make_unique<MyPFEval>();
|
||||
eval->assignProps = true;
|
||||
eval->kalmanMap = kalmanMap;
|
||||
|
||||
//auto trans = std::make_unique<MyPFTrans>(mesh);
|
||||
auto trans = std::make_unique<MyPFTransStatic>();
|
||||
|
||||
auto resample = std::make_unique<SMC::ParticleFilterResamplingSimple<MyState>>();
|
||||
auto estimate = std::make_unique<SMC::ParticleFilterEstimationWeightedAverage<MyState>>();
|
||||
|
||||
// setup
|
||||
MyFilter pf(numParticles, std::move(init));
|
||||
pf.setEvaluation(std::move(eval));
|
||||
pf.setTransition(std::move(trans));
|
||||
pf.setResampling(std::move(resample));
|
||||
pf.setEstimation(std::move(estimate));
|
||||
//pf.setNEffThreshold(0.85);
|
||||
pf.setNEffThreshold(0.0);
|
||||
|
||||
// sensors
|
||||
MyControl ctrl;
|
||||
MyObservation obs;
|
||||
|
||||
StepDetection sd;
|
||||
PoseDetection pd;
|
||||
TurnDetection td(&pd);
|
||||
RelativePressure relBaro;
|
||||
ActivityDetector act;
|
||||
relBaro.setCalibrationTimeframe( Timestamp::fromMS(5000) );
|
||||
Timestamp lastTimestamp = Timestamp::fromMS(0);
|
||||
|
||||
|
||||
// parse each sensor-value within the offline data
|
||||
for (const Offline::Entry& e : fr.getEntries()) {
|
||||
|
||||
const Timestamp ts = Timestamp::fromMS(e.ts);
|
||||
|
||||
if (e.type == Offline::Sensor::WIFI_FTM) {
|
||||
auto ftm = fr.getWifiFtm()[e.idx].data;
|
||||
|
||||
float ftm_offset = Settings::data.CurrentPath.NUCs.at(ftm.getAP().getMAC()).ftm_offset;
|
||||
float ftmDist = ftm.getFtmDist() + ftm_offset; // in m; plus static offset
|
||||
|
||||
auto& kalman = kalmanMap->at(ftm.getAP().getMAC());
|
||||
float predictDist = kalman.predict(ts, ftmDist);
|
||||
|
||||
//ftm.setFtmDist(predictDist);
|
||||
|
||||
obs.wifi.insert_or_assign(ftm.getAP().getMAC(), ftm);
|
||||
}
|
||||
|
||||
//if (ctrl.numStepsSinceLastEval > 0)
|
||||
//if (ts - lastTimestamp >= Timestamp::fromMS(500))
|
||||
if (obs.wifi.size() == 4)
|
||||
{
|
||||
|
||||
obs.currentTime = ts;
|
||||
ctrl.currentTime = ts;
|
||||
|
||||
// if(ctrl.numStepsSinceLastEval > 0){
|
||||
// pf.updateTransitionOnly(&ctrl);
|
||||
// }
|
||||
MyState est = pf.update(&ctrl, obs); //pf.updateEvaluationOnly(obs);
|
||||
ctrl.afterEval();
|
||||
Point3 gtPos = gtInterpolator.get(static_cast<uint64_t>(ts.ms())) + Point3(0,0,0.1);
|
||||
lastTimestamp = ts;
|
||||
|
||||
ctrl.lastEstimate = est.pos.pos;
|
||||
|
||||
|
||||
// draw wifi ranges
|
||||
for (auto& ftm : obs.wifi)
|
||||
{
|
||||
int nucid = Settings::data.CurrentPath.NUCs.at(ftm.second.getAP().getMAC()).ID;
|
||||
|
||||
if (nucid == 1)
|
||||
{
|
||||
Point3 apPos = Settings::data.CurrentPath.NUCs.find(ftm.first)->second.position;
|
||||
// plot.addCircle(nucid, apPos.xy(), ftm.second.getFtmDist());
|
||||
}
|
||||
}
|
||||
|
||||
obs.wifi.clear();
|
||||
|
||||
//plot
|
||||
//dbg.showParticles(pf.getParticles());
|
||||
//dbg.setCurPos(est.pos.pos);
|
||||
//dbg.setGT(gtPos);
|
||||
//dbg.addEstimationNode(est.pos.pos);
|
||||
//dbg.addGroundTruthNode(gtPos);
|
||||
//dbg.setTimeInMinute(static_cast<int>(ts.sec()) / 60, static_cast<int>(static_cast<int>(ts.sec())%60));
|
||||
//dbg.draw();
|
||||
|
||||
plot.showParticles(pf.getParticles());
|
||||
plot.setCurEst(est.pos.pos);
|
||||
plot.setGroundTruth(gtPos);
|
||||
|
||||
plot.addEstimationNode(est.pos.pos);
|
||||
plot.setActivity((int) act.get());
|
||||
plot.splot.getView().setCamera(0, 0);
|
||||
//plot.splot.getView().setEqualXY(true);
|
||||
|
||||
plot.plot();
|
||||
|
||||
|
||||
//std::this_thread::sleep_for(500ms);
|
||||
|
||||
// error calc
|
||||
// float err_m = gtPos.getDistance(est.pos.pos);
|
||||
// errorStats.add(err_m);
|
||||
// errorFile << ts.ms() << " " << err_m << "\n";
|
||||
|
||||
//error calc with penalty for wrong floor
|
||||
double errorFactor = 3.0;
|
||||
Point3 gtPosError = Point3(gtPos.x, gtPos.y, errorFactor * gtPos.z);
|
||||
Point3 estError = Point3(est.pos.pos.x, est.pos.pos.y, errorFactor * est.pos.pos.z);
|
||||
float err_m = gtPosError.getDistance(estError);
|
||||
errorStats.add(err_m);
|
||||
errorFile << ts.ms() << " " << err_m << "\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// get someting on console
|
||||
std::cout << "Statistical Analysis Filtering: " << std::endl;
|
||||
std::cout << "Median: " << errorStats.getMedian() << " Average: " << errorStats.getAvg() << " Std: " << errorStats.getStdDev() << std::endl;
|
||||
|
||||
// save the statistical data in file
|
||||
errorFile << "========================================================== \n";
|
||||
errorFile << "Average of all statistical data: \n";
|
||||
errorFile << "Median: " << errorStats.getMedian() << "\n";
|
||||
errorFile << "Average: " << errorStats.getAvg() << "\n";
|
||||
errorFile << "Standard Deviation: " << errorStats.getStdDev() << "\n";
|
||||
errorFile << "75 Quantil: " << errorStats.getQuantile(0.75) << "\n";
|
||||
errorFile.close();
|
||||
|
||||
return errorStats;
|
||||
}
|
||||
|
||||
int mainFtm(int argc, char** argv) {
|
||||
|
||||
Stats::Statistics<float> statsAVG;
|
||||
Stats::Statistics<float> statsMedian;
|
||||
Stats::Statistics<float> statsSTD;
|
||||
Stats::Statistics<float> statsQuantil;
|
||||
Stats::Statistics<float> tmp;
|
||||
|
||||
std::string evaluationName = "prologic/tmp";
|
||||
|
||||
for(int i = 0; i < 1; ++i){
|
||||
for(int j = 0; j < 1; ++j){
|
||||
tmp = run(Settings::data.CurrentPath, j, evaluationName);
|
||||
statsMedian.add(tmp.getMedian());
|
||||
statsAVG.add(tmp.getAvg());
|
||||
statsSTD.add(tmp.getStdDev());
|
||||
statsQuantil.add(tmp.getQuantile(0.75));
|
||||
}
|
||||
|
||||
std::cout << "Iteration " << i << " completed" << std::endl;
|
||||
}
|
||||
|
||||
std::cout << "==========================================================" << std::endl;
|
||||
std::cout << "Average of all statistical data: " << std::endl;
|
||||
std::cout << "Median: " << statsMedian.getAvg() << std::endl;
|
||||
std::cout << "Average: " << statsAVG.getAvg() << std::endl;
|
||||
std::cout << "Standard Deviation: " << statsSTD.getAvg() << std::endl;
|
||||
std::cout << "75 Quantil: " << statsQuantil.getAvg() << std::endl;
|
||||
std::cout << "==========================================================" << std::endl;
|
||||
|
||||
|
||||
//std::this_thread::sleep_for(std::chrono::seconds(60));
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
int mainFtm(int argc, char** argv);
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
static float kalman_procNoiseDistStdDev = 1.2f; // standard deviation of distance for process noise
|
||||
static float kalman_procNoiseVelStdDev = 0.1f; // standard deviation of velocity for process noise
|
||||
|
||||
static void poorMansKDE(const BBox3& bbox, float sigma, std::array<float, 4> dist, std::array<Point2, 4> apPos, std::vector<std::pair<Point2, float>>& density, std::pair<Point2, float>& maxElem)
|
||||
static void poorMansKDE(const BBox3& bbox, std::vector<std::pair<Point2, double>>& density, std::pair<Point2, double>& maxElem, const std::function<double(Point2 pt)>& evalProc)
|
||||
{
|
||||
density.clear();
|
||||
|
||||
@@ -48,35 +48,99 @@ static void poorMansKDE(const BBox3& bbox, float sigma, std::array<float, 4> dis
|
||||
{
|
||||
const Point2 pos(x, y);
|
||||
|
||||
float P = 1.0f;
|
||||
|
||||
for (size_t i = 0; i < 4; i++)
|
||||
{
|
||||
// TODO: Was mit nan machen?
|
||||
if (!isnan(dist[i]))
|
||||
{
|
||||
float d = pos.getDistance(apPos[i]) - dist[i];
|
||||
float p = Distribution::Normal<float>::getProbability(0, sigma, d);
|
||||
P *= p;
|
||||
}
|
||||
}
|
||||
double P = evalProc(pos);
|
||||
|
||||
density.push_back({ pos, P });
|
||||
}
|
||||
}
|
||||
|
||||
auto maxElement = std::max_element(density.begin(), density.end(), [](std::pair<Point2, float> a, std::pair<Point2, float> b) {
|
||||
auto maxElement = std::max_element(density.begin(), density.end(), [](std::pair<Point2, double> a, std::pair<Point2, double> b) {
|
||||
return a.second < b.second;
|
||||
});
|
||||
|
||||
maxElem = *maxElement;
|
||||
}
|
||||
|
||||
static void computeDensity(const BBox3& bbox, std::vector<std::pair<Point2, double>>& density, std::pair<Point2, double>& maxElem, const std::vector<WiFiMeasurement>& obs, bool useFtm, double sigma)
|
||||
{
|
||||
poorMansKDE(bbox, density, maxElem, [&obs, useFtm, sigma](Point2 pt) {
|
||||
double p = 1.0;
|
||||
|
||||
for (const WiFiMeasurement& wifi : obs)
|
||||
{
|
||||
if (wifi.getNumSuccessfulMeasurements() < 3)
|
||||
continue;
|
||||
|
||||
const MACAddress& mac = wifi.getAP().getMAC();
|
||||
int nucIndex = Settings::nucIndex(mac);
|
||||
|
||||
// compute AP distance
|
||||
const Point3 apPos = Settings::CurrentPath.nucInfo(nucIndex).position;
|
||||
Point3 pos = Point3(pt.x, pt.y, 1.3); // smartphone h<>he
|
||||
const float apDist = pos.getDistance(apPos);
|
||||
|
||||
double dist = 0;
|
||||
if (useFtm)
|
||||
{
|
||||
// compute ftm distance
|
||||
float ftm_offset = Settings::CurrentPath.NUCs.at(mac).ftm_offset;
|
||||
float ftmDist = wifi.getFtmDist() + ftm_offset; // in m; plus static offset
|
||||
|
||||
dist = ftmDist;
|
||||
}
|
||||
else
|
||||
{
|
||||
// compute rssi distance
|
||||
float rssi_pathloss = Settings::CurrentPath.NUCs.at(mac).rssi_pathloss;
|
||||
float rssiDist = LogDistanceModel::rssiToDistance(-40, 2.25 /*rssi_pathloss*/, wifi.getRSSI());
|
||||
|
||||
dist = rssiDist;
|
||||
}
|
||||
|
||||
if (dist > 0)
|
||||
{
|
||||
double d = apDist - dist;
|
||||
double x = Distribution::Normal<double>::getProbability(0, 3.5, d);
|
||||
|
||||
p *= x;
|
||||
}
|
||||
}
|
||||
|
||||
return p;
|
||||
});
|
||||
}
|
||||
|
||||
static void plotDensity(Plotty& plot, std::vector<std::pair<Point2, double>>& density)
|
||||
{
|
||||
plot.particles.clear();
|
||||
|
||||
double min = std::numeric_limits<double>::max();
|
||||
double max = std::numeric_limits<double>::min();
|
||||
|
||||
for (auto it = density.begin(); ; std::advance(it, 2))
|
||||
{
|
||||
if (it > density.end())
|
||||
break;
|
||||
|
||||
auto p = *it;
|
||||
|
||||
const K::GnuplotPoint3 p3(p.first.x, p.first.y, 0.1);
|
||||
const double prob = std::pow(p.second, 0.25);
|
||||
|
||||
plot.particles.add(p3, prob);
|
||||
|
||||
if (prob > max) { max = prob; }
|
||||
if (prob < min) { min = prob; }
|
||||
}
|
||||
|
||||
plot.splot.getAxisCB().setRange(min, max + 0.000001);
|
||||
}
|
||||
|
||||
static CombinedStats<float> run(Settings::DataSetup setup, int walkIdx, std::string folder)
|
||||
{
|
||||
// reading file
|
||||
Floorplan::IndoorMap* map = Floorplan::Reader::readFromFile(setup.map);
|
||||
Offline::FileReader fr(setup.training[walkIdx]);
|
||||
Offline::FileReader fr(setup.training[walkIdx], setup.HasNanoSecondTimestamps);
|
||||
|
||||
// ground truth
|
||||
std::vector<int> gtPath = setup.gtPath;
|
||||
@@ -113,7 +177,7 @@ static CombinedStats<float> run(Settings::DataSetup setup, int walkIdx, std::str
|
||||
plot.setGroundTruth(gtPath);
|
||||
plot.setView(30, 0);
|
||||
plot.plot();
|
||||
|
||||
|
||||
// wifi
|
||||
std::array<Kalman, 4> ftmKalmanFilters{
|
||||
Kalman(1, setup.NUCs.at(Settings::NUC1).kalman_measStdDev, kalman_procNoiseDistStdDev, kalman_procNoiseVelStdDev),
|
||||
@@ -123,13 +187,15 @@ static CombinedStats<float> run(Settings::DataSetup setup, int walkIdx, std::str
|
||||
};
|
||||
|
||||
std::array<Point2, 4> apPositions{
|
||||
Settings::data.CurrentPath.NUCs.at(Settings::NUC1).position.xy(),
|
||||
Settings::data.CurrentPath.NUCs.at(Settings::NUC2).position.xy(),
|
||||
Settings::data.CurrentPath.NUCs.at(Settings::NUC3).position.xy(),
|
||||
Settings::data.CurrentPath.NUCs.at(Settings::NUC4).position.xy(),
|
||||
Settings::CurrentPath.NUCs.at(Settings::NUC1).position.xy(),
|
||||
Settings::CurrentPath.NUCs.at(Settings::NUC2).position.xy(),
|
||||
Settings::CurrentPath.NUCs.at(Settings::NUC3).position.xy(),
|
||||
Settings::CurrentPath.NUCs.at(Settings::NUC4).position.xy(),
|
||||
};
|
||||
|
||||
std::vector<WifiMeas> data = filterOfflineData(fr);
|
||||
std::vector<WiFiMeasurement> obs;
|
||||
|
||||
Timestamp lastTimestamp = Timestamp::fromMS(0);
|
||||
|
||||
const float sigma = 3.5;
|
||||
const int movAvgWnd = 15;
|
||||
@@ -139,132 +205,88 @@ static CombinedStats<float> run(Settings::DataSetup setup, int walkIdx, std::str
|
||||
std::vector<float> errorValuesFtm, errorValuesRssi;
|
||||
std::vector<int> timestamps;
|
||||
|
||||
for (const WifiMeas& wifi : data)
|
||||
for (const Offline::Entry& e : fr.getEntries())
|
||||
{
|
||||
Plotta::Plotta test("test", "C:\\Temp\\Plotta\\probData.py");
|
||||
if (e.type != Offline::Sensor::WIFI_FTM) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Point2 gtPos = gtInterpolator.get(static_cast<uint64_t>(wifi.ts.ms())).xy();
|
||||
plot.setGroundTruth(Point3(gtPos.x, gtPos.y, 0.1));
|
||||
// TIME
|
||||
const Timestamp ts = Timestamp::fromMS(e.ts);
|
||||
|
||||
float distErrorFtm = 0;
|
||||
float distErrorRssi = 0;
|
||||
auto wifiFtm = fr.getWifiFtm()[e.idx].data;
|
||||
obs.push_back(wifiFtm);
|
||||
|
||||
//if (wifi.numSucessMeas() == 4)
|
||||
if (ts - lastTimestamp >= Timestamp::fromMS(500))
|
||||
{
|
||||
// Do update
|
||||
Plotta::Plotta test("test", "C:\\Temp\\Plotta\\probData.py");
|
||||
|
||||
Point2 gtPos = gtInterpolator.get(static_cast<uint64_t>(ts.ms())).xy();
|
||||
plot.setGroundTruth(Point3(gtPos.x, gtPos.y, 0.1));
|
||||
|
||||
float distErrorFtm = 0;
|
||||
float distErrorRssi = 0;
|
||||
|
||||
// FTM
|
||||
{
|
||||
std::array<float, 4> dists = wifi.ftmDists;
|
||||
|
||||
if (Settings::UseKalman)
|
||||
{
|
||||
std::cout << "Using Kalman" << "\n";
|
||||
|
||||
for (size_t i = 0; i < 4; i++)
|
||||
{
|
||||
if (!isnan(dists[i]))
|
||||
{
|
||||
dists[i] = ftmKalmanFilters[i].predict(wifi.ts, dists[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BBox3 bbox = FloorplanHelper::getBBox(map);
|
||||
std::vector<std::pair<Point2, float>> density;
|
||||
std::pair<Point2, float> maxElement;
|
||||
std::vector<std::pair<Point2, double>> density;
|
||||
std::pair<Point2, double> maxElement;
|
||||
|
||||
poorMansKDE(bbox, sigma, dists, apPositions, density, maxElement);
|
||||
computeDensity(bbox, density, maxElement, obs, true, 3.5);
|
||||
|
||||
Point2 estPos = maxElement.first;
|
||||
|
||||
plot.setCurEst(Point3(estPos.x, estPos.y, 0.1));
|
||||
plot.addEstimationNode(Point3(estPos.x, estPos.y, 0.1));
|
||||
plot.setCurEst(Point3(estPos.x, estPos.y, 0.1));
|
||||
|
||||
// Plot density
|
||||
plotDensity(plot, density);
|
||||
|
||||
// Error
|
||||
distErrorFtm = gtPos.getDistance(estPos);
|
||||
errorStats.ftm.add(distErrorFtm);
|
||||
|
||||
|
||||
//std::vector<float> densityX, densityY, densityZ;
|
||||
//for (const auto& item : density)
|
||||
//{
|
||||
// densityX.push_back(item.first.x);
|
||||
// densityY.push_back(item.first.y);
|
||||
// densityZ.push_back(item.second);
|
||||
//}
|
||||
|
||||
//test.add("densityX", densityX);
|
||||
//test.add("densityY", densityY);
|
||||
//test.add("densityZ", densityZ);
|
||||
}
|
||||
|
||||
// RSSI
|
||||
{
|
||||
std::array<float, 4> dists = wifi.rssiDists;
|
||||
|
||||
if (Settings::UseKalman)
|
||||
{
|
||||
for (size_t i = 0; i < 4; i++)
|
||||
{
|
||||
if (!isnan(dists[i]))
|
||||
{
|
||||
dists[i] = ftmKalmanFilters[i].predict(wifi.ts, dists[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
BBox3 bbox = FloorplanHelper::getBBox(map);
|
||||
std::vector<std::pair<Point2, float>> density;
|
||||
std::pair<Point2, float> maxElement;
|
||||
std::vector<std::pair<Point2, double>> density;
|
||||
std::pair<Point2, double> maxElement;
|
||||
|
||||
poorMansKDE(bbox, sigma, dists, apPositions, density, maxElement);
|
||||
computeDensity(bbox, density, maxElement, obs, false, 8);
|
||||
|
||||
Point2 estPos = maxElement.first;
|
||||
|
||||
plot.setCurEst(Point3(estPos.x, estPos.y, 0.1));
|
||||
plot.addEstimationNode2(Point3(estPos.x, estPos.y, 0.1));
|
||||
|
||||
// Plot density
|
||||
//plotDensity(plot, density);
|
||||
|
||||
// Error
|
||||
distErrorRssi = gtPos.getDistance(estPos);
|
||||
errorStats.rssi.add(distErrorRssi);
|
||||
|
||||
|
||||
//std::vector<float> densityX, densityY, densityZ;
|
||||
//for (const auto& item : density)
|
||||
//{
|
||||
// densityX.push_back(item.first.x);
|
||||
// densityY.push_back(item.first.y);
|
||||
// densityZ.push_back(item.second);
|
||||
//}
|
||||
|
||||
//test.add("densityX", densityX);
|
||||
//test.add("densityY", densityY);
|
||||
//test.add("densityZ", densityZ);
|
||||
}
|
||||
|
||||
//std::cout << wifi.ts.ms() << " " << distError << "\n";
|
||||
|
||||
errorValuesFtm.push_back(distErrorFtm);
|
||||
errorValuesRssi.push_back(distErrorRssi);
|
||||
timestamps.push_back(wifi.ts.ms());
|
||||
timestamps.push_back(ts.ms());
|
||||
|
||||
test.add("t", timestamps);
|
||||
test.add("errorFtm", errorValuesFtm);
|
||||
test.add("errorRssi", errorValuesRssi);
|
||||
test.frame();
|
||||
}
|
||||
|
||||
plot.plot();
|
||||
//Sleep(250);
|
||||
printf("");
|
||||
plot.plot();
|
||||
//Sleep(250);
|
||||
printf("");
|
||||
|
||||
lastTimestamp = ts;
|
||||
obs.clear();
|
||||
}
|
||||
}
|
||||
|
||||
std::cout << "Walk error:" << "\n";
|
||||
std::cout << "[m] " << std::setw(10) << "mean" << std::setw(10) << "stdDev" << std::setw(10) << "median" << "\n";
|
||||
|
||||
std::cout << "FTM " << std::setw(10) << errorStats.ftm.getAvg() << std::setw(10) << errorStats.ftm.getStdDev() << std::setw(10) << errorStats.ftm.getMedian() << "\n";
|
||||
std::cout << "RSSI " << std::setw(10) << errorStats.rssi.getAvg() << std::setw(10) << errorStats.rssi.getStdDev() << std::setw(10) << errorStats.rssi.getMedian() << "\n";
|
||||
std::cout << std::endl;
|
||||
printErrorStats(errorStats);
|
||||
|
||||
return errorStats;
|
||||
}
|
||||
@@ -282,14 +304,14 @@ int mainProp(int argc, char** argv)
|
||||
|
||||
std::string evaluationName = "prologic/tmp";
|
||||
|
||||
for (size_t walkIdx = 0; walkIdx < 6; walkIdx++)
|
||||
for (size_t walkIdx = 0; walkIdx < Settings::CurrentPath.training.size(); walkIdx++)
|
||||
{
|
||||
std::cout << "Executing walk " << walkIdx << "\n";
|
||||
for (int i = 0; i < 1; ++i)
|
||||
{
|
||||
std::cout << "Start of iteration " << i << "\n";
|
||||
|
||||
tmp = run(Settings::data.CurrentPath, walkIdx, evaluationName);
|
||||
tmp = run(Settings::CurrentPath, walkIdx, evaluationName);
|
||||
|
||||
statsAVG.ftm.add(tmp.ftm.getAvg());
|
||||
statsMedian.ftm.add(tmp.ftm.getMedian());
|
||||
|
||||
@@ -67,10 +67,10 @@ static CombinedStats<float> run(Settings::DataSetup setup, int walkIdx, std::str
|
||||
Plotta::Plotta plotta("test", "C:\\Temp\\Plotta\\dataTrilat.py");
|
||||
|
||||
std::vector<Point2> apPositions{
|
||||
Settings::data.CurrentPath.NUCs.at(Settings::NUC1).position.xy(),
|
||||
Settings::data.CurrentPath.NUCs.at(Settings::NUC2).position.xy(),
|
||||
Settings::data.CurrentPath.NUCs.at(Settings::NUC3).position.xy(),
|
||||
Settings::data.CurrentPath.NUCs.at(Settings::NUC4).position.xy(),
|
||||
Settings::CurrentPath.NUCs.at(Settings::NUC1).position.xy(),
|
||||
Settings::CurrentPath.NUCs.at(Settings::NUC2).position.xy(),
|
||||
Settings::CurrentPath.NUCs.at(Settings::NUC3).position.xy(),
|
||||
Settings::CurrentPath.NUCs.at(Settings::NUC4).position.xy(),
|
||||
};
|
||||
|
||||
plotta.add("apPos", apPositions);
|
||||
@@ -196,12 +196,7 @@ static CombinedStats<float> run(Settings::DataSetup setup, int walkIdx, std::str
|
||||
plotta.add("estPathRssi", estPathRssi);
|
||||
plotta.frame();
|
||||
|
||||
std::cout << "Walk error:" << "\n";
|
||||
std::cout << "[m] " << " mean \t stdDev median" << "\n";
|
||||
|
||||
std::cout << "FTM " << errorStats.ftm.getAvg() << "\t" << errorStats.ftm.getStdDev() << "\t" << errorStats.ftm.getMedian() << "\n";
|
||||
std::cout << "RSSI " << errorStats.rssi.getAvg() << "\t" << errorStats.rssi.getStdDev() << "\t" << errorStats.rssi.getMedian() << "\n";
|
||||
std::cout << std::endl;
|
||||
printErrorStats(errorStats);
|
||||
|
||||
return errorStats;
|
||||
}
|
||||
@@ -218,14 +213,14 @@ int mainTrilat(int argc, char** argv)
|
||||
|
||||
std::string evaluationName = "prologic/tmp";
|
||||
|
||||
for (size_t walkIdx = 0; walkIdx < 6; walkIdx++)
|
||||
for (size_t walkIdx = 0; walkIdx < Settings::CurrentPath.training.size(); walkIdx++)
|
||||
{
|
||||
std::cout << "Executing walk " << walkIdx << "\n";
|
||||
for (int i = 0; i < 1; ++i)
|
||||
{
|
||||
std::cout << "Start of iteration " << i << "\n";
|
||||
|
||||
tmp = run(Settings::data.CurrentPath, walkIdx, evaluationName);
|
||||
tmp = run(Settings::CurrentPath, walkIdx, evaluationName);
|
||||
|
||||
statsAVG.ftm.add(tmp.ftm.getAvg());
|
||||
statsMedian.ftm.add(tmp.ftm.getMedian());
|
||||
|
||||
20
code/misc.h
20
code/misc.h
@@ -48,6 +48,22 @@ struct CombinedStats {
|
||||
Stats::Statistics<T> rssi;
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
void printErrorStats(std::ostream& stream, const CombinedStats<T>& errorStats)
|
||||
{
|
||||
stream << "Walk error:" << "\n";
|
||||
stream << "[m] " << std::setw(10) << "mean" << std::setw(10) << "stdDev" << std::setw(10) << "median" << "\n";
|
||||
|
||||
stream << "FTM " << std::setw(10) << errorStats.ftm.getAvg() << std::setw(10) << errorStats.ftm.getStdDev() << std::setw(10) << errorStats.ftm.getMedian() << "\n";
|
||||
stream << "RSSI " << std::setw(10) << errorStats.rssi.getAvg() << std::setw(10) << errorStats.rssi.getStdDev() << std::setw(10) << errorStats.rssi.getMedian() << "\n";
|
||||
stream << std::endl;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
void printErrorStats(const CombinedStats<T>& errorStats)
|
||||
{
|
||||
return printErrorStats(std::cout, errorStats);
|
||||
}
|
||||
|
||||
|
||||
static std::vector<WifiMeas> filterOfflineData(const Offline::FileReader& fr)
|
||||
@@ -84,10 +100,10 @@ static std::vector<WifiMeas> filterOfflineData(const Offline::FileReader& fr)
|
||||
auto ftm = fr.getWifiFtm()[e.idx].data;
|
||||
|
||||
const MACAddress& mac = ftm.getAP().getMAC();
|
||||
float ftm_offset = Settings::data.CurrentPath.NUCs.at(mac).ftm_offset;
|
||||
float ftm_offset = Settings::CurrentPath.NUCs.at(mac).ftm_offset;
|
||||
float ftmDist = ftm.getFtmDist() + ftm_offset; // in m; plus static offset
|
||||
|
||||
float rssi_pathloss = Settings::data.CurrentPath.NUCs.at(mac).rssi_pathloss;
|
||||
float rssi_pathloss = Settings::CurrentPath.NUCs.at(mac).rssi_pathloss;
|
||||
float rssiDist = LogDistanceModel::rssiToDistance(-40, rssi_pathloss, ftm.getRSSI());
|
||||
|
||||
int nucIndex = Settings::nucIndex(mac);
|
||||
|
||||
318
map/shl.xml
Normal file
318
map/shl.xml
Normal file
@@ -0,0 +1,318 @@
|
||||
<map width="70" depth="50">
|
||||
<earthReg>
|
||||
<correspondences/>
|
||||
</earthReg>
|
||||
<floors>
|
||||
<floor atHeight="0" height="3.4000001" name="2. Stock">
|
||||
<outline>
|
||||
<polygon name="base" method="0" outdoor="false">
|
||||
<point x="1.2" y="43.100002"/>
|
||||
<point x="0.60000002" y="43.100002"/>
|
||||
<point x="0.60000002" y="50.200001"/>
|
||||
<point x="76.900002" y="50.200001"/>
|
||||
<point x="76.900002" y="41.299999"/>
|
||||
<point x="68.099998" y="41.299999"/>
|
||||
<point x="68.099998" y="31.6"/>
|
||||
<point x="18" y="31.6"/>
|
||||
<point x="18" y="0.69999999"/>
|
||||
<point x="1.2" y="0.69999999"/>
|
||||
</polygon>
|
||||
<polygon name="new" method="1" outdoor="false">
|
||||
<point x="52.400002" y="40.799999"/>
|
||||
<point x="59.100002" y="40.799999"/>
|
||||
<point x="59.100002" y="42.799999"/>
|
||||
<point x="52.400002" y="42.799999"/>
|
||||
</polygon>
|
||||
<polygon name="new" method="1" outdoor="false">
|
||||
<point x="12.1" y="40.799999"/>
|
||||
<point x="22.9" y="40.799999"/>
|
||||
<point x="22.9" y="42.799999"/>
|
||||
<point x="12.1" y="42.799999"/>
|
||||
</polygon>
|
||||
<polygon name="new" method="1" outdoor="false">
|
||||
<point x="14.5" y="6.2000003"/>
|
||||
<point x="18" y="6.2000003"/>
|
||||
<point x="18" y="11"/>
|
||||
<point x="14.5" y="11"/>
|
||||
</polygon>
|
||||
<polygon name="new" method="1" outdoor="false">
|
||||
<point x="12.1" y="46.600002"/>
|
||||
<point x="17.1" y="46.600002"/>
|
||||
<point x="17.1" y="50.200001"/>
|
||||
<point x="12.1" y="50.200001"/>
|
||||
</polygon>
|
||||
<polygon name="new" method="1" outdoor="false">
|
||||
<point x="61.5" y="46.600002"/>
|
||||
<point x="66.300003" y="46.600002"/>
|
||||
<point x="66.300003" y="50.200001"/>
|
||||
<point x="61.5" y="50.200001"/>
|
||||
</polygon>
|
||||
<polygon name="new" method="1" outdoor="false">
|
||||
<point x="12.3" y="31.6"/>
|
||||
<point x="13.900001" y="31.6"/>
|
||||
<point x="13.900001" y="39.299999"/>
|
||||
<point x="12.3" y="39.299999"/>
|
||||
</polygon>
|
||||
<polygon name="luft" method="1" outdoor="false">
|
||||
<point x="10" y="40.799999"/>
|
||||
<point x="1.2" y="40.799999"/>
|
||||
<point x="1.2" y="42.799999"/>
|
||||
<point x="10" y="42.799999"/>
|
||||
</polygon>
|
||||
</outline>
|
||||
<obstacles>
|
||||
<wall material="6" type="1" x1="1.2" y1="42.799999" x2="1.2" y2="0.69999999" thickness="0.15000001"/>
|
||||
<wall material="0" type="1" x1="10" y1="0.69999999" x2="10" y2="24.1" thickness="0.15000001">
|
||||
<door type="1" material="2" x01="0.95299143" width="0.89999998" height="2.0999999" io="true" lr="true"/>
|
||||
<door type="1" material="2" x01="0.32905987" width="0.89999998" height="2.0999999" io="true" lr="false"/>
|
||||
<door type="1" material="2" x01="0.23504275" width="0.89999998" height="2.0999999" io="true" lr="true"/>
|
||||
</wall>
|
||||
<wall material="0" type="1" x1="10" y1="7.2000003" x2="1.2" y2="7.2000003" thickness="0.15000001"/>
|
||||
<wall material="0" type="1" x1="10" y1="25.9" x2="10" y2="40.799999" thickness="0.15000001">
|
||||
<door type="1" material="2" x01="0.92991221" width="0.89999998" height="2.0999999" io="true" lr="true"/>
|
||||
<door type="1" material="2" x01="0.13133337" width="0.89999998" height="2.0999999" io="true" lr="false"/>
|
||||
</wall>
|
||||
<wall material="0" type="1" x1="1.2" y1="40.799999" x2="10" y2="40.799999" thickness="0.15000001"/>
|
||||
<wall material="0" type="1" x1="10" y1="25.9" x2="8.1999998" y2="25.9" thickness="0.15000001">
|
||||
<door type="1" material="2" x01="0.77777749" width="0.89999998" height="2.0999999" io="false" lr="true"/>
|
||||
</wall>
|
||||
<wall material="1" type="1" x1="8.1999998" y1="25.9" x2="1.2" y2="25.9" thickness="0.2">
|
||||
<door type="1" material="2" x01="0.87212861" width="0.89999998" height="2.0999999" io="true" lr="true"/>
|
||||
</wall>
|
||||
<wall material="1" type="1" x1="10" y1="24.1" x2="1.2" y2="24.1" thickness="0.15000001"/>
|
||||
<wall material="1" type="1" x1="5.0999999" y1="43.100002" x2="0.60000002" y2="43.100002" thickness="0.30000001"/>
|
||||
<wall material="0" type="1" x1="10.2" y1="44.5" x2="3.9000001" y2="44.5" thickness="0.15000001">
|
||||
<door type="1" material="2" x01="0.52380949" width="0.89999998" height="2.0999999" io="true" lr="false"/>
|
||||
<door type="1" material="2" x01="0.11111109" width="0.89999998" height="2.0999999" io="true" lr="false"/>
|
||||
</wall>
|
||||
<wall material="0" type="1" x1="3.9000001" y1="44.5" x2="3.9000001" y2="50.200001" thickness="0.15000001">
|
||||
<door type="1" material="2" x01="0.81355965" width="0.89999998" height="2.0999999" io="true" lr="true"/>
|
||||
</wall>
|
||||
<wall material="0" type="1" x1="7.5" y1="50.200001" x2="7.5" y2="44.5" thickness="0.15000001">
|
||||
<door type="1" material="2" x01="0.18644036" width="0.89999998" height="2.0999999" io="false" lr="false"/>
|
||||
</wall>
|
||||
<wall material="1" type="1" x1="10.5" y1="48.100002" x2="10.5" y2="44.5" thickness="0.30000001"/>
|
||||
<wall material="1" type="1" x1="10.5" y1="49.100002" x2="10.5" y2="50.200001" thickness="0.25"/>
|
||||
<wall material="1" type="1" x1="0.60000002" y1="50.200001" x2="0.60000002" y2="43.100002" thickness="0.30000001"/>
|
||||
<wall material="1" type="1" x1="1.2" y1="0.69999999" x2="18" y2="0.69999999" thickness="0.15000001"/>
|
||||
<wall material="6" type="1" x1="18" y1="0.69999999" x2="18" y2="31.6" thickness="0.15000001"/>
|
||||
<wall material="0" type="1" x1="18" y1="25.9" x2="12.2" y2="25.9" thickness="0.15000001"/>
|
||||
<wall material="1" type="1" x1="12.2" y1="12.7" x2="18" y2="12.7" thickness="0.25"/>
|
||||
<wall material="1" type="1" x1="12.2" y1="11" x2="14.400001" y2="11" thickness="0.25"/>
|
||||
<wall material="1" type="1" x1="14.400001" y1="11" x2="14.400001" y2="6.2000003" thickness="0.25"/>
|
||||
<wall material="1" type="1" x1="12.2" y1="6.2000003" x2="18" y2="6.2000003" thickness="0.25"/>
|
||||
<wall material="1" type="1" x1="12.2" y1="12.7" x2="12.2" y2="6.2000003" thickness="0.25">
|
||||
<door type="1" material="2" x01="0.030303001" width="1.3" height="2.0999999" io="false" lr="false"/>
|
||||
</wall>
|
||||
<wall material="0" type="1" x1="12.2" y1="13" x2="12.2" y2="25.9" thickness="0.15000001">
|
||||
<door type="1" material="2" x01="0.068702258" width="0.89999998" height="2.0999999" io="true" lr="false"/>
|
||||
<door type="1" material="2" x01="0.95419854" width="0.89999998" height="2.0999999" io="true" lr="true"/>
|
||||
</wall>
|
||||
<wall material="6" type="1" x1="18" y1="31.6" x2="76.900002" y2="31.6" thickness="0.15000001"/>
|
||||
<wall material="6" type="1" x1="76.900002" y1="31.6" x2="76.900002" y2="50.200001" thickness="0.15000001"/>
|
||||
<wall material="6" type="1" x1="76.900002" y1="50.200001" x2="0.60000002" y2="50.200001" thickness="0.15000001"/>
|
||||
<line material="0" type="3" x1="52.400002" y1="42.799999" x2="59.100002" y2="42.799999" thickness="0.15000001"/>
|
||||
<line material="0" type="3" x1="59.100002" y1="42.799999" x2="59.100002" y2="40.799999" thickness="0.15000001"/>
|
||||
<line material="0" type="3" x1="59.100002" y1="40.799999" x2="52.400002" y2="40.799999" thickness="0.15000001"/>
|
||||
<wall material="1" type="1" x1="4.3000002" y1="25.9" x2="4.3000002" y2="24.1" thickness="0.15000001"/>
|
||||
<wall material="0" type="1" x1="8.1999998" y1="24.1" x2="8.1999998" y2="25.9" thickness="0.15000001">
|
||||
<door type="1" material="2" x01="0.88888943" width="0.89999998" height="2.0999999" io="false" lr="true"/>
|
||||
</wall>
|
||||
<wall material="1" type="1" x1="10.5" y1="44.5" x2="17.1" y2="44.5" thickness="0.25">
|
||||
<door type="1" material="2" x01="0.59090918" width="0.89999998" height="2.0999999" io="false" lr="true"/>
|
||||
<door type="1" material="2" x01="0.93939406" width="0.89999998" height="2.0999999" io="false" lr="true"/>
|
||||
<door type="1" material="2" x01="0.030303003" width="1.3" height="2.0999999" io="false" lr="false"/>
|
||||
</wall>
|
||||
<wall material="1" type="1" x1="12.3" y1="46.600002" x2="12.3" y2="44.5" thickness="0.25"/>
|
||||
<wall material="1" type="1" x1="12.3" y1="46.600002" x2="17.1" y2="46.600002" thickness="0.25"/>
|
||||
<wall material="1" type="1" x1="14.7" y1="44.5" x2="14.7" y2="46.600002" thickness="0.25"/>
|
||||
<wall material="1" type="1" x1="17.1" y1="50.200001" x2="17.1" y2="44.5" thickness="0.25"/>
|
||||
<wall material="0" type="1" x1="17.4" y1="44.5" x2="23" y2="44.5" thickness="0.15000001"/>
|
||||
<wall material="0" type="1" x1="23" y1="44.5" x2="23" y2="50.200001" thickness="0.15000001">
|
||||
<door type="1" material="2" x01="0.89473718" width="0.89999998" height="2.0999999" io="false" lr="true"/>
|
||||
</wall>
|
||||
<wall material="1" type="1" x1="25.5" y1="50.200001" x2="25.5" y2="44.5" thickness="0.30000001"/>
|
||||
<wall material="0" type="1" x1="25.5" y1="44.5" x2="50.700001" y2="44.5" thickness="0.15000001">
|
||||
<door type="1" material="2" x01="0.11507935" width="0.89999998" height="2.0999999" io="false" lr="true"/>
|
||||
<door type="1" material="2" x01="0.21349037" width="0.89999998" height="2.0999999" io="false" lr="true"/>
|
||||
<door type="1" material="2" x01="0.28968251" width="0.89999998" height="2.0999999" io="false" lr="true"/>
|
||||
<door type="1" material="2" x01="0.40476194" width="0.89999998" height="2.0999999" io="false" lr="true"/>
|
||||
<door type="1" material="2" x01="0.51984131" width="0.89999998" height="2.0999999" io="false" lr="true"/>
|
||||
<door type="1" material="2" x01="0.63888896" width="0.89999998" height="2.0999999" io="false" lr="true"/>
|
||||
<door type="1" material="2" x01="0.73746985" width="0.89999998" height="2.0999999" io="false" lr="true"/>
|
||||
<door type="1" material="2" x01="0.82936513" width="0.89999998" height="2.0999999" io="false" lr="true"/>
|
||||
<door type="1" material="2" x01="0.88095617" width="0.89999998" height="2.0999999" io="false" lr="false"/>
|
||||
</wall>
|
||||
<wall material="0" type="1" x1="29.1" y1="44.5" x2="29.1" y2="50.200001" thickness="0.15000001"/>
|
||||
<wall material="0" type="1" x1="31.5" y1="44.5" x2="31.5" y2="50.200001" thickness="0.15000001"/>
|
||||
<wall material="0" type="1" x1="33.900002" y1="44.5" x2="33.900002" y2="50.200001" thickness="0.15000001"/>
|
||||
<wall material="0" type="1" x1="36.299999" y1="44.5" x2="36.299999" y2="50.200001" thickness="0.15000001"/>
|
||||
<wall material="0" type="1" x1="39.299999" y1="44.5" x2="39.299999" y2="50.200001" thickness="0.15000001"/>
|
||||
<wall material="0" type="1" x1="42.299999" y1="44.5" x2="42.299999" y2="50.200001" thickness="0.15000001"/>
|
||||
<wall material="0" type="1" x1="44.600002" y1="44.5" x2="44.600002" y2="50.200001" thickness="0.15000001"/>
|
||||
<wall material="1" type="1" x1="50.700001" y1="44.5" x2="50.700001" y2="50.200001" thickness="0.15000001"/>
|
||||
<wall material="0" type="1" x1="51.100002" y1="50.200001" x2="51.100002" y2="44.5" thickness="0.15000001"/>
|
||||
<wall material="0" type="1" x1="51.100002" y1="44.5" x2="61" y2="44.5" thickness="0.15000001">
|
||||
<door type="1" material="2" x01="0.93939412" width="0.89999998" height="2.0999999" io="false" lr="true"/>
|
||||
<door type="1" material="2" x01="0.4949494" width="0.89999998" height="2.0999999" io="false" lr="true"/>
|
||||
</wall>
|
||||
<wall material="0" type="1" x1="56.600002" y1="44.5" x2="56.600002" y2="50.200001" thickness="0.15000001"/>
|
||||
<wall material="0" type="1" x1="61" y1="44.5" x2="61" y2="50.200001" thickness="0.15000001"/>
|
||||
<wall material="1" type="1" x1="61.5" y1="50.200001" x2="61.5" y2="44.5" thickness="0.25"/>
|
||||
<wall material="1" type="1" x1="61.5" y1="44.5" x2="64.400002" y2="44.5" thickness="0.25">
|
||||
<door type="1" material="2" x01="0.86206847" width="0.89999998" height="2.0999999" io="false" lr="true"/>
|
||||
</wall>
|
||||
<wall material="1" type="1" x1="61.5" y1="46.600002" x2="66.400002" y2="46.600002" thickness="0.25"/>
|
||||
<wall material="1" type="1" x1="66.400002" y1="46.600002" x2="66.400002" y2="44.5" thickness="0.25"/>
|
||||
<wall material="1" type="1" x1="64.400002" y1="46.600002" x2="64.400002" y2="44.5" thickness="0.25"/>
|
||||
<wall material="0" type="1" x1="70.5" y1="44.5" x2="70.5" y2="50.200001" thickness="0.15000001">
|
||||
<door type="1" material="2" x01="0.8308323" width="0.89999998" height="2.0999999" io="true" lr="true"/>
|
||||
</wall>
|
||||
<wall material="1" type="1" x1="68.099998" y1="48.400002" x2="68.099998" y2="44.5" thickness="0.25"/>
|
||||
<wall material="0" type="1" x1="76.900002" y1="44.5" x2="68.400002" y2="44.5" thickness="0.15000001">
|
||||
<door type="1" material="2" x01="0.82352942" width="0.89999998" height="2.0999999" io="true" lr="false"/>
|
||||
<door type="1" material="2" x01="0.65882331" width="0.89999998" height="2.0999999" io="true" lr="true"/>
|
||||
</wall>
|
||||
<line material="0" type="3" x1="12.1" y1="42.799999" x2="12.1" y2="40.799999" thickness="0.15000001"/>
|
||||
<line material="0" type="3" x1="12.1" y1="40.799999" x2="22.9" y2="40.799999" thickness="0.15000001"/>
|
||||
<line material="0" type="3" x1="22.9" y1="40.799999" x2="22.9" y2="42.799999" thickness="0.15000001"/>
|
||||
<line material="0" type="3" x1="22.9" y1="42.799999" x2="12.1" y2="42.799999" thickness="0.15000001"/>
|
||||
<line material="0" type="3" x1="12.3" y1="39.299999" x2="12.3" y2="31.6" thickness="0.15000001"/>
|
||||
<wall material="0" type="1" x1="13.900001" y1="39.299999" x2="13.900001" y2="31.6" thickness="0.15000001"/>
|
||||
<wall material="0" type="1" x1="13.900001" y1="39.299999" x2="68.099998" y2="39.299999" thickness="0.15000001">
|
||||
<door type="1" material="2" x01="0.97601473" width="0.89999998" height="2.0999999" io="true" lr="true"/>
|
||||
<door type="1" material="2" x01="0.79966301" width="0.89999998" height="2.0999999" io="true" lr="false"/>
|
||||
<door type="1" material="2" x01="0.70069867" width="0.89999998" height="2.0999999" io="true" lr="false"/>
|
||||
<door type="1" material="2" x01="0.56931776" width="0.89999998" height="2.0999999" io="true" lr="false"/>
|
||||
<door type="1" material="2" x01="0.5523302" width="0.89999998" height="2.0999999" io="true" lr="true"/>
|
||||
<door type="1" material="2" x01="0.42435426" width="0.89999998" height="2.0999999" io="true" lr="false"/>
|
||||
<door type="1" material="2" x01="0.38229868" width="0.89999998" height="2.0999999" io="true" lr="false"/>
|
||||
<door type="1" material="2" x01="0.35549262" width="0.89999998" height="2.0999999" io="true" lr="true"/>
|
||||
<door type="1" material="2" x01="0.31180814" width="0.89999998" height="2.0999999" io="true" lr="true"/>
|
||||
<door type="1" material="2" x01="0.010910105" width="0.89999998" height="2.0999999" io="true" lr="false"/>
|
||||
</wall>
|
||||
<wall material="1" type="1" x1="25.5" y1="39.299999" x2="25.5" y2="31.6" thickness="0.15000001">
|
||||
<door type="1" material="2" x01="0.15584378" width="0.89999998" height="2.0999999" io="true" lr="false"/>
|
||||
</wall>
|
||||
<wall material="0" type="1" x1="31.5" y1="39.299999" x2="31.5" y2="31.6" thickness="0.15000001">
|
||||
<door type="1" material="2" x01="0.15584378" width="0.89999998" height="2.0999999" io="false" lr="false"/>
|
||||
</wall>
|
||||
<wall material="0" type="1" x1="33.900002" y1="39.299999" x2="33.900002" y2="31.6" thickness="0.15000001"/>
|
||||
<wall material="0" type="1" x1="36.299999" y1="39.299999" x2="36.299999" y2="31.6" thickness="0.15000001">
|
||||
<door type="1" material="2" x01="0.15584378" width="0.89999998" height="2.0999999" io="true" lr="false"/>
|
||||
</wall>
|
||||
<wall material="1" type="1" x1="42.299999" y1="39.299999" x2="42.299999" y2="31.6" thickness="0.25"/>
|
||||
<wall material="1" type="1" x1="42.299999" y1="34.900002" x2="44.100002" y2="34.900002" thickness="0.25">
|
||||
<door type="1" material="2" x01="0.83333194" width="0.89999998" height="2.0999999" io="false" lr="true"/>
|
||||
</wall>
|
||||
<wall material="1" type="1" x1="44.100002" y1="31.6" x2="44.100002" y2="39.299999" thickness="0.25"/>
|
||||
<wall material="0" type="1" x1="50.600002" y1="39.299999" x2="50.600002" y2="31.6" thickness="0.15000001"/>
|
||||
<wall material="0" type="1" x1="56" y1="39.299999" x2="56" y2="31.6" thickness="0.15000001"/>
|
||||
<wall material="0" type="1" x1="47.100002" y1="50.200001" x2="47.100002" y2="44.5" thickness="0.15000001"/>
|
||||
<wall material="0" type="1" x1="1.2" y1="15.400001" x2="10" y2="15.400001" thickness="0.15000001"/>
|
||||
<line material="0" type="3" x1="68.099998" y1="41.299999" x2="76.900002" y2="41.299999" thickness="0.15000001"/>
|
||||
<wall material="1" type="1" x1="68.099998" y1="39.299999" x2="68.099998" y2="31.6" thickness="0.15000001"/>
|
||||
<line material="0" type="3" x1="68.099998" y1="41.299999" x2="68.099998" y2="39.299999" thickness="0.15000001"/>
|
||||
<line material="0" type="3" x1="5.0999999" y1="42.799999" x2="10" y2="42.799999" thickness="0.15000001"/>
|
||||
<line material="0" type="3" x1="10" y1="40.799999" x2="10" y2="42.799999" thickness="0.15000001"/>
|
||||
<wall material="3" type="1" x1="12.2" y1="0.69999999" x2="12.2" y2="5.9000001" thickness="0.15000001">
|
||||
<door type="1" material="2" x01="0.13643573" width="0.89999998" height="2.0999999" io="true" lr="false"/>
|
||||
</wall>
|
||||
<door material="4" type="1" x1="10" y1="25.9" x2="11" y2="25.9" height="2.0999999" swap="false"/>
|
||||
<wall material="4" type="1" x1="11" y1="25.9" x2="12.2" y2="25.9" thickness="0.15000001"/>
|
||||
<wall material="1" type="1" x1="13.900001" y1="31.6" x2="18" y2="31.6" thickness="0.2"/>
|
||||
<wall material="3" type="1" x1="10.2" y1="44.5" x2="10.2" y2="50.200001" thickness="0.2">
|
||||
<door type="1" material="2" x01="0.81355965" width="1" height="2.0999999" io="false" lr="true"/>
|
||||
</wall>
|
||||
<wall material="3" type="1" x1="17.4" y1="44.5" x2="17.4" y2="50.200001" thickness="0.2"/>
|
||||
<wall material="3" type="1" x1="5.0999999" y1="42.799999" x2="5.0999999" y2="44.5" thickness="0.2">
|
||||
<door type="1" material="2" x01="0.35294235" width="0.89999998" height="2.0999999" io="false" lr="false"/>
|
||||
</wall>
|
||||
<wall material="3" type="1" x1="25" y1="44.5" x2="25" y2="50.200001" thickness="0.2"/>
|
||||
<wall material="1" type="1" x1="66.400002" y1="44.5" x2="68.099998" y2="44.5" thickness="0.25">
|
||||
<door type="1" material="2" x01="0.8823545" width="1.3" height="2.0999999" io="false" lr="true"/>
|
||||
</wall>
|
||||
<wall material="3" type="1" x1="12.2" y1="5.9000001" x2="18" y2="5.9000001" thickness="0.2"/>
|
||||
<wall material="3" type="1" x1="12.2" y1="13" x2="18" y2="13" thickness="0.2"/>
|
||||
<wall material="3" type="1" x1="68.400002" y1="44.5" x2="68.400002" y2="50.200001" thickness="0.2">
|
||||
<door type="1" material="2" x01="0.84210497" width="0.89999998" height="2.0999999" io="true" lr="true"/>
|
||||
</wall>
|
||||
<wall material="1" type="1" x1="68.099998" y1="50.200001" x2="68.099998" y2="49.299999" thickness="0.25"/>
|
||||
</obstacles>
|
||||
<underlays>
|
||||
<underlay x="-13.15" y="-18.049999" sx="0.025403051" sy="0.025403051" name="" file="../IndoorMap/maps/stock2.png"/>
|
||||
</underlays>
|
||||
<pois>
|
||||
<poi name="I.2.43" type="0" x="73.5" y="47.400002"/>
|
||||
<poi name="I.2.42" type="0" x="69.200005" y="47.400002"/>
|
||||
<poi name="I.2.13" type="0" x="15.1" y="3.3"/>
|
||||
<poi name="I.2.14" type="0" x="5.4000001" y="4.0999999"/>
|
||||
<poi name="I.2.15" type="0" x="5.2000003" y="11.7"/>
|
||||
<poi name="I.2.11" type="0" x="14.900001" y="17.200001"/>
|
||||
<poi name="I.2.16" type="0" x="5.9000001" y="25"/>
|
||||
<poi name="I.2.17" type="0" x="2.3" y="25"/>
|
||||
<poi name="I.2.18" type="0" x="4.9000001" y="30.300001"/>
|
||||
<poi name="I.2.19" type="0" x="5.3000002" y="37.299999"/>
|
||||
<poi name="I.2.20" type="0" x="1.9" y="47"/>
|
||||
<poi name="I.2.21" type="0" x="5.3000002" y="47.700001"/>
|
||||
<poi name="I.2.22" type="0" x="8.4000006" y="47.400002"/>
|
||||
<poi name="HLS 3" type="0" x="12.7" y="45.5"/>
|
||||
<poi name="I.2.25" type="0" x="15.2" y="45.200001"/>
|
||||
<poi name="I.2.26" type="0" x="19.6" y="47.200001"/>
|
||||
<poi name="I.2.28" type="0" x="26.5" y="47.200001"/>
|
||||
<poi name="I.2.29" type="0" x="29.5" y="46.900002"/>
|
||||
<poi name="I.2.30" type="0" x="31.800001" y="47.5"/>
|
||||
<poi name="I.2.31" type="0" x="34.400002" y="47.200001"/>
|
||||
<poi name="I.2.32" type="0" x="37.100002" y="47.200001"/>
|
||||
<poi name="I.2.33" type="0" x="40.299999" y="46.200001"/>
|
||||
<poi name="I.2.34" type="0" x="42.700001" y="47.5"/>
|
||||
<poi name="I.2.35" type="0" x="44.900002" y="47"/>
|
||||
<poi name="I.2.36" type="0" x="47.799999" y="47.100002"/>
|
||||
<poi name="I.2.37" type="0" x="53.900002" y="47.400002"/>
|
||||
<poi name="I.2.38" type="0" x="58.5" y="47.400002"/>
|
||||
<poi name="I.2.1" type="0" x="62" y="35.700001"/>
|
||||
<poi name="I.2.2" type="0" x="53.299999" y="35.400002"/>
|
||||
<poi name="I.2.3" type="0" x="47.200001" y="35.400002"/>
|
||||
<poi name="I.2.4" type="0" x="42.900002" y="37"/>
|
||||
<poi name="I.2.5" type="0" x="42.799999" y="33.200001"/>
|
||||
<poi name="I.2.6" type="0" x="39.200001" y="35.5"/>
|
||||
<poi name="I.2.7" type="0" x="34.600002" y="35.600002"/>
|
||||
<poi name="I.2.8" type="0" x="31.800001" y="35.600002"/>
|
||||
<poi name="I.2.9" type="0" x="28.4" y="35.600002"/>
|
||||
<poi name="I.2.10" type="0" x="19.300001" y="35.400002"/>
|
||||
</pois>
|
||||
<gtpoints>
|
||||
<gtpoint id="100" x="71.800003" y="44" z="0"/>
|
||||
<gtpoint id="101" x="55.600002" y="44" z="0"/>
|
||||
<gtpoint id="102" x="42.200001" y="44" z="0"/>
|
||||
<gtpoint id="103" x="35" y="40" z="0"/>
|
||||
<gtpoint id="104" x="11" y="40" z="0"/>
|
||||
<gtpoint id="105" x="11" y="12" z="0"/>
|
||||
<gtpoint id="200" x="24" y="38" z="0"/>
|
||||
<gtpoint id="201" x="15" y="38" z="0"/>
|
||||
<gtpoint id="203" x="15" y="40" z="0"/>
|
||||
<gtpoint id="204" x="11" y="43.600002" z="0"/>
|
||||
<gtpoint id="205" x="35.200001" y="43.600002" z="0"/>
|
||||
<gtpoint id="206" x="45.200001" y="39.799999" z="0"/>
|
||||
<gtpoint id="207" x="45" y="33" z="0"/>
|
||||
<gtpoint id="208" x="57.600002" y="40" z="0"/>
|
||||
<gtpoint id="209" x="57.600002" y="32.600002" z="0"/>
|
||||
<gtpoint id="210" x="66.400002" y="32.600002" z="0"/>
|
||||
<gtpoint id="211" x="66.400002" y="42" z="0"/>
|
||||
<gtpoint id="212" x="60" y="42" z="0"/>
|
||||
</gtpoints>
|
||||
<accesspoints>
|
||||
<accesspoint name="NUC3" mac="XX:XX:XX:XX:XX:XX" x="27" y="45" z="2" mdl_txp="0" mdl_exp="0" mdl_waf="0"/>
|
||||
<accesspoint name="NUC1" mac="XX:XX:XX:XX:XX:XX" x="54" y="46" z="2" mdl_txp="0" mdl_exp="0" mdl_waf="0"/>
|
||||
<accesspoint name="NUC2" mac="XX:XX:XX:XX:XX:XX" x="45" y="37" z="2" mdl_txp="0" mdl_exp="0" mdl_waf="0"/>
|
||||
<accesspoint name="NUC4" mac="XX:XX:XX:XX:XX:XX" x="16" y="36" z="2" mdl_txp="0" mdl_exp="0" mdl_waf="0"/>
|
||||
</accesspoints>
|
||||
<beacons/>
|
||||
<fingerprints/>
|
||||
<stairs>
|
||||
</stairs>
|
||||
<elevators>
|
||||
</elevators>
|
||||
</floor>
|
||||
</floors>
|
||||
</map>
|
||||
318
map/shl_nuc_gang.xml
Normal file
318
map/shl_nuc_gang.xml
Normal file
@@ -0,0 +1,318 @@
|
||||
<map width="70" depth="50">
|
||||
<earthReg>
|
||||
<correspondences/>
|
||||
</earthReg>
|
||||
<floors>
|
||||
<floor atHeight="0" height="3.4000001" name="2. Stock">
|
||||
<outline>
|
||||
<polygon name="base" method="0" outdoor="false">
|
||||
<point x="1.2" y="43.100002"/>
|
||||
<point x="0.60000002" y="43.100002"/>
|
||||
<point x="0.60000002" y="50.200001"/>
|
||||
<point x="76.900002" y="50.200001"/>
|
||||
<point x="76.900002" y="41.299999"/>
|
||||
<point x="68.099998" y="41.299999"/>
|
||||
<point x="68.099998" y="31.6"/>
|
||||
<point x="18" y="31.6"/>
|
||||
<point x="18" y="0.69999999"/>
|
||||
<point x="1.2" y="0.69999999"/>
|
||||
</polygon>
|
||||
<polygon name="new" method="1" outdoor="false">
|
||||
<point x="52.400002" y="40.799999"/>
|
||||
<point x="59.100002" y="40.799999"/>
|
||||
<point x="59.100002" y="42.799999"/>
|
||||
<point x="52.400002" y="42.799999"/>
|
||||
</polygon>
|
||||
<polygon name="new" method="1" outdoor="false">
|
||||
<point x="12.1" y="40.799999"/>
|
||||
<point x="22.9" y="40.799999"/>
|
||||
<point x="22.9" y="42.799999"/>
|
||||
<point x="12.1" y="42.799999"/>
|
||||
</polygon>
|
||||
<polygon name="new" method="1" outdoor="false">
|
||||
<point x="14.5" y="6.2000003"/>
|
||||
<point x="18" y="6.2000003"/>
|
||||
<point x="18" y="11"/>
|
||||
<point x="14.5" y="11"/>
|
||||
</polygon>
|
||||
<polygon name="new" method="1" outdoor="false">
|
||||
<point x="12.1" y="46.600002"/>
|
||||
<point x="17.1" y="46.600002"/>
|
||||
<point x="17.1" y="50.200001"/>
|
||||
<point x="12.1" y="50.200001"/>
|
||||
</polygon>
|
||||
<polygon name="new" method="1" outdoor="false">
|
||||
<point x="61.5" y="46.600002"/>
|
||||
<point x="66.300003" y="46.600002"/>
|
||||
<point x="66.300003" y="50.200001"/>
|
||||
<point x="61.5" y="50.200001"/>
|
||||
</polygon>
|
||||
<polygon name="new" method="1" outdoor="false">
|
||||
<point x="12.3" y="31.6"/>
|
||||
<point x="13.900001" y="31.6"/>
|
||||
<point x="13.900001" y="39.299999"/>
|
||||
<point x="12.3" y="39.299999"/>
|
||||
</polygon>
|
||||
<polygon name="luft" method="1" outdoor="false">
|
||||
<point x="10" y="40.799999"/>
|
||||
<point x="1.2" y="40.799999"/>
|
||||
<point x="1.2" y="42.799999"/>
|
||||
<point x="10" y="42.799999"/>
|
||||
</polygon>
|
||||
</outline>
|
||||
<obstacles>
|
||||
<wall material="6" type="1" x1="1.2" y1="42.799999" x2="1.2" y2="0.69999999" thickness="0.15000001"/>
|
||||
<wall material="0" type="1" x1="10" y1="0.69999999" x2="10" y2="24.1" thickness="0.15000001">
|
||||
<door type="1" material="2" x01="0.95299143" width="0.89999998" height="2.0999999" io="true" lr="true"/>
|
||||
<door type="1" material="2" x01="0.32905987" width="0.89999998" height="2.0999999" io="true" lr="false"/>
|
||||
<door type="1" material="2" x01="0.23504275" width="0.89999998" height="2.0999999" io="true" lr="true"/>
|
||||
</wall>
|
||||
<wall material="0" type="1" x1="10" y1="7.2000003" x2="1.2" y2="7.2000003" thickness="0.15000001"/>
|
||||
<wall material="0" type="1" x1="10" y1="25.9" x2="10" y2="40.799999" thickness="0.15000001">
|
||||
<door type="1" material="2" x01="0.92991221" width="0.89999998" height="2.0999999" io="true" lr="true"/>
|
||||
<door type="1" material="2" x01="0.13133337" width="0.89999998" height="2.0999999" io="true" lr="false"/>
|
||||
</wall>
|
||||
<wall material="0" type="1" x1="1.2" y1="40.799999" x2="10" y2="40.799999" thickness="0.15000001"/>
|
||||
<wall material="0" type="1" x1="10" y1="25.9" x2="8.1999998" y2="25.9" thickness="0.15000001">
|
||||
<door type="1" material="2" x01="0.77777749" width="0.89999998" height="2.0999999" io="false" lr="true"/>
|
||||
</wall>
|
||||
<wall material="1" type="1" x1="8.1999998" y1="25.9" x2="1.2" y2="25.9" thickness="0.2">
|
||||
<door type="1" material="2" x01="0.87212861" width="0.89999998" height="2.0999999" io="true" lr="true"/>
|
||||
</wall>
|
||||
<wall material="1" type="1" x1="10" y1="24.1" x2="1.2" y2="24.1" thickness="0.15000001"/>
|
||||
<wall material="1" type="1" x1="5.0999999" y1="43.100002" x2="0.60000002" y2="43.100002" thickness="0.30000001"/>
|
||||
<wall material="0" type="1" x1="10.2" y1="44.5" x2="3.9000001" y2="44.5" thickness="0.15000001">
|
||||
<door type="1" material="2" x01="0.52380949" width="0.89999998" height="2.0999999" io="true" lr="false"/>
|
||||
<door type="1" material="2" x01="0.11111109" width="0.89999998" height="2.0999999" io="true" lr="false"/>
|
||||
</wall>
|
||||
<wall material="0" type="1" x1="3.9000001" y1="44.5" x2="3.9000001" y2="50.200001" thickness="0.15000001">
|
||||
<door type="1" material="2" x01="0.81355965" width="0.89999998" height="2.0999999" io="true" lr="true"/>
|
||||
</wall>
|
||||
<wall material="0" type="1" x1="7.5" y1="50.200001" x2="7.5" y2="44.5" thickness="0.15000001">
|
||||
<door type="1" material="2" x01="0.18644036" width="0.89999998" height="2.0999999" io="false" lr="false"/>
|
||||
</wall>
|
||||
<wall material="1" type="1" x1="10.5" y1="48.100002" x2="10.5" y2="44.5" thickness="0.30000001"/>
|
||||
<wall material="1" type="1" x1="10.5" y1="49.100002" x2="10.5" y2="50.200001" thickness="0.25"/>
|
||||
<wall material="1" type="1" x1="0.60000002" y1="50.200001" x2="0.60000002" y2="43.100002" thickness="0.30000001"/>
|
||||
<wall material="1" type="1" x1="1.2" y1="0.69999999" x2="18" y2="0.69999999" thickness="0.15000001"/>
|
||||
<wall material="6" type="1" x1="18" y1="0.69999999" x2="18" y2="31.6" thickness="0.15000001"/>
|
||||
<wall material="0" type="1" x1="18" y1="25.9" x2="12.2" y2="25.9" thickness="0.15000001"/>
|
||||
<wall material="1" type="1" x1="12.2" y1="12.7" x2="18" y2="12.7" thickness="0.25"/>
|
||||
<wall material="1" type="1" x1="12.2" y1="11" x2="14.400001" y2="11" thickness="0.25"/>
|
||||
<wall material="1" type="1" x1="14.400001" y1="11" x2="14.400001" y2="6.2000003" thickness="0.25"/>
|
||||
<wall material="1" type="1" x1="12.2" y1="6.2000003" x2="18" y2="6.2000003" thickness="0.25"/>
|
||||
<wall material="1" type="1" x1="12.2" y1="12.7" x2="12.2" y2="6.2000003" thickness="0.25">
|
||||
<door type="1" material="2" x01="0.030303001" width="1.3" height="2.0999999" io="false" lr="false"/>
|
||||
</wall>
|
||||
<wall material="0" type="1" x1="12.2" y1="13" x2="12.2" y2="25.9" thickness="0.15000001">
|
||||
<door type="1" material="2" x01="0.068702258" width="0.89999998" height="2.0999999" io="true" lr="false"/>
|
||||
<door type="1" material="2" x01="0.95419854" width="0.89999998" height="2.0999999" io="true" lr="true"/>
|
||||
</wall>
|
||||
<wall material="6" type="1" x1="18" y1="31.6" x2="76.900002" y2="31.6" thickness="0.15000001"/>
|
||||
<wall material="6" type="1" x1="76.900002" y1="31.6" x2="76.900002" y2="50.200001" thickness="0.15000001"/>
|
||||
<wall material="6" type="1" x1="76.900002" y1="50.200001" x2="0.60000002" y2="50.200001" thickness="0.15000001"/>
|
||||
<line material="0" type="3" x1="52.400002" y1="42.799999" x2="59.100002" y2="42.799999" thickness="0.15000001"/>
|
||||
<line material="0" type="3" x1="59.100002" y1="42.799999" x2="59.100002" y2="40.799999" thickness="0.15000001"/>
|
||||
<line material="0" type="3" x1="59.100002" y1="40.799999" x2="52.400002" y2="40.799999" thickness="0.15000001"/>
|
||||
<wall material="1" type="1" x1="4.3000002" y1="25.9" x2="4.3000002" y2="24.1" thickness="0.15000001"/>
|
||||
<wall material="0" type="1" x1="8.1999998" y1="24.1" x2="8.1999998" y2="25.9" thickness="0.15000001">
|
||||
<door type="1" material="2" x01="0.88888943" width="0.89999998" height="2.0999999" io="false" lr="true"/>
|
||||
</wall>
|
||||
<wall material="1" type="1" x1="10.5" y1="44.5" x2="17.1" y2="44.5" thickness="0.25">
|
||||
<door type="1" material="2" x01="0.59090918" width="0.89999998" height="2.0999999" io="false" lr="true"/>
|
||||
<door type="1" material="2" x01="0.93939406" width="0.89999998" height="2.0999999" io="false" lr="true"/>
|
||||
<door type="1" material="2" x01="0.030303003" width="1.3" height="2.0999999" io="false" lr="false"/>
|
||||
</wall>
|
||||
<wall material="1" type="1" x1="12.3" y1="46.600002" x2="12.3" y2="44.5" thickness="0.25"/>
|
||||
<wall material="1" type="1" x1="12.3" y1="46.600002" x2="17.1" y2="46.600002" thickness="0.25"/>
|
||||
<wall material="1" type="1" x1="14.7" y1="44.5" x2="14.7" y2="46.600002" thickness="0.25"/>
|
||||
<wall material="1" type="1" x1="17.1" y1="50.200001" x2="17.1" y2="44.5" thickness="0.25"/>
|
||||
<wall material="0" type="1" x1="17.4" y1="44.5" x2="23" y2="44.5" thickness="0.15000001"/>
|
||||
<wall material="0" type="1" x1="23" y1="44.5" x2="23" y2="50.200001" thickness="0.15000001">
|
||||
<door type="1" material="2" x01="0.89473718" width="0.89999998" height="2.0999999" io="false" lr="true"/>
|
||||
</wall>
|
||||
<wall material="1" type="1" x1="25.5" y1="50.200001" x2="25.5" y2="44.5" thickness="0.30000001"/>
|
||||
<wall material="0" type="1" x1="25.5" y1="44.5" x2="50.700001" y2="44.5" thickness="0.15000001">
|
||||
<door type="1" material="2" x01="0.11507935" width="0.89999998" height="2.0999999" io="false" lr="true"/>
|
||||
<door type="1" material="2" x01="0.21349037" width="0.89999998" height="2.0999999" io="false" lr="true"/>
|
||||
<door type="1" material="2" x01="0.28968251" width="0.89999998" height="2.0999999" io="false" lr="true"/>
|
||||
<door type="1" material="2" x01="0.40476194" width="0.89999998" height="2.0999999" io="false" lr="true"/>
|
||||
<door type="1" material="2" x01="0.51984131" width="0.89999998" height="2.0999999" io="false" lr="true"/>
|
||||
<door type="1" material="2" x01="0.63888896" width="0.89999998" height="2.0999999" io="false" lr="true"/>
|
||||
<door type="1" material="2" x01="0.73746985" width="0.89999998" height="2.0999999" io="false" lr="true"/>
|
||||
<door type="1" material="2" x01="0.82936513" width="0.89999998" height="2.0999999" io="false" lr="true"/>
|
||||
<door type="1" material="2" x01="0.88095617" width="0.89999998" height="2.0999999" io="false" lr="false"/>
|
||||
</wall>
|
||||
<wall material="0" type="1" x1="29.1" y1="44.5" x2="29.1" y2="50.200001" thickness="0.15000001"/>
|
||||
<wall material="0" type="1" x1="31.5" y1="44.5" x2="31.5" y2="50.200001" thickness="0.15000001"/>
|
||||
<wall material="0" type="1" x1="33.900002" y1="44.5" x2="33.900002" y2="50.200001" thickness="0.15000001"/>
|
||||
<wall material="0" type="1" x1="36.299999" y1="44.5" x2="36.299999" y2="50.200001" thickness="0.15000001"/>
|
||||
<wall material="0" type="1" x1="39.299999" y1="44.5" x2="39.299999" y2="50.200001" thickness="0.15000001"/>
|
||||
<wall material="0" type="1" x1="42.299999" y1="44.5" x2="42.299999" y2="50.200001" thickness="0.15000001"/>
|
||||
<wall material="0" type="1" x1="44.600002" y1="44.5" x2="44.600002" y2="50.200001" thickness="0.15000001"/>
|
||||
<wall material="1" type="1" x1="50.700001" y1="44.5" x2="50.700001" y2="50.200001" thickness="0.15000001"/>
|
||||
<wall material="0" type="1" x1="51.100002" y1="50.200001" x2="51.100002" y2="44.5" thickness="0.15000001"/>
|
||||
<wall material="0" type="1" x1="51.100002" y1="44.5" x2="61" y2="44.5" thickness="0.15000001">
|
||||
<door type="1" material="2" x01="0.93939412" width="0.89999998" height="2.0999999" io="false" lr="true"/>
|
||||
<door type="1" material="2" x01="0.4949494" width="0.89999998" height="2.0999999" io="false" lr="true"/>
|
||||
</wall>
|
||||
<wall material="0" type="1" x1="56.600002" y1="44.5" x2="56.600002" y2="50.200001" thickness="0.15000001"/>
|
||||
<wall material="0" type="1" x1="61" y1="44.5" x2="61" y2="50.200001" thickness="0.15000001"/>
|
||||
<wall material="1" type="1" x1="61.5" y1="50.200001" x2="61.5" y2="44.5" thickness="0.25"/>
|
||||
<wall material="1" type="1" x1="61.5" y1="44.5" x2="64.400002" y2="44.5" thickness="0.25">
|
||||
<door type="1" material="2" x01="0.86206847" width="0.89999998" height="2.0999999" io="false" lr="true"/>
|
||||
</wall>
|
||||
<wall material="1" type="1" x1="61.5" y1="46.600002" x2="66.400002" y2="46.600002" thickness="0.25"/>
|
||||
<wall material="1" type="1" x1="66.400002" y1="46.600002" x2="66.400002" y2="44.5" thickness="0.25"/>
|
||||
<wall material="1" type="1" x1="64.400002" y1="46.600002" x2="64.400002" y2="44.5" thickness="0.25"/>
|
||||
<wall material="0" type="1" x1="70.5" y1="44.5" x2="70.5" y2="50.200001" thickness="0.15000001">
|
||||
<door type="1" material="2" x01="0.8308323" width="0.89999998" height="2.0999999" io="true" lr="true"/>
|
||||
</wall>
|
||||
<wall material="1" type="1" x1="68.099998" y1="48.400002" x2="68.099998" y2="44.5" thickness="0.25"/>
|
||||
<wall material="0" type="1" x1="76.900002" y1="44.5" x2="68.400002" y2="44.5" thickness="0.15000001">
|
||||
<door type="1" material="2" x01="0.82352942" width="0.89999998" height="2.0999999" io="true" lr="false"/>
|
||||
<door type="1" material="2" x01="0.65882331" width="0.89999998" height="2.0999999" io="true" lr="true"/>
|
||||
</wall>
|
||||
<line material="0" type="3" x1="12.1" y1="42.799999" x2="12.1" y2="40.799999" thickness="0.15000001"/>
|
||||
<line material="0" type="3" x1="12.1" y1="40.799999" x2="22.9" y2="40.799999" thickness="0.15000001"/>
|
||||
<line material="0" type="3" x1="22.9" y1="40.799999" x2="22.9" y2="42.799999" thickness="0.15000001"/>
|
||||
<line material="0" type="3" x1="22.9" y1="42.799999" x2="12.1" y2="42.799999" thickness="0.15000001"/>
|
||||
<line material="0" type="3" x1="12.3" y1="39.299999" x2="12.3" y2="31.6" thickness="0.15000001"/>
|
||||
<wall material="0" type="1" x1="13.900001" y1="39.299999" x2="13.900001" y2="31.6" thickness="0.15000001"/>
|
||||
<wall material="0" type="1" x1="13.900001" y1="39.299999" x2="68.099998" y2="39.299999" thickness="0.15000001">
|
||||
<door type="1" material="2" x01="0.97601473" width="0.89999998" height="2.0999999" io="true" lr="true"/>
|
||||
<door type="1" material="2" x01="0.79966301" width="0.89999998" height="2.0999999" io="true" lr="false"/>
|
||||
<door type="1" material="2" x01="0.70069867" width="0.89999998" height="2.0999999" io="true" lr="false"/>
|
||||
<door type="1" material="2" x01="0.56931776" width="0.89999998" height="2.0999999" io="true" lr="false"/>
|
||||
<door type="1" material="2" x01="0.5523302" width="0.89999998" height="2.0999999" io="true" lr="true"/>
|
||||
<door type="1" material="2" x01="0.42435426" width="0.89999998" height="2.0999999" io="true" lr="false"/>
|
||||
<door type="1" material="2" x01="0.38229868" width="0.89999998" height="2.0999999" io="true" lr="false"/>
|
||||
<door type="1" material="2" x01="0.35549262" width="0.89999998" height="2.0999999" io="true" lr="true"/>
|
||||
<door type="1" material="2" x01="0.31180814" width="0.89999998" height="2.0999999" io="true" lr="true"/>
|
||||
<door type="1" material="2" x01="0.010910105" width="0.89999998" height="2.0999999" io="true" lr="false"/>
|
||||
</wall>
|
||||
<wall material="1" type="1" x1="25.5" y1="39.299999" x2="25.5" y2="31.6" thickness="0.15000001">
|
||||
<door type="1" material="2" x01="0.15584378" width="0.89999998" height="2.0999999" io="true" lr="false"/>
|
||||
</wall>
|
||||
<wall material="0" type="1" x1="31.5" y1="39.299999" x2="31.5" y2="31.6" thickness="0.15000001">
|
||||
<door type="1" material="2" x01="0.15584378" width="0.89999998" height="2.0999999" io="false" lr="false"/>
|
||||
</wall>
|
||||
<wall material="0" type="1" x1="33.900002" y1="39.299999" x2="33.900002" y2="31.6" thickness="0.15000001"/>
|
||||
<wall material="0" type="1" x1="36.299999" y1="39.299999" x2="36.299999" y2="31.6" thickness="0.15000001">
|
||||
<door type="1" material="2" x01="0.15584378" width="0.89999998" height="2.0999999" io="true" lr="false"/>
|
||||
</wall>
|
||||
<wall material="1" type="1" x1="42.299999" y1="39.299999" x2="42.299999" y2="31.6" thickness="0.25"/>
|
||||
<wall material="1" type="1" x1="42.299999" y1="34.900002" x2="44.100002" y2="34.900002" thickness="0.25">
|
||||
<door type="1" material="2" x01="0.83333194" width="0.89999998" height="2.0999999" io="false" lr="true"/>
|
||||
</wall>
|
||||
<wall material="1" type="1" x1="44.100002" y1="31.6" x2="44.100002" y2="39.299999" thickness="0.25"/>
|
||||
<wall material="0" type="1" x1="50.600002" y1="39.299999" x2="50.600002" y2="31.6" thickness="0.15000001"/>
|
||||
<wall material="0" type="1" x1="56" y1="39.299999" x2="56" y2="31.6" thickness="0.15000001"/>
|
||||
<wall material="0" type="1" x1="47.100002" y1="50.200001" x2="47.100002" y2="44.5" thickness="0.15000001"/>
|
||||
<wall material="0" type="1" x1="1.2" y1="15.400001" x2="10" y2="15.400001" thickness="0.15000001"/>
|
||||
<line material="0" type="3" x1="68.099998" y1="41.299999" x2="76.900002" y2="41.299999" thickness="0.15000001"/>
|
||||
<wall material="1" type="1" x1="68.099998" y1="39.299999" x2="68.099998" y2="31.6" thickness="0.15000001"/>
|
||||
<line material="0" type="3" x1="68.099998" y1="41.299999" x2="68.099998" y2="39.299999" thickness="0.15000001"/>
|
||||
<line material="0" type="3" x1="5.0999999" y1="42.799999" x2="10" y2="42.799999" thickness="0.15000001"/>
|
||||
<line material="0" type="3" x1="10" y1="40.799999" x2="10" y2="42.799999" thickness="0.15000001"/>
|
||||
<wall material="3" type="1" x1="12.2" y1="0.69999999" x2="12.2" y2="5.9000001" thickness="0.15000001">
|
||||
<door type="1" material="2" x01="0.13643573" width="0.89999998" height="2.0999999" io="true" lr="false"/>
|
||||
</wall>
|
||||
<door material="4" type="1" x1="10" y1="25.9" x2="11" y2="25.9" height="2.0999999" swap="false"/>
|
||||
<wall material="4" type="1" x1="11" y1="25.9" x2="12.2" y2="25.9" thickness="0.15000001"/>
|
||||
<wall material="1" type="1" x1="13.900001" y1="31.6" x2="18" y2="31.6" thickness="0.2"/>
|
||||
<wall material="3" type="1" x1="10.2" y1="44.5" x2="10.2" y2="50.200001" thickness="0.2">
|
||||
<door type="1" material="2" x01="0.81355965" width="1" height="2.0999999" io="false" lr="true"/>
|
||||
</wall>
|
||||
<wall material="3" type="1" x1="17.4" y1="44.5" x2="17.4" y2="50.200001" thickness="0.2"/>
|
||||
<wall material="3" type="1" x1="5.0999999" y1="42.799999" x2="5.0999999" y2="44.5" thickness="0.2">
|
||||
<door type="1" material="2" x01="0.35294235" width="0.89999998" height="2.0999999" io="false" lr="false"/>
|
||||
</wall>
|
||||
<wall material="3" type="1" x1="25" y1="44.5" x2="25" y2="50.200001" thickness="0.2"/>
|
||||
<wall material="1" type="1" x1="66.400002" y1="44.5" x2="68.099998" y2="44.5" thickness="0.25">
|
||||
<door type="1" material="2" x01="0.8823545" width="1.3" height="2.0999999" io="false" lr="true"/>
|
||||
</wall>
|
||||
<wall material="3" type="1" x1="12.2" y1="5.9000001" x2="18" y2="5.9000001" thickness="0.2"/>
|
||||
<wall material="3" type="1" x1="12.2" y1="13" x2="18" y2="13" thickness="0.2"/>
|
||||
<wall material="3" type="1" x1="68.400002" y1="44.5" x2="68.400002" y2="50.200001" thickness="0.2">
|
||||
<door type="1" material="2" x01="0.84210497" width="0.89999998" height="2.0999999" io="true" lr="true"/>
|
||||
</wall>
|
||||
<wall material="1" type="1" x1="68.099998" y1="50.200001" x2="68.099998" y2="49.299999" thickness="0.25"/>
|
||||
</obstacles>
|
||||
<underlays>
|
||||
<underlay x="-13.15" y="-18.049999" sx="0.025403051" sy="0.025403051" name="" file="../IndoorMap/maps/stock2.png"/>
|
||||
</underlays>
|
||||
<pois>
|
||||
<poi name="I.2.43" type="0" x="73.5" y="47.400002"/>
|
||||
<poi name="I.2.42" type="0" x="69.200005" y="47.400002"/>
|
||||
<poi name="I.2.13" type="0" x="15.1" y="3.3"/>
|
||||
<poi name="I.2.14" type="0" x="5.4000001" y="4.0999999"/>
|
||||
<poi name="I.2.15" type="0" x="5.2000003" y="11.7"/>
|
||||
<poi name="I.2.11" type="0" x="14.900001" y="17.200001"/>
|
||||
<poi name="I.2.16" type="0" x="5.9000001" y="25"/>
|
||||
<poi name="I.2.17" type="0" x="2.3" y="25"/>
|
||||
<poi name="I.2.18" type="0" x="4.9000001" y="30.300001"/>
|
||||
<poi name="I.2.19" type="0" x="5.3000002" y="37.299999"/>
|
||||
<poi name="I.2.20" type="0" x="1.9" y="47"/>
|
||||
<poi name="I.2.21" type="0" x="5.3000002" y="47.700001"/>
|
||||
<poi name="I.2.22" type="0" x="8.4000006" y="47.400002"/>
|
||||
<poi name="HLS 3" type="0" x="12.7" y="45.5"/>
|
||||
<poi name="I.2.25" type="0" x="15.2" y="45.200001"/>
|
||||
<poi name="I.2.26" type="0" x="19.6" y="47.200001"/>
|
||||
<poi name="I.2.28" type="0" x="26.5" y="47.200001"/>
|
||||
<poi name="I.2.29" type="0" x="29.5" y="46.900002"/>
|
||||
<poi name="I.2.30" type="0" x="31.800001" y="47.5"/>
|
||||
<poi name="I.2.31" type="0" x="34.400002" y="47.200001"/>
|
||||
<poi name="I.2.32" type="0" x="37.100002" y="47.200001"/>
|
||||
<poi name="I.2.33" type="0" x="40.299999" y="46.200001"/>
|
||||
<poi name="I.2.34" type="0" x="42.700001" y="47.5"/>
|
||||
<poi name="I.2.35" type="0" x="44.900002" y="47"/>
|
||||
<poi name="I.2.36" type="0" x="47.799999" y="47.100002"/>
|
||||
<poi name="I.2.37" type="0" x="53.900002" y="47.400002"/>
|
||||
<poi name="I.2.38" type="0" x="58.5" y="47.400002"/>
|
||||
<poi name="I.2.1" type="0" x="62" y="35.700001"/>
|
||||
<poi name="I.2.2" type="0" x="53.299999" y="35.400002"/>
|
||||
<poi name="I.2.3" type="0" x="47.200001" y="35.400002"/>
|
||||
<poi name="I.2.4" type="0" x="42.900002" y="37"/>
|
||||
<poi name="I.2.5" type="0" x="42.799999" y="33.200001"/>
|
||||
<poi name="I.2.6" type="0" x="39.200001" y="35.5"/>
|
||||
<poi name="I.2.7" type="0" x="34.600002" y="35.600002"/>
|
||||
<poi name="I.2.8" type="0" x="31.800001" y="35.600002"/>
|
||||
<poi name="I.2.9" type="0" x="28.4" y="35.600002"/>
|
||||
<poi name="I.2.10" type="0" x="19.300001" y="35.400002"/>
|
||||
</pois>
|
||||
<gtpoints>
|
||||
<gtpoint id="100" x="71.800003" y="44" z="0"/>
|
||||
<gtpoint id="101" x="55.600002" y="44" z="0"/>
|
||||
<gtpoint id="102" x="42.200001" y="44" z="0"/>
|
||||
<gtpoint id="103" x="35" y="40" z="0"/>
|
||||
<gtpoint id="104" x="11" y="40" z="0"/>
|
||||
<gtpoint id="105" x="11" y="12" z="0"/>
|
||||
<gtpoint id="200" x="24" y="38" z="0"/>
|
||||
<gtpoint id="203" x="15" y="40" z="0"/>
|
||||
<gtpoint id="204" x="11" y="43.600002" z="0"/>
|
||||
<gtpoint id="205" x="35.200001" y="43.600002" z="0"/>
|
||||
<gtpoint id="206" x="45.200001" y="39.799999" z="0"/>
|
||||
<gtpoint id="207" x="45" y="33" z="0"/>
|
||||
<gtpoint id="208" x="57.600002" y="40" z="0"/>
|
||||
<gtpoint id="209" x="57.600002" y="32.600002" z="0"/>
|
||||
<gtpoint id="210" x="66.400002" y="32.600002" z="0"/>
|
||||
<gtpoint id="211" x="66.400002" y="42" z="0"/>
|
||||
<gtpoint id="212" x="60" y="42" z="0"/>
|
||||
<gtpoint id="201" x="15" y="38" z="0"/>
|
||||
</gtpoints>
|
||||
<accesspoints>
|
||||
<accesspoint name="NUC3" mac="XX:XX:XX:XX:XX:XX" x="27" y="44" z="2" mdl_txp="0" mdl_exp="0" mdl_waf="0"/>
|
||||
<accesspoint name="NUC1" mac="XX:XX:XX:XX:XX:XX" x="55" y="44" z="2" mdl_txp="0" mdl_exp="0" mdl_waf="0"/>
|
||||
<accesspoint name="NUC2" mac="XX:XX:XX:XX:XX:XX" x="46" y="40" z="2" mdl_txp="0" mdl_exp="0" mdl_waf="0"/>
|
||||
<accesspoint name="NUC4" mac="XX:XX:XX:XX:XX:XX" x="15" y="39.600002" z="2" mdl_txp="0" mdl_exp="0" mdl_waf="0"/>
|
||||
</accesspoints>
|
||||
<beacons/>
|
||||
<fingerprints/>
|
||||
<stairs>
|
||||
</stairs>
|
||||
<elevators>
|
||||
</elevators>
|
||||
</floor>
|
||||
</floors>
|
||||
</map>
|
||||
Reference in New Issue
Block a user