DUNE: Uniform Navigational Environment  2017.01.0
Maneuver::RowsCoverage::Task Struct Reference

Public Member Functions

 Task (const std::string &name, Tasks::Context &ctx)
 
virtual ~Task (void)
 
void onManeuverDeactivation (void)
 
void consume (const IMC::RowsCoverage *maneuver)
 
void consume (const IMC::EstimatedState *msg)
 
void onPathControlState (const IMC::PathControlState *pcs)
 
void sendPath (double lat, double lon)
 

Public Attributes

IMC::RowsCoverage m_maneuver
 
IMC::EstimatedState m_state
 
IMC::DesiredPath m_path
 
Maneuvers::RowsStages * m_stages_parser
 
float m_alt_min
 
double m_cov_pred
 
double m_cov_actual_min
 
double m_cur_hstep
 
Math::MovingAverage< float > * m_alt_avrg
 
unsigned int m_stage
 
Arguments m_args
 

Constructor & Destructor Documentation

Maneuver::RowsCoverage::Task::Task ( const std::string &  name,
Tasks::Context &  ctx 
)
inline

Constructor.

Parameters
[in]nametask name.
[in]ctxcontext.

References Maneuver::RowsCoverage::Arguments::altitude_average_size, m_args, and Maneuver::RowsCoverage::Arguments::min_altitude.

virtual Maneuver::RowsCoverage::Task::~Task ( void  )
inlinevirtual

Destructor.

References m_alt_avrg, and m_stages_parser.

Member Function Documentation

void Maneuver::RowsCoverage::Task::consume ( const IMC::RowsCoverage *  maneuver)
inline
void Maneuver::RowsCoverage::Task::consume ( const IMC::EstimatedState *  msg)
inline
void Maneuver::RowsCoverage::Task::onManeuverDeactivation ( void  )
inline

References m_alt_avrg, and m_stages_parser.

void Maneuver::RowsCoverage::Task::onPathControlState ( const IMC::PathControlState *  pcs)
inline

On PathControlState message.

Parameters
[in]pcspointer to PathControlState message

References m_alt_avrg, m_alt_min, m_cov_actual_min, m_cov_pred, m_cur_hstep, m_maneuver, m_stage, m_stages_parser, and sendPath().

void Maneuver::RowsCoverage::Task::sendPath ( double  lat,
double  lon 
)
inline

Send new desired path.

Parameters
[in]latlatitude for new desired path
[in]lonlongitude for new desired path

References m_path.

Referenced by consume(), and onPathControlState().

Member Data Documentation

Math::MovingAverage<float>* Maneuver::RowsCoverage::Task::m_alt_avrg

Moving average for min. altitude calculation.

Referenced by consume(), onManeuverDeactivation(), onPathControlState(), and ~Task().

float Maneuver::RowsCoverage::Task::m_alt_min

Minimum altitude holder for hstep calculation.

Referenced by consume(), and onPathControlState().

Arguments Maneuver::RowsCoverage::Task::m_args

Task arguments.

Referenced by consume(), and Task().

double Maneuver::RowsCoverage::Task::m_cov_actual_min

Calculated coverage with min. altitude.

Referenced by consume(), and onPathControlState().

double Maneuver::RowsCoverage::Task::m_cov_pred

Predicted coverage.

Referenced by consume(), and onPathControlState().

double Maneuver::RowsCoverage::Task::m_cur_hstep

Current hstep in use.

Referenced by consume(), and onPathControlState().

IMC::RowsCoverage Maneuver::RowsCoverage::Task::m_maneuver

Maneuver.

Referenced by consume(), and onPathControlState().

IMC::DesiredPath Maneuver::RowsCoverage::Task::m_path

DesiredPath.

Referenced by consume(), and sendPath().

unsigned int Maneuver::RowsCoverage::Task::m_stage

Stage counter.

Referenced by consume(), and onPathControlState().

Maneuvers::RowsStages* Maneuver::RowsCoverage::Task::m_stages_parser

Rows stages parser.

Referenced by consume(), onManeuverDeactivation(), onPathControlState(), and ~Task().

IMC::EstimatedState Maneuver::RowsCoverage::Task::m_state

EstimatedState.

Collaboration diagram for Maneuver::RowsCoverage::Task:
Collaboration graph