began putting everything together

This commit is contained in:
2016-01-28 21:49:36 +01:00
parent 07d739ebb7
commit 41713a5d47
30 changed files with 1446 additions and 279 deletions

View File

@@ -39,10 +39,12 @@ public:
if (!beacon) {continue;}
// distance (in meter) between particle and AP
const double distToBeacon_m = state.getDistance2D(beacon->xCM, beacon->yCM) / 100.0;
//const double distToBeacon_m = state.getDistance2D(beacon->xCM, beacon->yCM) / 100.0;
const double distToBeacon_m = state.pCur.getDistance(Point3(beacon->x, beacon->y, beacon->z)) / 100.0;
// floor difference?
const double floorDist = std::abs(beacon->zNr - state.z_nr);
//const double floorDist = std::abs(beacon->zNr - state.getFloorNr());
const float floorDist = std::round(std::abs(Helper::getFloorNrFloat(beacon->z) - Helper::getFloorNrFloat(state.pCur.z)));
// estimate the rssi depending on above distance
const double mdlRSSI = distanceToRssi(beacon->tx, distToBeacon_m, beacon->pl) - (floorDist * waf);