DUNE: Uniform Navigational Environment  2.4.2
DUNE::Plans::Progress Class Reference

Detailed Description

Utility class to estimate a plan's progress.

Static Public Member Functions

static bool getPoint (const IMC::ManeuverControlState *mcs, unsigned &number)
 
static float compute (const IMC::ManeuverControlState *mcs, const std::vector< float > &durations, float total_duration)
 
static float compute (const IMC::FollowPath *maneuver, const IMC::ManeuverControlState *mcs, const std::vector< float > &durations, float total_duration)
 
static float compute (const IMC::Rows *maneuver, const IMC::ManeuverControlState *mcs, const std::vector< float > &durations, float total_duration)
 
static float compute (const IMC::Message *man, const IMC::ManeuverControlState *mcs, const std::vector< float > &durations, float total_duration)
 

Member Function Documentation

static float DUNE::Plans::Progress::compute ( const IMC::ManeuverControlState mcs,
const std::vector< float > &  durations,
float  total_duration 
)
inlinestatic

Compute progress for multiple waypoint maneuver.

Parameters
[in]mcspointer to ManeuverControlState message
[in]durationsreference to durations vector
[in]total_durationfull duration of the plan
Returns
time left in seconds

References DUNE::IMC::ManeuverControlState::eta, and getPoint().

Referenced by compute().

static float DUNE::Plans::Progress::compute ( const IMC::FollowPath maneuver,
const IMC::ManeuverControlState mcs,
const std::vector< float > &  durations,
float  total_duration 
)
inlinestatic

Compute progress of FollowPath maneuver.

Parameters
[in]maneuverpointer to maneuver message
[in]mcspointer to ManeuverControlState message
[in]durationsreference to durations vector
[in]total_durationfull duration of the plan
Returns
time left in seconds

References compute().

static float DUNE::Plans::Progress::compute ( const IMC::Rows maneuver,
const IMC::ManeuverControlState mcs,
const std::vector< float > &  durations,
float  total_duration 
)
inlinestatic

Compute progress of Rows maneuver.

Parameters
[in]maneuverpointer to maneuver message
[in]mcspointer to ManeuverControlState message
[in]durationsreference to durations vector
[in]total_durationfull duration of the plan
Returns
time left in seconds

References compute().

static float DUNE::Plans::Progress::compute ( const IMC::Message man,
const IMC::ManeuverControlState mcs,
const std::vector< float > &  durations,
float  total_duration 
)
inlinestatic

Compute a plan's progress from maneuver and ManeuverControlState.

Parameters
[in]manpointer to maneuver message
[in]mcspointer to ManeuverControlState message
[in]durationspointer to vector of maneuver duration(s)
[in]total_durationfull duration of the plan
Returns
progress of the whole plan

References compute(), DUNE::IMC::ManeuverControlState::eta, DUNE::IMC::Message::getId(), and DUNE::Math::trimValue().

static bool DUNE::Plans::Progress::getPoint ( const IMC::ManeuverControlState mcs,
unsigned &  number 
)
inlinestatic

Get waypoint number out of info message.

Parameters
[in]mcspointer to ManeuverControlState message
[out]numberwaypoint number
Returns
true if able to get number, false otherwise

References DUNE::IMC::ManeuverControlState::info, and DUNE::Utils::String::split().

Referenced by compute().

Collaboration diagram for DUNE::Plans::Progress:
Collaboration graph