MAV'RIC
Classes | Public Member Functions | Static Public Member Functions
Gps_mocap Class Reference

Class to expose data received from motion capture system as GPS data. More...

#include <gps_mocap.hpp>

Inheritance diagram for Gps_mocap:
Inheritance graph
[legend]
Collaboration diagram for Gps_mocap:
Collaboration graph
[legend]

List of all members.

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.

Detailed Description

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


Member Function Documentation

void Gps_mocap::callback ( uint32_t  sysid,
const mavlink_message_t *  msg 
)

Method used to update internal state when a message is received.

Parameters:
sysidID of the system
msgPointer to the incoming message
Gps_mocap::conf_t Gps_mocap::default_config ( void  ) [inline, static]

Default configuration structure.

Returns:
config
gps_fix_t Gps_mocap::fix ( void  ) const [virtual]

Indicates whether fix are received.

Returns:
Value

Implements Gps.

Here is the call graph for this function:

float Gps_mocap::heading ( void  ) const [virtual]

Get heading in degrees.

Returns:
heading

Implements Gps.

float Gps_mocap::heading_accuracy ( void  ) const [virtual]

Get heading accuracy in degrees.

Returns:
accuracy

Implements Gps.

bool Gps_mocap::healthy ( void  ) const [virtual]

Indicates whether the measurements can be trusted.

Returns:
Value

Implements Gps.

Here is the call graph for this function:

Here is the caller graph for this function:

float Gps_mocap::horizontal_position_accuracy ( void  ) const [virtual]

Get horizontal position accuracy in m.

Returns:
accuracy

Implements Gps.

bool Gps_mocap::init ( void  ) [virtual]

Initializes callback to mavlink messages.

Returns:
Success

Implements Gps.

Here is the call graph for this function:

float Gps_mocap::last_position_update_us ( void  ) const [virtual]

Get last position update time in microseconds.

Returns:
Update time

Implements Gps.

Here is the caller graph for this function:

float Gps_mocap::last_update_us ( void  ) const [virtual]

Get last update time in microseconds.

Returns:
Update time

Implements Gps.

Here is the caller graph for this function:

float Gps_mocap::last_velocity_update_us ( void  ) const [virtual]

Get last velocity update time in microseconds.

Returns:
Update time

Implements Gps.

uint8_t Gps_mocap::num_sats ( void  ) const [virtual]

Get the number of satellites.

Returns:
Value

Implements Gps.

global_position_t Gps_mocap::position_gf ( void  ) const [virtual]

Get position in global frame.

Returns:
position

Implements Gps.

bool Gps_mocap::update ( void  ) [virtual]

Main update function Reads new values from sensor.

Returns:
Success

Implements Gps.

float Gps_mocap::velocity_accuracy ( void  ) const [virtual]

Get velocity accuracy in m/s.

Returns:
velocity accuracy

Implements Gps.

std::array< float, 3 > Gps_mocap::velocity_lf ( void  ) const [virtual]

Get velocity in local frame in m/s.

Returns:
3D velocity

Implements Gps.

float Gps_mocap::vertical_position_accuracy ( void  ) const [virtual]

Get vertical position accuracy in m.

Returns:
accuracy

Implements Gps.


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines