This commit is contained in:
2019-11-13 15:12:44 +01:00
parent d645ab7675
commit ac824937aa
3 changed files with 188 additions and 17 deletions

View File

@@ -237,7 +237,7 @@ static CombinedStats<float> run(Settings::DataSetup setup, int walkIdx, std::str
computeDensity(bbox, density, maxElement, obs, true, 3.5);
Point2 estPos = maxElement.first;
plot.addEstimationNode(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
@@ -257,7 +257,7 @@ static CombinedStats<float> run(Settings::DataSetup setup, int walkIdx, std::str
computeDensity(bbox, density, maxElement, obs, false, 8);
Point2 estPos = maxElement.first;
plot.addEstimationNode2(Point3(estPos.x, estPos.y, 0.1));
//plot.addEstimationNode2(Point3(estPos.x, estPos.y, 0.1));
// Plot density
//plotDensity(plot, density);
@@ -267,6 +267,26 @@ static CombinedStats<float> run(Settings::DataSetup setup, int walkIdx, std::str
errorStats.rssi.add(distErrorRssi);
}
// draw wifi ranges
plot.clearDistanceCircles();
for (size_t i = 0; i < obs.size(); i++)
{
WiFiMeasurement wifi2 = obs[i];
Point3 apPos = Settings::CurrentPath.nuc(wifi2.getAP().getMAC()).position;
K::GnuplotColor color;
switch (Settings::CurrentPath.nuc(wifi2.getAP().getMAC()).ID)
{
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);
}
errorValuesFtm.push_back(distErrorFtm);
errorValuesRssi.push_back(distErrorRssi);