RoverHMC5883L is a class that is inherited from RoverSensor abstract class. RoverHMC5883L class contains member functions and variables to set up and read from HMC5883L bearing sensor that is embedded on the rover.
More...
#include <rover_hmc5883l.hpp>
|
template<typename T > |
T | MINIMUM_ (const T &a, const T &b) |
| Inline macro to find minimum of two values regardles of their types (template). More...
|
|
template<typename T > |
T | MAXIMUM_ (const T &a, const T &b) |
| Inline macro to find maximum of two values regardles of their types (template). More...
|
|
RoverHMC5883L is a class that is inherited from RoverSensor abstract class. RoverHMC5883L class contains member functions and variables to set up and read from HMC5883L bearing sensor that is embedded on the rover.
rover::RoverHMC5883L::RoverHMC5883L |
( |
| ) |
|
|
explicit |
rover::RoverHMC5883L::~RoverHMC5883L |
( |
| ) |
|
void rover::RoverHMC5883L::calibrate |
( |
void |
| ) |
|
Starts calibration for the bearing sensor.
- Returns
- void
int rover::RoverHMC5883L::getHMC588LAddress |
( |
void |
| ) |
|
Returns the private attribute HMC588L_ADDRESS.
- Returns
- address Address to return
int rover::RoverHMC5883L::getHMC588LCalibrationPeriod |
( |
void |
| ) |
|
Returns the HMC588L Calibration Duration.
- Returns
- period Period to return
float rover::RoverHMC5883L::getHMC588LDeclinationAngle |
( |
void |
| ) |
|
Returns the HMC588L Declination angle.
- Returns
- angle Declination angle to return
void rover::RoverHMC5883L::initialize |
( |
void |
| ) |
|
|
virtual |
template<typename T >
T rover::RoverHMC5883L::MAXIMUM_ |
( |
const T & |
a, |
|
|
const T & |
b |
|
) |
| |
|
inlineprivate |
Inline macro to find maximum of two values regardles of their types (template).
- Parameters
-
a | Parameter 1 |
b | Parameter 2 |
- Returns
- maximum value
template<typename T >
T rover::RoverHMC5883L::MINIMUM_ |
( |
const T & |
a, |
|
|
const T & |
b |
|
) |
| |
|
inlineprivate |
Inline macro to find minimum of two values regardles of their types (template).
- Parameters
-
a | Parameter 1 |
b | Parameter 2 |
- Returns
- minimum value
float rover::RoverHMC5883L::read |
( |
void |
| ) |
|
|
virtual |
Reads the bearing value from Bearing sensor Sunfounder HMC5883L (float).
- Returns
- bearing_val in degrees (float).
Implements rover::RoverSensor.
void rover::RoverHMC5883L::setHMC588LAddress |
( |
const int |
address | ) |
|
Sets the HMC588L Address.
- Parameters
-
- Returns
- void
void rover::RoverHMC5883L::setHMC588LCalibrationPeriod |
( |
const int |
period | ) |
|
Sets the HMC588L Calibration Duration.
- Parameters
-
- Returns
- void
void rover::RoverHMC5883L::setHMC588LDeclinationAngle |
( |
const float |
angle | ) |
|
Sets the HMC588L Declination angle.
- Parameters
-
angle | Declination angle to set |
- Returns
- void
int rover::RoverHMC5883L::CALIBRATION_DURATION |
|
private |
Calibration duration for compass sensor.
unsigned int rover::RoverHMC5883L::calibration_start |
|
mutableprivate |
Calibration variable for HMC5883L.
float rover::RoverHMC5883L::DECLINATION_ANGLE |
|
private |
Declination angle / correction factor for compass sensor.
int rover::RoverHMC5883L::HMC588L_ADDRESS |
|
private |
Address for compass sensor.
int rover::RoverHMC5883L::i2c_hmc588l_fd |
|
private |
Private member attribute for I2C file descriptor.
int rover::RoverHMC5883L::ROVERHMC5883L_SETUP_ |
|
private |
Flag to hold if HMC5883L is set up.
int16_t rover::RoverHMC5883L::xMaxRaw |
|
private |
Calibration variable to hold the maximum of xRaw results.
int16_t rover::RoverHMC5883L::xMinRaw |
|
private |
Calibration variable to hold the minimum of xRaw results.
int16_t rover::RoverHMC5883L::yMaxRaw |
|
private |
Calibration variable to hold the maximum of yRaw results.
int16_t rover::RoverHMC5883L::yMinRaw |
|
private |
Calibration variable to hold the minimum of yRaw results.
The documentation for this class was generated from the following files: