sensorfw: datatypes/orientationdata.h Source File

sensorfw

orientationdata.h
Go to the documentation of this file.
1
29 #ifndef ORIENTATIONDATA_H
30 #define ORIENTATIONDATA_H
31
32 #include <datatypes/genericdata.h>
33 #include <datatypes/unsigned.h>
34
38 typedef TimedXyzData AccelerationData;
39
43 typedef TimedXyzData MagneticFieldData;
44
48 typedef TimedXyzData OrientationData;
49
53 typedef TimedXyzData MagnetometerData;
54
58 class CalibratedMagneticFieldData : public TimedData
59 {
60 public:
64 CalibratedMagneticFieldData() : TimedData(0),
65 x_(0), y_(0), z_(0),
66 rx_(0), ry_(0), rz_(0),
67 level_(0) {}
68
81 CalibratedMagneticFieldData(const quint64& timestamp, int x, int y, int z, int rx, int ry, int rz, int level) :
82 TimedData(timestamp),
83 x_(x), y_(y), z_(z),
84 rx_(rx), ry_(ry), rz_(rz),
85 level_(level) {}
86
93 CalibratedMagneticFieldData(TimedXyzData magData, int level) :
94 TimedData(magData.timestamp_),
95 x_(0), y_(0), z_(0),
96 rx_(magData.x_), ry_(magData.y_), rz_(magData.z_),
97 level_(level) {}
98
99 int x_;
100 int y_;
101 int z_;
102 int rx_;
103 int ry_;
104 int rz_;
105 int level_;
106 };
107
111 class CompassData : public TimedData
112 {
113 public:
117 CompassData() : TimedData(0), degrees_(0), rawDegrees_(0), correctedDegrees_(0), level_(0) {}
118
126 CompassData(const quint64& timestamp, int degrees, int level) :
127 TimedData(timestamp), degrees_(degrees), rawDegrees_(degrees), correctedDegrees_(0), level_(level) {}
128
138 CompassData(const quint64& timestamp, int degrees, int level, int correctedDegrees, int rawDegrees) :
139 TimedData(timestamp), degrees_(degrees), rawDegrees_(rawDegrees), correctedDegrees_(correctedDegrees), level_(level) {}
140
141 int degrees_;
142 int rawDegrees_;
143 int correctedDegrees_;
144 int level_;
145 };
146
150 class ProximityData : public TimedUnsigned
151 {
152 public:
156 ProximityData() : TimedUnsigned(), withinProximity_(false) {}
157
165 ProximityData(const quint64& timestamp, unsigned int value, bool withinProximity) :
166 TimedUnsigned(timestamp, value), withinProximity_(withinProximity) {}
167
168 bool withinProximity_;
169 };
170
171 #endif // ORIENTATIONDATA_H
CalibratedMagneticFieldData
Datatype for calibrated magnetometer measurements.
Definition: orientationdata.h:59
CalibratedMagneticFieldData::rz_
int rz_
raw Z coordinate value
Definition: orientationdata.h:104
CalibratedMagneticFieldData::y_
int y_
Y coordinate value.
Definition: orientationdata.h:100
CalibratedMagneticFieldData::x_
int x_
X coordinate value.
Definition: orientationdata.h:99
CalibratedMagneticFieldData::CalibratedMagneticFieldData
CalibratedMagneticFieldData(const quint64 &timestamp, int x, int y, int z, int rx, int ry, int rz, int level)
Constructor.
Definition: orientationdata.h:81
CalibratedMagneticFieldData::rx_
int rx_
raw X coordinate value
Definition: orientationdata.h:102
CalibratedMagneticFieldData::ry_
int ry_
raw Y coordinate value
Definition: orientationdata.h:103
CalibratedMagneticFieldData::CalibratedMagneticFieldData
CalibratedMagneticFieldData()
Default constructor.
Definition: orientationdata.h:64
CalibratedMagneticFieldData::CalibratedMagneticFieldData
CalibratedMagneticFieldData(TimedXyzData magData, int level)
Constructor.
Definition: orientationdata.h:93
CalibratedMagneticFieldData::level_
int level_
Magnetometer calibration level.
Definition: orientationdata.h:105
CalibratedMagneticFieldData::z_
int z_
Z coordinate value.
Definition: orientationdata.h:101
CompassData
Datatype for compass measurements.
Definition: orientationdata.h:112
CompassData::level_
int level_
Magnetometer calibration level.
Definition: orientationdata.h:144
CompassData::CompassData
CompassData(const quint64 &timestamp, int degrees, int level, int correctedDegrees, int rawDegrees)
Constructor.
Definition: orientationdata.h:138
CompassData::degrees_
int degrees_
Angle to north which may be declination corrected or not.
Definition: orientationdata.h:141
CompassData::rawDegrees_
int rawDegrees_
Angle to north without declination correction.
Definition: orientationdata.h:142
CompassData::CompassData
CompassData(const quint64 &timestamp, int degrees, int level)
Constructor.
Definition: orientationdata.h:126
CompassData::correctedDegrees_
int correctedDegrees_
Declination corrected angle to north.
Definition: orientationdata.h:143
CompassData::CompassData
CompassData()
Default constructor.
Definition: orientationdata.h:117
ProximityData
Datatype for proximity measurements.
Definition: orientationdata.h:151
ProximityData::ProximityData
ProximityData()
Default constructor.
Definition: orientationdata.h:156
ProximityData::ProximityData
ProximityData(const quint64 &timestamp, unsigned int value, bool withinProximity)
Constructor.
Definition: orientationdata.h:165
ProximityData::withinProximity_
bool withinProximity_
is an object within proximity or not
Definition: orientationdata.h:168
TimedData
A base class for measurement data that contain timestamp.
Definition: genericdata.h:36
TimedData::timestamp_
quint64 timestamp_
monotonic time (microsec)
Definition: genericdata.h:46
TimedUnsigned
Datatype for unsigned integer value with timestamp.
Definition: timedunsigned.h:34
TimedXyzData
Class for vector type measurement data (timestamp, x, y, z).
Definition: genericdata.h:53
genericdata.h
Basic datatypes for filters.
AccelerationData
TimedXyzData AccelerationData
Accelerometer mesurement data.
Definition: orientationdata.h:38
OrientationData
TimedXyzData OrientationData
Device orientation measurement data.
Definition: orientationdata.h:48
MagneticFieldData
TimedXyzData MagneticFieldData
Magnetometer measurement data.
Definition: orientationdata.h:43
MagnetometerData
TimedXyzData MagnetometerData
Magnetometer measurement data.
Definition: orientationdata.h:53
unsigned.h
QObject based datatype for TimedUnsigned.