Added plotta, added probabilistic code
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
//#include "main.h"
|
||||
#include "main.h"
|
||||
|
||||
#include "mesh.h"
|
||||
#include "filter.h"
|
||||
@@ -28,6 +28,7 @@
|
||||
|
||||
#include "FtmKalman.h"
|
||||
#include "mainFtm.h"
|
||||
#include "misc.h"
|
||||
|
||||
#include <sys/stat.h>
|
||||
|
||||
@@ -250,6 +251,11 @@ static Stats::Statistics<float> run(Settings::DataSetup setup, int walkIdx, std:
|
||||
plot.buildFloorplan();
|
||||
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.plot();
|
||||
|
||||
// particle-filter
|
||||
@@ -413,7 +419,7 @@ static Stats::Statistics<float> run(Settings::DataSetup setup, int walkIdx, std:
|
||||
|
||||
plot.plot();
|
||||
//plot.closeStream();
|
||||
//std::this_thread::sleep_for(500ms);
|
||||
std::this_thread::sleep_for(100ms);
|
||||
|
||||
// error calc
|
||||
// float err_m = gtPos.getDistance(est.pos.pos);
|
||||
@@ -449,10 +455,20 @@ static Stats::Statistics<float> run(Settings::DataSetup setup, int walkIdx, std:
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
CmdArguments args(argc, argv);
|
||||
|
||||
if (args.hasFlag("prob"))
|
||||
{
|
||||
return mainProp(argc, argv);
|
||||
}
|
||||
else if (args.hasFlag("trilat"))
|
||||
{
|
||||
return mainTrilat(argc, argv);
|
||||
}
|
||||
|
||||
//mainFtm(argc, argv);
|
||||
//return 0;
|
||||
|
||||
|
||||
Stats::Statistics<float> statsAVG;
|
||||
Stats::Statistics<float> statsMedian;
|
||||
Stats::Statistics<float> statsSTD;
|
||||
|
||||
Reference in New Issue
Block a user