DUNE: Uniform Navigational Environment  2.5.0
Maneuver::CoverArea::Task Struct Reference

Public Member Functions

 Task (const std::string &name, Tasks::Context &ctx)
 
void onActivation (void)
 
void resetVar (void)
 
Math::Matrix intersectSegments (const Math::Matrix &seg1, const Math::Matrix &seg2, bool *isInSegment)
 
Math::Matrix intersectSegmentPolygon (const Math::Matrix &poly, double height)
 
Math::Matrix getRows (const Math::Matrix &poly, double direction, double width, double diam)
 
double longRowsDirection (const Math::Matrix &poly, double *diameter)
 
double getClosestDistance (const Math::Matrix &row, const Math::Matrix &point, int *closest)
 
void doRows (const Math::Matrix &rows, int *times)
 
void consume (const IMC::CoverArea *maneuver)
 
void consume (const IMC::EstimatedState *msg)
 
void consume (const IMC::PathControlState *pcs)
 
void enableMovement (bool enable)
 
- Public Member Functions inherited from DUNE::IMC::Message
 Message (void)
 
virtual ~Message (void)
 
virtual Messageclone (void) const =0
 
virtual void clear (void)=0
 
virtual int validate (void) const =0
 
virtual const char * getName (void) const =0
 
virtual uint16_t getId (void) const =0
 
double setTimeStamp (double ts)
 
double setTimeStamp (void)
 
double getTimeStamp (void) const
 
uint16_t getSource (void) const
 
void setSource (uint16_t src)
 
uint8_t getSourceEntity (void) const
 
void setSourceEntity (uint8_t src_ent)
 
uint16_t getDestination (void) const
 
void setDestination (uint16_t dst)
 
uint8_t getDestinationEntity (void) const
 
void setDestinationEntity (uint8_t dst_ent)
 
virtual uint16_t getSubId (void) const
 
virtual void setSubId (uint16_t subid)
 
virtual fp64_t getValueFP (void) const
 
virtual void setValueFP (fp64_t val)
 
unsigned getSerializationSize (void) const
 
unsigned getPayloadSerializationSize (void) const
 
virtual unsigned getFixedSerializationSize (void) const
 
virtual unsigned getVariableSerializationSize (void) const
 
void toJSON (std::ostream &os) const
 
void toText (std::ostream &os) const
 
virtual uint8_t * serializeFields (uint8_t *bfr) const =0
 
virtual uint16_t deserializeFields (const uint8_t *bfr, uint16_t len)=0
 
virtual uint16_t reverseDeserializeFields (const uint8_t *bfr, uint16_t len)=0
 
virtual void fieldsToJSON (std::ostream &os, unsigned indent_level) const
 
bool operator== (const Message &other) const
 
bool operator!= (const Message &other) const
 

Public Attributes

IMC::CoverArea m_maneuver
 
IMC::EstimatedState m_estate
 
Math::Matrix m_rows
 
IMC::DesiredPath m_path
 
bool m_moving
 
bool m_increase_row
 
bool m_arrived
 
bool m_last_on_row
 
int m_current_row
 
int m_times
 
int m_param_times
 
double m_lat
 
double m_lon
 
double m_z
 
double m_next_lat
 
double m_next_lon
 
double m_param_width
 

Additional Inherited Members

- Protected Member Functions inherited from DUNE::IMC::Message
virtual void setTimeStampNested (double value)
 
virtual void setSourceNested (uint16_t value)
 
virtual void setSourceEntityNested (uint8_t value)
 
virtual void setDestinationNested (uint16_t value)
 
virtual void setDestinationEntityNested (uint8_t value)
 
virtual bool fieldsEqual (const Message &other) const
 
- Protected Attributes inherited from DUNE::IMC::Message
Header m_header
 

Constructor & Destructor Documentation

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

References m_param_times, and m_param_width.

Member Function Documentation

void Maneuver::CoverArea::Task::consume ( const IMC::CoverArea *  maneuver)
inline
void Maneuver::CoverArea::Task::consume ( const IMC::EstimatedState *  msg)
inline
void Maneuver::CoverArea::Task::consume ( const IMC::PathControlState *  pcs)
inline

References m_arrived.

void Maneuver::CoverArea::Task::doRows ( const Math::Matrix &  rows,
int *  times 
)
inline
void Maneuver::CoverArea::Task::enableMovement ( bool  enable)
inline

References m_moving.

Referenced by consume(), and doRows().

double Maneuver::CoverArea::Task::getClosestDistance ( const Math::Matrix &  row,
const Math::Matrix &  point,
int *  closest 
)
inline

Referenced by doRows().

Math::Matrix Maneuver::CoverArea::Task::getRows ( const Math::Matrix &  poly,
double  direction,
double  width,
double  diam 
)
inline

References intersectSegmentPolygon(), and DUNE::Math::min().

Referenced by consume().

Math::Matrix Maneuver::CoverArea::Task::intersectSegmentPolygon ( const Math::Matrix &  poly,
double  height 
)
inline
Math::Matrix Maneuver::CoverArea::Task::intersectSegments ( const Math::Matrix &  seg1,
const Math::Matrix &  seg2,
bool *  isInSegment 
)
inline

Referenced by intersectSegmentPolygon().

double Maneuver::CoverArea::Task::longRowsDirection ( const Math::Matrix &  poly,
double *  diameter 
)
inline

References DUNE::Math::max(), and DUNE::Math::min().

Referenced by consume().

void Maneuver::CoverArea::Task::onActivation ( void  )
inline

References resetVar().

void Maneuver::CoverArea::Task::resetVar ( void  )
inline

Member Data Documentation

bool Maneuver::CoverArea::Task::m_arrived

Referenced by consume(), doRows(), and resetVar().

int Maneuver::CoverArea::Task::m_current_row

Referenced by doRows(), and resetVar().

IMC::EstimatedState Maneuver::CoverArea::Task::m_estate

Referenced by consume(), and doRows().

bool Maneuver::CoverArea::Task::m_increase_row

Referenced by doRows(), and resetVar().

bool Maneuver::CoverArea::Task::m_last_on_row

Referenced by doRows(), and resetVar().

double Maneuver::CoverArea::Task::m_lat

Referenced by consume(), and doRows().

double Maneuver::CoverArea::Task::m_lon

Referenced by consume(), and doRows().

IMC::CoverArea Maneuver::CoverArea::Task::m_maneuver

Referenced by consume(), and doRows().

bool Maneuver::CoverArea::Task::m_moving

Referenced by consume(), enableMovement(), and resetVar().

double Maneuver::CoverArea::Task::m_next_lat

Referenced by doRows().

double Maneuver::CoverArea::Task::m_next_lon

Referenced by doRows().

int Maneuver::CoverArea::Task::m_param_times

Referenced by resetVar(), and Task().

double Maneuver::CoverArea::Task::m_param_width

Referenced by consume(), and Task().

IMC::DesiredPath Maneuver::CoverArea::Task::m_path

Referenced by consume(), and doRows().

Math::Matrix Maneuver::CoverArea::Task::m_rows

Referenced by consume(), and resetVar().

int Maneuver::CoverArea::Task::m_times

Referenced by consume(), and resetVar().

double Maneuver::CoverArea::Task::m_z

Referenced by consume(), and doRows().

Collaboration diagram for Maneuver::CoverArea::Task:
Collaboration graph