blip  0.1
MagneticFieldSensorEvent.hpp
Go to the documentation of this file.
1 #ifndef __blip_MagneticFieldSensorEvent_hpp
2 #define __blip_MagneticFieldSensorEvent_hpp
3 
4 #include <blip/Blip.hpp>
5 #include <blip/SensorEvent.hpp>
6 
7 namespace blip {
8 
15 {
16  public:
17 
19  MagneticFieldSensorEvent(time_ms_t eventTime, const float values[16],
20  Accuracy accuracy);
24  virtual ~MagneticFieldSensorEvent();
25 
27  inline float getFieldX() const
28  { return(getValue(0)); }
29 
31  inline float getFieldY() const
32  { return(getValue(1)); }
33 
35  inline float getFieldZ() const
36  { return(getValue(2)); }
37 
38  private:
39 
40  CCXX_COPY_DECLS(MagneticFieldSensorEvent);
41 };
42 
43 } // namespace blip
44 
45 #endif // __blip_MagneticFieldSensorEvent_hpp
float getValue(int index) const
Get a sensor value.
float getFieldX() const
Get the ambient magnetic field in the X-axis.
Definition: MagneticFieldSensorEvent.hpp:27
virtual ~MagneticFieldSensorEvent()
Destructor.
Definition: MagneticFieldSensorEvent.cpp:17
An abstract base class for sensor events.
Definition: SensorEvent.hpp:20
WAV file format details at: https://ccrma.stanford.edu/courses/422/projects/WaveFormat/.
Definition: AccelerometerSensorEvent.cpp:3
float getFieldZ() const
Get the ambient magnetic field in the Z-axis.
Definition: MagneticFieldSensorEvent.hpp:35
Accuracy
Sensor accuracy ratings.
Definition: SensorEvent.hpp:13
A magnetic field sensor event, which measures the ambient magnetic field.
Definition: MagneticFieldSensorEvent.hpp:14
float getFieldY() const
Get the ambient magnetic field in the Y-axis.
Definition: MagneticFieldSensorEvent.hpp:31