32 lines
605 B
C++
32 lines
605 B
C++
#ifndef WIFIMODELLOGDIST_H
|
|
#define WIFIMODELLOGDIST_H
|
|
|
|
#include "WiFiModel.h"
|
|
#include "LogDistanceModel.h"
|
|
|
|
/**
|
|
* signal-strength estimation using log-distance model
|
|
*/
|
|
class WiFiModelLogDist : public WiFiModel {
|
|
|
|
private:
|
|
|
|
float txp;
|
|
float exp;
|
|
|
|
public:
|
|
|
|
/** ctor */
|
|
WiFiModelLogDist(const float txp, const float exp) : txp(txp), exp(exp) {
|
|
;
|
|
}
|
|
|
|
/** get the given access-point's RSSI at the provided location */
|
|
float getRSSI(const LocatedAccessPoint& ap, const Point3 p) override {
|
|
return LogDistanceModel::distanceToRssi(txp, exp, ap.getDistance(p));
|
|
}
|
|
|
|
};
|
|
|
|
#endif // WIFIMODELLOGDIST_H
|