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

@@ -68,20 +68,22 @@ protected:
const QFont font("Arial", 10);
qp.setFont(font);
// get all fingerprint-locations that are currently visible on the 2D map
for (const Floorplan::Floor* floor : map->floors) {
for (const Floorplan::Beacon* beacon : floor->beacons) {
for (const Floorplan::FingerprintLocation* fpLoc : floor->fpLocations) {
const Point3 p = beacon->pos + Point3(0,0,floor->atHeight) + Point3(0,0,Settings::smartphoneAboveGround);
//const Point3 p = beacon->pos + Point3(0,0,floor->atHeight) + Point3(0,0,Settings::smartphoneAboveGround);
const Point3 p = fpLoc->getPosition(*floor); // is already above ground as configured within the map
const Point2 pt = s.mapToScreen(p.xy());
if (floor->atHeight < r.clip.belowHeight_m) {continue;}
if (floor->atHeight > r.clip.aboveHeight_m) {continue;}
const WiFiCalibPoint cp(beacon->name, p, pt);
const WiFiCalibPoint cp(fpLoc->name, p, pt);
currentlyVisible.push_back(cp);
const WiFiFingerprint& fp = mdl->getFingerprint(cp.pos_m);
const QString txt1(beacon->name.c_str());
const QString txt1(fpLoc->name.c_str());
const QString txt2 = QString::number(fp.measurements.entries.size());
qp.setPen(Qt::black);

View File

@@ -21,8 +21,8 @@ public:
/** ctor */
Object(const std::string& file, const std::string& colorTexture, std::string normalsTexture, const float scale = 1.0) {
K::ObjFileReader reader(file, false);
K::ObjFileReader reader(false);
reader.readFile(file);
if (normalsTexture.empty()) {normalsTexture = ":/res/gl/tex/empty_normals.jpg";}