some adjustments to match latest changes in KLib/Indoor

switched from Beacons to real Fingerprint points for fingerprinting
This commit is contained in:
2017-03-14 09:17:50 +01:00
parent 3a1cd1bccc
commit c7c94cbebe
9 changed files with 25 additions and 20 deletions

View File

@@ -44,6 +44,7 @@ public:
// deserialize it
WiFiFingerprint wfp;
wfp.read(inp);
if (wfp.measurements.entries.empty()) {continue;}
fingerprints.push_back(wfp);
}
@@ -77,7 +78,7 @@ public:
// try to find an existing one
for (WiFiFingerprint& wfp : fingerprints) {
// get within range of floating-point rounding issues
if (wfp.pos_m.getDistance(pos_m) < 0.001) {return wfp;}
if (wfp.pos_m.getDistance(pos_m) < 0.01) {return wfp;}
}
// create a new one and return its reference