added support for pillars
some new helper methods/classes
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#define WIFIMEASUREMENTS_H
|
||||
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
|
||||
#include "WiFiMeasurement.h"
|
||||
|
||||
@@ -42,6 +43,14 @@ struct WiFiMeasurements {
|
||||
}
|
||||
}
|
||||
|
||||
/** get the oldest timestamp among all contained measurements */
|
||||
Timestamp getOldestTS() const {
|
||||
auto comp = [] (const WiFiMeasurement& m1, const WiFiMeasurement& m2) {return m1.getTimestamp() < m2.getTimestamp();};
|
||||
auto it = std::max_element(entries.begin(), entries.end(), comp);
|
||||
if (it == entries.end()) {throw Exception("no element found");}
|
||||
return it->getTimestamp();
|
||||
}
|
||||
|
||||
|
||||
/** create a combination */
|
||||
static WiFiMeasurements mix(const WiFiMeasurements& a, const WiFiMeasurements& b, float sec = 3) {
|
||||
|
||||
Reference in New Issue
Block a user