DUNE: Uniform Navigational Environment  2019.02.0
DUNE::Navigation::UsblTools::Position Struct Reference

Detailed Description

Position data structure.

Static Public Member Functions

static void decode (Position &frame, const std::vector< char > &data)
 
static void encode (Position &frame, std::vector< uint8_t > &data)
 
static size_t size (void)
 

Public Attributes

fp32_t x
 
fp32_t y
 
fp32_t z
 
fp32_t n
 
fp32_t e
 
fp32_t d
 
uint8_t accuracy
 

Member Function Documentation

static void DUNE::Navigation::UsblTools::Position::decode ( Position frame,
const std::vector< char > &  data 
)
inlinestatic

Decode an incoming data frame into a position message.

Parameters
[out]frameposition structure.
[in]dataincoming frame.

References accuracy, DUNE::Navigation::UsblTools::c_code, d, DUNE::IMC::deserialize(), e, n, size(), x, y, and z.

Referenced by DUNE::Navigation::UsblTools::Node::parse().

static void DUNE::Navigation::UsblTools::Position::encode ( Position frame,
std::vector< uint8_t > &  data 
)
inlinestatic

Encode a position message into a data frame.

Parameters
[in]frameposition structure.
[out]datadata frame.

References accuracy, DUNE::Navigation::UsblTools::c_code, DUNE::Navigation::UsblTools::CODE_POS, d, e, n, DUNE::IMC::serialize(), size(), x, y, and z.

Referenced by DUNE::Navigation::UsblTools::Modem::encode().

static size_t DUNE::Navigation::UsblTools::Position::size ( void  )
inlinestatic

Get size of frame.

Returns
size of position structure.

Referenced by decode(), and encode().

Member Data Documentation

uint8_t DUNE::Navigation::UsblTools::Position::accuracy
fp32_t DUNE::Navigation::UsblTools::Position::d
fp32_t DUNE::Navigation::UsblTools::Position::e
fp32_t DUNE::Navigation::UsblTools::Position::n
fp32_t DUNE::Navigation::UsblTools::Position::x
fp32_t DUNE::Navigation::UsblTools::Position::y
fp32_t DUNE::Navigation::UsblTools::Position::z
Collaboration diagram for DUNE::Navigation::UsblTools::Position:
Collaboration graph