blip  0.1
GravitySensorEvent.hpp
Go to the documentation of this file.
1 #ifndef __blip_GravitySensorEvent_hpp
2 #define __blip_GravitySensorEvent_hpp
3 
4 #include <blip/Blip.hpp>
5 #include <blip/SensorEvent.hpp>
6 
7 namespace blip {
8 
15 {
16  public:
17 
19  GravitySensorEvent(time_ms_t eventTime, const float values[16],
20  Accuracy accuracy);
24  virtual ~GravitySensorEvent();
25 
27  inline float getGravityX() const
28  { return(getValue(0)); }
29 
31  inline float getGravityY() const
32  { return(getValue(1)); }
33 
35  inline float getGravityZ() const
36  { return(getValue(2)); }
37 
38  private:
39 
40  CCXX_COPY_DECLS(GravitySensorEvent);
41 };
42 
43 } // namespace blip
44 
45 #endif // __blip_GravitySensorEvent_hpp
float getGravityX() const
Get the gravity on the X-axis.
Definition: GravitySensorEvent.hpp:27
float getValue(int index) const
Get a sensor value.
float getGravityY() const
Get the gravity on the Y-axis.
Definition: GravitySensorEvent.hpp:31
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
virtual ~GravitySensorEvent()
Destructor.
Definition: GravitySensorEvent.cpp:18
float getGravityZ() const
Get the gravity on the Z-axis.
Definition: GravitySensorEvent.hpp:35
Accuracy
Sensor accuracy ratings.
Definition: SensorEvent.hpp:13
A gravity sensor event, which measures the direction and magnitude of gravity.
Definition: GravitySensorEvent.hpp:14