current TeX

minor code changes
This commit is contained in:
2017-05-06 17:32:40 +02:00
parent 2438080389
commit edd41293c1
12 changed files with 650 additions and 132 deletions

View File

@@ -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