MAV'RIC
|
Class to expose data received from motion capture system as GPS data. More...
#include <gps_mocap.hpp>
Classes | |
struct | conf_t |
Configuration structure. More... | |
Public Member Functions | |
Gps_mocap (Mavlink_message_handler &message_handler, conf_t config=default_config()) | |
Constructor. | |
bool | init (void) |
Initializes callback to mavlink messages. | |
void | callback (uint32_t sysid, const mavlink_message_t *msg) |
Method used to update internal state when a message is received. | |
bool | update (void) |
Main update function Reads new values from sensor. | |
void | configure (void) |
Configure the GPS. | |
float | last_update_us (void) const |
Get last update time in microseconds. | |
float | last_position_update_us (void) const |
Get last position update time in microseconds. | |
float | last_velocity_update_us (void) const |
Get last velocity update time in microseconds. | |
global_position_t | position_gf (void) const |
Get position in global frame. | |
float | horizontal_position_accuracy (void) const |
Get horizontal position accuracy in m. | |
float | vertical_position_accuracy (void) const |
Get vertical position accuracy in m. | |
std::array< float, 3 > | velocity_lf (void) const |
Get velocity in local frame in m/s. | |
float | velocity_accuracy (void) const |
Get velocity accuracy in m/s. | |
float | heading (void) const |
Get heading in degrees. | |
float | heading_accuracy (void) const |
Get heading accuracy in degrees. | |
uint8_t | num_sats (void) const |
Get the number of satellites. | |
gps_fix_t | fix (void) const |
Indicates whether fix are received. | |
bool | healthy (void) const |
Indicates whether the measurements can be trusted. | |
Static Public Member Functions | |
static conf_t | default_config () |
Default configuration structure. |
Class to expose data received from motion capture system as GPS data.
The mocap data is received via mavlink messages of type ATT_POS_MOCAP
void Gps_mocap::callback | ( | uint32_t | sysid, |
const mavlink_message_t * | msg | ||
) |
Method used to update internal state when a message is received.
sysid | ID of the system |
msg | Pointer to the incoming message |
Gps_mocap::conf_t Gps_mocap::default_config | ( | void | ) | [inline, static] |
Default configuration structure.
gps_fix_t Gps_mocap::fix | ( | void | ) | const [virtual] |
Indicates whether fix are received.
Implements Gps.
float Gps_mocap::heading | ( | void | ) | const [virtual] |
float Gps_mocap::heading_accuracy | ( | void | ) | const [virtual] |
bool Gps_mocap::healthy | ( | void | ) | const [virtual] |
Indicates whether the measurements can be trusted.
Implements Gps.
float Gps_mocap::horizontal_position_accuracy | ( | void | ) | const [virtual] |
bool Gps_mocap::init | ( | void | ) | [virtual] |
Initializes callback to mavlink messages.
Implements Gps.
float Gps_mocap::last_position_update_us | ( | void | ) | const [virtual] |
Get last position update time in microseconds.
Implements Gps.
float Gps_mocap::last_update_us | ( | void | ) | const [virtual] |
Get last update time in microseconds.
Implements Gps.
float Gps_mocap::last_velocity_update_us | ( | void | ) | const [virtual] |
uint8_t Gps_mocap::num_sats | ( | void | ) | const [virtual] |
global_position_t Gps_mocap::position_gf | ( | void | ) | const [virtual] |
bool Gps_mocap::update | ( | void | ) | [virtual] |
float Gps_mocap::velocity_accuracy | ( | void | ) | const [virtual] |
std::array< float, 3 > Gps_mocap::velocity_lf | ( | void | ) | const [virtual] |
float Gps_mocap::vertical_position_accuracy | ( | void | ) | const [virtual] |