minor changes
This commit is contained in:
@@ -18,6 +18,18 @@ public:
|
|||||||
return (txPower - (10 * pathLoss * std::log10(distance_m)));
|
return (txPower - (10 * pathLoss * std::log10(distance_m)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// static float distanceAndRssiToPathLoss(const float txPower, const float rssi, const float distance_m) {
|
||||||
|
// const float delta = txPower - rssi;
|
||||||
|
// const float log = std::log10(distance_m) * 10.0f;
|
||||||
|
// const float res = delta/log;
|
||||||
|
|
||||||
|
// // sanity check
|
||||||
|
// const float err = std::abs(rssi - distanceToRssi(txPower, res, distance_m));
|
||||||
|
// if (err > 0.01) {throw Exception("error too high!");}
|
||||||
|
|
||||||
|
// return res;
|
||||||
|
// }
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|||||||
@@ -55,6 +55,17 @@ public:
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** does the model know the given AP? */
|
||||||
|
bool knowsAP(const MACAddress& accessPoint) {
|
||||||
|
|
||||||
|
// try to get the corresponding parameters
|
||||||
|
const auto it = accessPoints.find(accessPoint);
|
||||||
|
|
||||||
|
// AP known?
|
||||||
|
return (it != accessPoints.end());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
virtual float getRSSI(const MACAddress& accessPoint, const Point3 position_m) const override {
|
virtual float getRSSI(const MACAddress& accessPoint, const Point3 position_m) const override {
|
||||||
|
|
||||||
// try to get the corresponding parameters
|
// try to get the corresponding parameters
|
||||||
|
|||||||
@@ -107,6 +107,17 @@ public:
|
|||||||
accessPoints.clear();
|
accessPoints.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** does the model know the given AP? */
|
||||||
|
bool knowsAP(const MACAddress& accessPoint) {
|
||||||
|
|
||||||
|
// try to get the corresponding parameters
|
||||||
|
const auto it = accessPoints.find(accessPoint);
|
||||||
|
|
||||||
|
// AP known?
|
||||||
|
return (it != accessPoints.end());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
float getRSSI(const MACAddress& accessPoint, const Point3 position_m) const override {
|
float getRSSI(const MACAddress& accessPoint, const Point3 position_m) const override {
|
||||||
|
|
||||||
// try to get the corresponding parameters
|
// try to get the corresponding parameters
|
||||||
|
|||||||
Reference in New Issue
Block a user