updated sensors and filter to current code version

removed KLib stuff
added new activity
filter is uncommand!
at the moment, the app is not able to load new maps and breaks using old maps
This commit is contained in:
toni
2018-07-12 18:39:27 +02:00
parent b4a1a3d969
commit 625f5fe04d
22 changed files with 325 additions and 261 deletions

View File

@@ -3,7 +3,7 @@
#include <Indoor/floorplan/v2/Floorplan.h>
#include <KLib/math/filter/particles/ParticleFilter.h>
#include <Indoor/smc/filtering/ParticleFilter.h>
#include "../gl/GLHelper.h"
#include "../gl/GLPoints.h"
@@ -62,7 +62,7 @@ public:
}
/** NOTE: must be called from Qt's main thread! */
template <typename T> void setFromParticles(const std::vector<K::Particle<T>>& particles) {
template <typename T> void setFromParticles(const std::vector<SMC::Particle<T>>& particles) {
points.clear();
@@ -71,7 +71,7 @@ public:
// group particles by grid-point
std::unordered_map<GridPoint, float> weights;
for (const K::Particle<T>& p : particles) {
for (const SMC::Particle<T>& p : particles) {
const GridPoint gp = p.state.position;
if (weights.find(gp) != weights.end()) {continue;}
weights[gp] += p.weight;
@@ -97,7 +97,7 @@ public:
}
// for (const K::Particle<T>& p : particles) {
// for (const SMC::Particle<T>& p : particles) {
// const GridPoint gp = p.state.position;
// const QVector3D pt(gp.x_cm/100.0f, gp.z_cm/100.0f + 0.1f, gp.y_cm/100.0f); // swap z and y
// const QColor color = Qt::blue;