Closes #3 integrated new testdata with wifidongles

This commit is contained in:
toni
2017-10-17 16:53:02 +02:00
parent ba3b758744
commit 232175c3dc
3 changed files with 27 additions and 8 deletions

View File

@@ -49,7 +49,7 @@ namespace Settings {
/** if the wifi-signal-strengths are stored on the grid-nodes, this needs a grid rebuild! */
constexpr float TXP = -40;
constexpr float EXP = 2.3;
constexpr float WAF = 0.0;
constexpr float WAF = -8.0;
// how to perform VAP grouping. see
// - calibration in Controller.cpp
@@ -81,6 +81,10 @@ namespace Settings {
const std::vector<int> path1 = {0, 1, 2, 3, 4, 5, 6};
const std::vector<int> path2 = {6, 5, 4, 7, 8, 9, 8, 10};
const std::vector<int> path3 = {10, 8, 7, 4, 11, 12, 13, 14, 6};
const std::vector<int> path4 = {0, 1, 2, 3, 4, 5, 6, 71, 7, 8, 9, 10};
const std::vector<int> path5 = {40, 41, 85, 117, 31, 32, 33, 34, 35, 36, 37, 12, 3, 4, 5, 6, 71};
const std::vector<int> path6 = {28, 27, 26, 25, 24, 23, 22, 21, 20, 1, 2, 3, 4, 5, 6, 5};
}
}

View File

@@ -251,7 +251,7 @@ struct PFTransKLDSampling : public K::ParticleFilterTransition<MyState, MyContro
//walker.addModule(&modSpread); // might help in some situations! keep in mind!
//walker.addModule(&modActivity);
//walker.addModule(&modHeadUgly);
walker.addModule(&modImportance);
//walker.addModule(&modImportance);
//walker.addModule(&modFavorZ);
//walker.addModule(&modButterAct);
//walker.addModule(&modWifi);
@@ -513,9 +513,9 @@ struct PFEval : public K::ParticleFilterEvaluation<MyState, MyObs> {
Point3 posOld_m = p.state.positionOld.inMeter();
double pWifi = getWIFI(observation, wifiObs, p.state.position);
const double pBaroPressure = getStairProb(p, observation.activity);
const double pStairProb = getStairProb(p, observation.activity);
const double pStepDistance = getStepDistanceProb(pos_m, posOld_m);
//const double pBaroPressure = getBaroPressure(observation, p.state.relativePressure);
const double pBaroPressure = getBaroPressure(observation, p.state.relativePressure);
//const double pBeacon = getBEACON(observation, p.state.position);
//small checks
@@ -532,7 +532,7 @@ struct PFEval : public K::ParticleFilterEvaluation<MyState, MyObs> {
//p.weight = std::pow(p.weight, 0.5);
}
const double prob = pWifi * pStepDistance;// * pBaroPressure;
const double prob = pWifi * pBaroPressure * pStairProb;
p.weight = prob;

View File

@@ -52,8 +52,23 @@ struct Data {
mapDir + "grid_Stock_2_01.dat"
};
} data;
DataSetup FloorOneToThree = {
mapDir + "SHL_Stock_1-3_03.xml",
{
dataDir + "Path4_0.csv",
dataDir + "Path5_0.csv",
dataDir + "Path6_0.csv",
},
mapDir + "wifi_fp_all.dat",
40,
VAPGrouper::Mode::LAST_MAC_DIGIT_TO_ZERO,
mapDir + "grid_Stock_1-3_03.dat"
};
} data;
Floorplan::IndoorMap* MyState::map;
@@ -389,9 +404,9 @@ int main(int argc, char** argv) {
K::Statistics<float> statsQuantil;
K::Statistics<float> tmp;
for(int i = 0; i < 1; ++i){
for(int i = 0; i < 10; ++i){
tmp = run(data.SecondFloorOnly, 2, "Wifi-Dongle-Test", Settings::Path_DongleTest::path3);
tmp = run(data.FloorOneToThree, 2, "Wifi-Dongle-Test", Settings::Path_DongleTest::path6);
statsMedian.add(tmp.getMedian());
statsAVG.add(tmp.getAvg());
statsSTD.add(tmp.getStdDev());