This repository has been archived on 2020-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
Files
Indoor/sensors/radio/setup/WiFiOptimizerStructs.h
2018-10-25 11:50:12 +02:00

66 lines
1.6 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* © 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