Files
IPIN2016/code/particles/MyObservation.h
2016-03-01 15:04:46 +01:00

54 lines
1.2 KiB
C
Executable File

#ifndef MYOBSERVATION_H
#define MYOBSERVATION_H
#include "../frank/WiFiObservation.h"
#include "../frank/BeaconObservation.h"
#include "../frank/OrientationObservation.h"
#include "../toni/BarometerObservation.h"
#include "../lukas/StepObservation.h"
#include "../lukas/TurnObservation.h"
/**
* all available sensor readings
*/
struct MyObservation {
/** wifi observation */
WiFiObservation wifi;
OrientationObservation orientation;
/** barometer observation data (if any) */
BarometerObservation* barometer = nullptr;
/** beacon observation data */
BeaconObservation beacons;
/** step observation data (if any) */
StepObservation* step = nullptr;
/** turn observation data (if any) */
TurnObservation* turn = nullptr;
/** timestamp of the youngest sensor data that resides within this observation. used to detect the age of all other observations! */
uint64_t latestSensorDataTS = 0;
/** ctor */
MyObservation() {
// reset();
}
// /** set all observations to null */
// void reset() {
// //delete wifi; wifi = nullptr;
// delete barometer; barometer = nullptr;
// delete beacons; beacons = nullptr;
// //delete step; step = nullptr;
// //delete turn; turn = nullptr;
// }
};
#endif // MYOBSERVATION_H