![]() |
DUNE: Uniform Navigational Environment
2022.04.1
|
USBL tools handler.
Public Member Functions | |
Modem (Tasks::Task *task) | |
bool | waitingForSystem (std::string name) |
bool | run (std::string &name, float time) |
bool | wantsFix (std::string name) |
bool | isInverted (std::string name, std::vector< uint8_t > &data) |
bool | parse (uint16_t imc_src, const IMC::UamRxFrame *msg, std::vector< uint8_t > &data) |
bool | consume (const IMC::UsblPositionExtended *msg) |
bool | consume (const IMC::GpsFix *msg) |
bool | invertedFix (std::string target, IMC::UsblFixExtended &fix) |
bool | encode (const IMC::UsblFixExtended *msg, std::vector< uint8_t > &data) |
bool | encode (const IMC::UsblPositionExtended *msg, std::vector< uint8_t > &data) |
bool | encode (const IMC::UsblAnglesExtended *msg, std::vector< uint8_t > &data) |
|
inline |
Constructor.
|
inline |
Set target's relative position.
[in] | msg | UsblPositionExtended message of target's position. |
References DUNE::IMC::UsblPositionExtended::target.
Referenced by parse().
|
inline |
Set target's absolute position.
[in] | msg | GpsFix message of target's position. |
|
inline |
Encode USBL fix message to be transmitted.
[in] | msg | pointer to message. |
[out] | data | frame to be send. |
References DUNE::Navigation::UsblTools::Fix::accuracy, DUNE::IMC::UsblFixExtended::accuracy, DUNE::Navigation::UsblTools::Fix::encode(), DUNE::Navigation::UsblTools::Fix::lat, DUNE::IMC::UsblFixExtended::lat, DUNE::Navigation::UsblTools::Fix::lon, DUNE::IMC::UsblFixExtended::lon, DUNE::IMC::UsblFixExtended::target, DUNE::Navigation::UsblTools::Fix::z, DUNE::IMC::UsblFixExtended::z, DUNE::Navigation::UsblTools::Fix::z_units, and DUNE::IMC::UsblFixExtended::z_units.
|
inline |
Encode USBL position message to be transmitted.
[in] | msg | pointer to message. |
[out] | data | frame to be send. |
References DUNE::Navigation::UsblTools::Position::accuracy, DUNE::IMC::UsblPositionExtended::accuracy, DUNE::Navigation::UsblTools::Position::d, DUNE::IMC::UsblPositionExtended::d, DUNE::Navigation::UsblTools::Position::e, DUNE::IMC::UsblPositionExtended::e, DUNE::Navigation::UsblTools::Position::encode(), DUNE::Navigation::UsblTools::Position::n, DUNE::IMC::UsblPositionExtended::n, DUNE::IMC::UsblPositionExtended::target, DUNE::Navigation::UsblTools::Position::x, DUNE::IMC::UsblPositionExtended::x, DUNE::Navigation::UsblTools::Position::y, DUNE::IMC::UsblPositionExtended::y, DUNE::Navigation::UsblTools::Position::z, and DUNE::IMC::UsblPositionExtended::z.
|
inline |
Encode USBL angles message to be transmitted.
[in] | msg | pointer to message. |
[out] | data | frame to be send. |
References DUNE::Navigation::UsblTools::Angles::accuracy, DUNE::IMC::UsblAnglesExtended::accuracy, DUNE::Navigation::UsblTools::Angles::bearing, DUNE::IMC::UsblAnglesExtended::bearing, DUNE::Navigation::UsblTools::Angles::elevation, DUNE::IMC::UsblAnglesExtended::elevation, DUNE::Navigation::UsblTools::Angles::encode(), DUNE::Navigation::UsblTools::Angles::lbearing, DUNE::IMC::UsblAnglesExtended::lbearing, DUNE::Navigation::UsblTools::Angles::lelevation, DUNE::IMC::UsblAnglesExtended::lelevation, and DUNE::IMC::UsblAnglesExtended::target.
|
inline |
Compute absolute fix of system from absolute and relative positions of target.
[in] | target | Target's name. |
[out] | fix | self fix message. |
References DUNE::IMC::UsblFixExtended::target, and DUNE::Navigation::UsblTools::toFix().
|
inline |
Get if target's is set for inverted mode.
References DUNE::Navigation::UsblTools::CODE_INV.
|
inline |
Parse incoming frame.
[in] | imc_src | IMC id of message source. |
[in] | msg | received acoustic frame. |
[out] | data | frame to be send. |
References DUNE::Navigation::UsblTools::c_mask_fix, DUNE::Navigation::UsblTools::c_mask_inverted, DUNE::Navigation::UsblTools::CODE_ORG, DUNE::Navigation::UsblTools::CODE_REQ, DUNE::Navigation::UsblTools::CODE_RPL, consume(), DUNE::IMC::UamRxFrame::data, DUNE::Navigation::UsblTools::Gps::decode(), DUNE::Navigation::UsblTools::REQ_PERIOD, DUNE::Navigation::UsblTools::REQ_START, DUNE::IMC::Message::setSource(), and DUNE::IMC::UamRxFrame::sys_src.
|
inline |
Trigger through all targets.
[out] | name | target's name to be tracked. |
[in] | time | to wait for target system's reply. |
|
inline |
This function verifies if we are waiting for the target's reply.
[in] | name | name of the target. |
|
inline |
Get if target's wants an absolute fix.