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

Detailed Description

Class to parse a rows maneuver and to create and fire each stage.

Public Member Functions

 RowsStages (const fp64_t lat, const fp64_t lon, const fp64_t bearing, const fp64_t cross_angle, const fp32_t width, const fp32_t length, const fp32_t hstep, const uint8_t coff, const uint8_t alternation, const uint8_t flags, Tasks::Task *task)
 
 RowsStages (const IMC::Rows *maneuver, Tasks::Task *task)
 
bool getNextPoint (double *lat, double *lon, double new_hstep=0)
 
bool getFirstPoint (double *lat, double *lon)
 
float getDistance (double *lat, double *lon)
 
std::vector< float >
::const_iterator 
getDistancesBegin (void)
 
std::vector< float >
::const_iterator 
getDistancesEnd (void)
 
unsigned getIndex (void)
 

Constructor & Destructor Documentation

DUNE::Maneuvers::RowsStages::RowsStages ( const fp64_t  lat,
const fp64_t  lon,
const fp64_t  bearing,
const fp64_t  cross_angle,
const fp32_t  width,
const fp32_t  length,
const fp32_t  hstep,
const uint8_t  coff,
const uint8_t  alternation,
const uint8_t  flags,
Tasks::Task task 
)

Default constructor.

Parameters
[in]latLatitude as in IMC::Rows
[in]lonLongitude as in IMC::Rows
[in]bearingBearing in radians as in IMC::Rows
[in]cross_angleCross angle in radians as in IMC::Rows
[in]widthWidth as in IMC::Rows
[in]lengthLength as in IMC::Rows
[in]hstepHorizontal step as in IMC::Rows
[in]coffCurve offset as in IMC::Rows
[in]alternationAlternation as in IMC::Rows
[in]flagsFlags as in IMC::Rows
[in]taskpointer to task object (debug and inf)
DUNE::Maneuvers::RowsStages::RowsStages ( const IMC::Rows maneuver,
Tasks::Task task 
)

Member Function Documentation

float DUNE::Maneuvers::RowsStages::getDistance ( double *  lat,
double *  lon 
)

Get total distance and last point coordinates.

Parameters
[out]latlatitude of last point found
[out]lonlongitude of last point found
Returns
total distance covered
std::vector<float>::const_iterator DUNE::Maneuvers::RowsStages::getDistancesBegin ( void  )
inline

Get an iterator to all_distances begin()

Returns
const iterator to m_all_distance.begin()
std::vector<float>::const_iterator DUNE::Maneuvers::RowsStages::getDistancesEnd ( void  )
inline

Get an iterator to all_distances begin()

Returns
const iterator to m_all_distance.begin()
bool DUNE::Maneuvers::RowsStages::getFirstPoint ( double *  lat,
double *  lon 
)

Get first point.

Parameters
[out]latlatitude of current point
[out]lonlongitude of current point
Returns
true if reached the end of the maneuver
unsigned DUNE::Maneuvers::RowsStages::getIndex ( void  )
inline

Get current point index.

Returns
index
bool DUNE::Maneuvers::RowsStages::getNextPoint ( double *  lat,
double *  lon,
double  new_hstep = 0 
)

Get next point.

Parameters
[out]latlatitude of current point
[out]lonlongitude of current point
[in]new_hstepsignals a new hstep to be used for this call
Returns
true if reached the end of the maneuver
Collaboration diagram for DUNE::Maneuvers::RowsStages:
Collaboration graph