began putting everything together
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user