DUNE: Uniform Navigational Environment  2022.04.0
DUNE::Navigation::UsblTools::Target Class Reference

Detailed Description

USBL tools handler ticket.

Public Member Functions

 Target (std::string name, bool fix, bool inverted, uint16_t period)
 
bool trigger (void)
 
bool compare (std::string name)
 
void reset (bool fix, bool inverted, uint16_t period)
 
std::string getName (void)
 
bool wantsFix (void)
 
bool isInverted (void)
 
bool hasFailed (void)
 
void resetErrors (void)
 
void setOrigin (const IMC::GpsFix *msg)
 
bool getOrigin (IMC::GpsFix &msg)
 
void setRelativePosition (const IMC::UsblPositionExtended *msg)
 
bool getRelativePosition (IMC::UsblPositionExtended &msg)
 

Constructor & Destructor Documentation

◆ Target()

DUNE::Navigation::UsblTools::Target::Target ( std::string  name,
bool  fix,
bool  inverted,
uint16_t  period 
)
inline

Constructor.

Parameters
[in]nametarget's name.
[in]fixabsolute fix or relative positioning
[in]periodtarget's desired periodicity.

Member Function Documentation

◆ compare()

bool DUNE::Navigation::UsblTools::Target::compare ( std::string  name)
inline

Compare name with target name.

Parameters
[in]namename of target.
Returns
true if target's name is matched.

◆ getName()

std::string DUNE::Navigation::UsblTools::Target::getName ( void  )
inline

Get target's name.

Returns
target's name.

◆ getOrigin()

bool DUNE::Navigation::UsblTools::Target::getOrigin ( IMC::GpsFix msg)
inline

Get target's absolute position.

Parameters
[out]msgGpsFix message of target's position.
Returns
true if message is valid and has been filled, false otherwise.

◆ getRelativePosition()

bool DUNE::Navigation::UsblTools::Target::getRelativePosition ( IMC::UsblPositionExtended msg)
inline

Get target's relative position.

Parameters
[out]msgUsblPositionExtended message of target's position.
Returns
true if message is valid and has been filled, false otherwise.

◆ hasFailed()

bool DUNE::Navigation::UsblTools::Target::hasFailed ( void  )
inline

Check if the target node has failed.

Returns
true if target has reached threshold, false otherwise.

◆ isInverted()

bool DUNE::Navigation::UsblTools::Target::isInverted ( void  )
inline

Check if target is for inverted mode.

Returns
true if target is set as inverted, false otherwise.

◆ reset()

void DUNE::Navigation::UsblTools::Target::reset ( bool  fix,
bool  inverted,
uint16_t  period 
)
inline

Reset variables of target.

Parameters
[in]returnabsolute fixes or relative position.
[in]perioddesired periodicity.

◆ resetErrors()

void DUNE::Navigation::UsblTools::Target::resetErrors ( void  )
inline

Reset count of errors.

◆ setOrigin()

void DUNE::Navigation::UsblTools::Target::setOrigin ( const IMC::GpsFix msg)
inline

Set target's absolute position.

Parameters
[in]msgGpsFix message of target's position.

◆ setRelativePosition()

void DUNE::Navigation::UsblTools::Target::setRelativePosition ( const IMC::UsblPositionExtended msg)
inline

Set target's relative position.

Parameters
[in]msgUsblPositionExtended message of target's position.

◆ trigger()

bool DUNE::Navigation::UsblTools::Target::trigger ( void  )
inline

Time to track target.

Returns
true, if timer has overflown.

◆ wantsFix()

bool DUNE::Navigation::UsblTools::Target::wantsFix ( void  )
inline

Check if target node wants absolute fix.

Returns
true if target's wants absolute fix, false otherwise.
Collaboration diagram for DUNE::Navigation::UsblTools::Target:
Collaboration graph