DUNE: Uniform Navigational Environment  2019.02.0
DUNE::Maneuvers::StationKeep Class Reference

Detailed Description

Class to control station keeping behavior.

Public Member Functions

 StationKeep (const IMC::StationKeeping *maneuver, Maneuvers::Maneuver *task, float min_radius)
 
 StationKeep (Maneuvers::Maneuver *task, double lat, double lon, float radius, float z, uint8_t z_units, float speed, uint8_t speed_units)
 
void update (const IMC::EstimatedState *state)
 
void updatePathControl (const IMC::PathControlState *pcs)
 
bool isInside (void) const
 
bool isMoving (void) const
 

Constructor & Destructor Documentation

DUNE::Maneuvers::StationKeep::StationKeep ( const IMC::StationKeeping maneuver,
Maneuvers::Maneuver task,
float  min_radius 
)

Default constructor.

Parameters
[in]maneuverpointer to rows maneuver
[in]taskpointer to task object (debug and inf)
[in]min_radiusminimum radius to consider in maneuver

References DUNE::IMC::StationKeeping::lat, DUNE::IMC::StationKeeping::lon, DUNE::IMC::StationKeeping::radius, DUNE::IMC::StationKeeping::speed, DUNE::IMC::StationKeeping::speed_units, DUNE::Math::trimValueMod(), DUNE::IMC::StationKeeping::z, and DUNE::IMC::StationKeeping::z_units.

DUNE::Maneuvers::StationKeep::StationKeep ( Maneuvers::Maneuver task,
double  lat,
double  lon,
float  radius,
float  z,
uint8_t  z_units,
float  speed,
uint8_t  speed_units 
)

Default constructor.

Parameters
[in]taskpointer to task object (debug and inf)
[in]latlatitude of maneuver
[in]lonlongitude of maneuver
[in]radiusstation keeping radius
[in]zzed reference for this maneuver
[in]z_unitsunits of the zed reference
[in]speedspeed reference for maneuver
[in]speed_unitsspeed units of the reference

References DUNE::IMC::DesiredPath::end_lat, DUNE::IMC::DesiredPath::end_lon, DUNE::IMC::DesiredPath::end_z, DUNE::IMC::DesiredPath::end_z_units, DUNE::IMC::DesiredPath::speed, and DUNE::IMC::DesiredPath::speed_units.

Member Function Documentation

bool DUNE::Maneuvers::StationKeep::isInside ( void  ) const

Check if vehicle is inside boundary.

Returns
true if inside
bool DUNE::Maneuvers::StationKeep::isMoving ( void  ) const

Check if vehicle is moving.

Returns
true if moving
void DUNE::Maneuvers::StationKeep::update ( const IMC::EstimatedState state)

Update behavior.

Parameters
[in]statepointer to EstimatedState message
void DUNE::Maneuvers::StationKeep::updatePathControl ( const IMC::PathControlState pcs)

Update behavior with path control state.

Parameters
[in]pcspointer to PathControlState message

References DUNE::IMC::PathControlState::FL_NEAR, DUNE::IMC::PathControlState::flags, DUNE::Math::norm(), DUNE::IMC::PathControlState::x, and DUNE::IMC::PathControlState::y.

Collaboration diagram for DUNE::Maneuvers::StationKeep:
Collaboration graph