worked on signal-strength-estimation
add this information to grid nodes evaluate this information new test-cases
This commit is contained in:
31
sensors/radio/model/WiFiModelLogDist.h
Normal file
31
sensors/radio/model/WiFiModelLogDist.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#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
|
||||
Reference in New Issue
Block a user