66 lines
1.6 KiB
C++
66 lines
1.6 KiB
C++
/*
|
||
* © Copyright 2014 – Urheberrechtshinweis
|
||
* Alle Rechte vorbehalten / All Rights Reserved
|
||
*
|
||
* Programmcode ist urheberrechtlich geschuetzt.
|
||
* Das Urheberrecht liegt, soweit nicht ausdruecklich anders gekennzeichnet, bei Frank Ebner.
|
||
* Keine Verwendung ohne explizite Genehmigung.
|
||
* (vgl. § 106 ff UrhG / § 97 UrhG)
|
||
*/
|
||
|
||
#ifndef WIFIOPTIMIZERSTRUCTS_H
|
||
#define WIFIOPTIMIZERSTRUCTS_H
|
||
|
||
#include "../../../geo/Point3.h"
|
||
|
||
namespace WiFiOptimizer {
|
||
|
||
/**
|
||
* one entry that is used during optimization:
|
||
* combine one RSSI measurement with the position the signal was measured at
|
||
*/
|
||
struct RSSIatPosition {
|
||
|
||
/** real-world position (in meter) */
|
||
const Point3 pos_m;
|
||
|
||
/** measured signal strength (for one AP) */
|
||
const float rssi;
|
||
|
||
/** ctor */
|
||
RSSIatPosition(const Point3 pos_m, const float rssi) : pos_m(pos_m), rssi(rssi) {;}
|
||
|
||
};
|
||
|
||
/**
|
||
* for statistics
|
||
* after optimiziaton
|
||
*
|
||
* denotes the difference [error] between one fingerprinted rssi
|
||
* at location (x,y,z) and the model estimation for this location
|
||
*/
|
||
struct ErrorAtPosition {
|
||
|
||
/** real-world position (in meter) */
|
||
const Point3 pos_m;
|
||
|
||
/** measured signal strength (for one AP) */
|
||
const float scan_rssi;
|
||
|
||
/** final model's prediction */
|
||
const float model_rssi;
|
||
|
||
/** ctor */
|
||
ErrorAtPosition(const Point3 pos_m, const float scan_rssi, const float model_rssi) : pos_m(pos_m), scan_rssi(scan_rssi), model_rssi(model_rssi) {;}
|
||
|
||
/** get the difference [error] between model-estimated-rssi and fingerprinted-rssi */
|
||
float getError_db() const {
|
||
return model_rssi - scan_rssi;
|
||
}
|
||
|
||
};
|
||
|
||
}
|
||
|
||
#endif // WIFIOPTIMIZERSTRUCTS_H
|