some adjustments to match latest changes in KLib/Indoor
switched from Beacons to real Fingerprint points for fingerprinting
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
#include <Indoor/grid/Grid.h>
|
||||
#include <Indoor/sensors/radio/WiFiGridNode.h>
|
||||
|
||||
struct MyGridNode : public GridNode, public GridPoint, public WiFiGridNode<20> {
|
||||
struct MyGridNode : public GridNode, public GridPoint, public WiFiGridNode<30> {
|
||||
|
||||
float navImportance;
|
||||
float getNavImportance() const { return navImportance; }
|
||||
|
||||
@@ -59,8 +59,8 @@
|
||||
particlesCopy[i].weight = cumWeight;
|
||||
}
|
||||
|
||||
// std::uniform_real_distribution<float> distNewOne(0.0, 1.0);
|
||||
// std::uniform_int_distribution<int> distRndNode(0, grid.getNumNodes()-1);
|
||||
std::uniform_real_distribution<float> distNewOne(0.0, 1.0);
|
||||
std::uniform_int_distribution<int> distRndNode(0, grid.getNumNodes()-1);
|
||||
std::normal_distribution<float> distTurn(0.0, +0.03);
|
||||
|
||||
// now draw from the copy vector and fill the original one
|
||||
@@ -69,11 +69,11 @@
|
||||
|
||||
// slight chance to get a truely random node as particle
|
||||
// mainly for testing
|
||||
// if (distNewOne(gen) < 0.005) {
|
||||
// particles[i].state.position = grid[distRndNode(gen)];
|
||||
// particles[i].weight = equalWeight;
|
||||
// continue;
|
||||
// }
|
||||
if (distNewOne(gen) < 0.005) {
|
||||
particles[i].state.position = grid[distRndNode(gen)];
|
||||
particles[i].weight = equalWeight;
|
||||
continue;
|
||||
}
|
||||
|
||||
// normal redraw procedure
|
||||
particles[i] = draw(cumWeight);
|
||||
|
||||
Reference in New Issue
Block a user