![]() |
DUNE: Uniform Navigational Environment
2016.09.0
|
Class to control elevator behavior.
Public Member Functions | |
| Elevate (const IMC::Elevator *maneuver, Maneuvers::Maneuver *task, float min_radius) | |
| void | update (const IMC::EstimatedState *msg) |
| void | updatePathControl (const IMC::PathControlState *msg) |
| bool | isDone (void) const |
| int | getElevatorDirection (void) const |
| float | getVerticalError (float depth, float altitude) |
| float | getVerticalError (const IMC::EstimatedState *msg) |
| DUNE::Maneuvers::Elevate::Elevate | ( | const IMC::Elevator * | maneuver, |
| Maneuvers::Maneuver * | task, | ||
| float | min_radius | ||
| ) |
Default constructor.
| [in] | maneuver | pointer to rows maneuver |
| [in] | task | pointer to task object (debug and inf) |
| [in] | min_radius | minimum radius to consider in maneuver |
References DUNE::IMC::CL_PATH, DUNE::IMC::DesiredPath::clear(), DUNE::IMC::DesiredPath::end_lat, DUNE::IMC::DesiredPath::end_lon, DUNE::IMC::Elevator::lat, DUNE::IMC::Elevator::lon, DUNE::IMC::DesiredPath::lradius, DUNE::IMC::Elevator::radius, DUNE::IMC::DesiredPath::speed, DUNE::IMC::Elevator::speed, DUNE::IMC::DesiredPath::speed_units, DUNE::IMC::Elevator::speed_units, and DUNE::Math::trimValueMod().
|
inline |
Get the elevator's direction.
|
inline |
Compute vertical error.
| [in] | depth | current vehicle's depth |
| [in] | altitude | current vehicle's altitude |
References DUNE::IMC::Elevator::end_z, DUNE::IMC::Elevator::end_z_units, and DUNE::IMC::Z_ALTITUDE.
Referenced by getVerticalError(), and update().
|
inline |
Compute vertical error.
| [in] | msg | pointer to EstimatedState message |
References DUNE::IMC::EstimatedState::alt, DUNE::IMC::EstimatedState::depth, and getVerticalError().
|
inline |
Check if elevator has finished.
| void DUNE::Maneuvers::Elevate::update | ( | const IMC::EstimatedState * | msg | ) |
Update object with EstimatedState message.
| [in] | msg | pointer to EstimatedState message |
References DUNE::IMC::EstimatedState::alt, DUNE::IMC::EstimatedState::depth, DUNE::IMC::DesiredPath::end_z, DUNE::IMC::Elevator::end_z, DUNE::IMC::DesiredPath::end_z_units, DUNE::IMC::Elevator::end_z_units, DUNE::IMC::DesiredPath::FL_LOITER_CURR, DUNE::IMC::DesiredPath::flags, getVerticalError(), DUNE::IMC::Elevator::start_z, DUNE::IMC::Elevator::start_z_units, and DUNE::IMC::Z_ALTITUDE.
| void DUNE::Maneuvers::Elevate::updatePathControl | ( | const IMC::PathControlState * | msg | ) |
Update object with PathControlState message.
| [in] | msg | pointer to PathControlState message |
References DUNE::IMC::PathControlState::FL_LOITERING, and DUNE::IMC::PathControlState::flags.
