Merge branch 'master' of https://git.frank-ebner.de/FHWS/Indoor
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
#include "../../data/Timestamp.h"
|
||||
#include "../../math/MovingAVG.h"
|
||||
#include "../../math/MovingMedian.h"
|
||||
#include "../../math/Median.h"
|
||||
#include "../../math/Stats.h"
|
||||
|
||||
#include "BarometerData.h"
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include <unordered_map>
|
||||
#include <cmath>
|
||||
|
||||
#include "../../math/Median.h"
|
||||
#include "../../math/Stats.h"
|
||||
|
||||
#include "WiFiMeasurements.h"
|
||||
|
||||
@@ -142,7 +142,7 @@ private:
|
||||
/** get the median signal strength */
|
||||
inline float getMedian(const std::vector<WiFiMeasurement>& vaps) const {
|
||||
|
||||
Median<float> median;
|
||||
Stats::Median<float> median;
|
||||
for (const WiFiMeasurement& vap : vaps) {
|
||||
median.add(vap.getRSSI());
|
||||
}
|
||||
@@ -153,11 +153,16 @@ private:
|
||||
/** get the maximum signal strength */
|
||||
inline float getMax(const std::vector<WiFiMeasurement>& vaps) const {
|
||||
|
||||
float max = -9999999;
|
||||
Stats::Maximum<float> max;
|
||||
for (const WiFiMeasurement& vap : vaps) {
|
||||
if (vap.getRSSI() > max) {max = vap.getRSSI();}
|
||||
max.add(vap.getRSSI());
|
||||
}
|
||||
return max;
|
||||
return max.get();
|
||||
// float max = -9999999;
|
||||
// for (const WiFiMeasurement& vap : vaps) {
|
||||
// if (vap.getRSSI() > max) {max = vap.getRSSI();}
|
||||
// }
|
||||
// return max;
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user