23 lines
953 B
C++
23 lines
953 B
C++
#pragma once
|
|
|
|
#include "Sensor.h"
|
|
|
|
/// @brief A Sensor which can measure the magnetic field
|
|
class Magnetometer : public Sensor {
|
|
public:
|
|
Magnetometer();
|
|
|
|
/// @brief Returns the direction of the magnetic field relative to the forward direction
|
|
/// @return The direction, negative is to the left, positive is to the right
|
|
/// @note The actual unit (degrees, radians, -1..1, ...) depends on the sensor.
|
|
virtual float GetDirection();
|
|
/// @brief Returns the inclination of the magnetic field relative to the horizontal plane
|
|
/// @return The direction, negative is downward, positive is upward
|
|
/// @note The actual unit (degrees, radias, -1..1, ...) depends on the sensor.
|
|
virtual float GetInclination();
|
|
|
|
/// @brief Returns the strength of the magnetic field
|
|
/// @return The strength. This values should always be positive
|
|
/// @note The actual unit (tesla, 0..1, ...) depends on the sensor.
|
|
virtual unsigned float GetMagnitude();
|
|
} |