This commit is contained in:
2017-05-24 10:19:41 +02:00
17 changed files with 342 additions and 54 deletions

View File

@@ -45,7 +45,6 @@ public:
double prob = 1.0;
//double prob = 0;
double error = 0;
int numMatchingAPs = 0;
@@ -77,14 +76,13 @@ public:
const float sigma = this->sigma + this->sigmaPerSecond * age.sec();
// probability for this AP
//double local = Distribution::Normal<double>::getProbability(modelRSSI, sigma, scanRSSI);
double local = Distribution::Exponential<double>::getProbability(0.1, std::abs(modelRSSI-scanRSSI));
double local = Distribution::Normal<double>::getProbability(modelRSSI, sigma, scanRSSI);
//double local = Distribution::Exponential<double>::getProbability(0.1, std::abs(modelRSSI-scanRSSI));
// also add the error value? [location is OK but model is wrong]
if (useError) {
local = 0.95 * local + 0.05 * (1.0-local);
//local = 0.95 * local + 0.05;
#warning "TODO"
}
// update probability