#pragma once #include "Sensor.h" namespace Passer { namespace RoboidControl { /// @brief A Sensor which can measure the magnetic field class Accelerometer : public Sensor { public: Accelerometer(){}; /// @brief Returns the direction of the acceleration in the horizontal plane /// @return The direction of the acceleration, negative is left, positive is /// right /// @note The horizontal plane is defined as being orthogonal to the gravity /// vector /// @note the units (degrees, radians, -1..1, ...) depend on the sensor float GetHorizontalAccelerationDirection(); /// @brief Returns the magnitude of the acceleration in the horizontal plane /// @return The magnitude. This value is never negative. /// @note the unity (m/s^2, 0..1) depends on the sensor. float GetHorizontalAccelerationMagnitude(); /// @brief This gives the gravity direciton relative to the down direction. /// @param horizontal the horizontal direction, negative is left, positive is /// right /// @param vertical the vertical direction, negative is down, positive is up /// @note The horizontal plane is defined as being orthogonal to the gravity /// vector /// @note the units (degrees, radians, -1..1, ...) depend on the sensor void GetAccelerationDirection(float* horizontal, float* vertical); /// @brief The magnitude of the gravity field. /// @return The magnitude. This value is never negative. /// @note the unity (m/s^2, 0..1) depends on the sensor. float GetAccelerationMagnitude(); }; } // namespace RoboidControl } // namespace Passer using namespace Passer::RoboidControl;