current TeX
minor code changes
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
#include <KLib/math/filter/particles/resampling/ParticleFilterResamplingNEff.h>
|
||||
|
||||
#include "../plots/PlotErrFunc.h"
|
||||
#include "../WalkResult.h"
|
||||
|
||||
#include <thread>
|
||||
|
||||
@@ -45,7 +46,7 @@
|
||||
#include <Indoor/sensors/offline/Listener.h>
|
||||
|
||||
|
||||
//#define PLOT_LIVE
|
||||
#define PLOT_LIVE
|
||||
//#define PLOT_WIFI
|
||||
//#define PLOT_ERROR_TIME
|
||||
//#define PLOT_ERROR_FUNC
|
||||
@@ -102,6 +103,8 @@ class EvalWalk : public Offline::Listener {
|
||||
|
||||
public:
|
||||
|
||||
WalkResult res;
|
||||
|
||||
~EvalWalk() {
|
||||
delete grid;
|
||||
delete pf;
|
||||
@@ -487,6 +490,42 @@ public:
|
||||
|
||||
}
|
||||
|
||||
void walk(const std::string& path, const std::vector<int> pathPoints, const std::string& model) {
|
||||
|
||||
absHead = 0;
|
||||
runName = "";
|
||||
|
||||
// get ground-truth
|
||||
groundTruth = FloorplanHelper::getGroundTruth(map, pathPoints);
|
||||
|
||||
// wifi model
|
||||
//WiFiModelLogDistCeiling wifiModel(map);
|
||||
//wifiModel.loadXML(Settings::wifiAllFixed);
|
||||
//wifiModel.loadXML(Settings::wifiEachOptParPos);
|
||||
|
||||
//WiFiModelPerFloor wifiModel(map);
|
||||
//wifiModel.loadXML(Settings::wifiEachOptParPos_multimodel);
|
||||
|
||||
//WiFiModelPerBBox wifiModel(map);
|
||||
//wifiModel.loadXML(model);
|
||||
WiFiModelFactory fac(map);
|
||||
WiFiModel* wifiModel = fac.loadXML(model);
|
||||
|
||||
// eval
|
||||
std::unique_ptr<PFEval> eval = std::unique_ptr<PFEval>( new PFEval(grid, *wifiModel, em) );
|
||||
pf->setEvaluation( std::move(eval) );
|
||||
|
||||
// data-file
|
||||
reader.open(path);
|
||||
groundTruthLive = reader.getGroundTruth(map, pathPoints);
|
||||
player.setReader(&reader);
|
||||
player.setListener(this);
|
||||
player.start();
|
||||
|
||||
// wait for completion
|
||||
player.join();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -654,11 +693,20 @@ private:
|
||||
|
||||
const Point3 curGT = groundTruthLive.get(lastTransition);
|
||||
|
||||
// error between ground-truth and estimation
|
||||
const float estRealErr = curEst.position.inMeter().getDistance(curGT);
|
||||
|
||||
WalkResult::Entry e;
|
||||
e.ts = lastTransition;
|
||||
e.estimation = curEst.position.inMeter();
|
||||
e.groundTruth = curGT;
|
||||
e.err = estRealErr;
|
||||
this->res.entries.push_back(e);
|
||||
|
||||
// start the error-over-time plot after some filter updates
|
||||
if (updateCount > 12) {
|
||||
|
||||
// error between ground-truth and estimation
|
||||
const float estRealErr = curEst.position.inMeter().getDistance(curGT);
|
||||
|
||||
statsErr.add(estRealErr);
|
||||
|
||||
#ifdef PLOT_ERROR_FUNC
|
||||
|
||||
Reference in New Issue
Block a user