DUNE: Uniform Navigational Environment  2016.05.0
Maneuver::FollowSystem::Task Struct Reference

Public Member Functions

 Task (const std::string &name, Tasks::Context &ctx)
void onUpdateParameters (void)
void onManeuverDeactivation (void)
void consume (const IMC::EstimatedState *msg)
void consume (const IMC::FollowSystem *maneuver)
void consume (const IMC::RemoteState *rs)
void consume (const IMC::Announce *msg)
void onPathControlState (const IMC::PathControlState *pcs)
void onStateReport (void)
void computeNEDOffsets (double lat, double lon, double depth, double psi)
bool checkSafety (double lat, double lon)
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::FollowSystem m_maneuver
IMC::EstimatedState m_estate
IMC::DesiredPath m_path
Counter< double > m_heading_timestamp
double m_remote_heading
double m_start_time
Counter< double > m_last_update
double m_last_known_bearing
double m_last_known_lat
double m_last_known_lon
bool m_first_announce
bool m_has_estimated_state
Arguments m_args

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

Member Function Documentation

bool Maneuver::FollowSystem::Task::checkSafety ( double  lat,
double  lon 

Routine for checking the safety of the vehicle's position this routine return true if the present location is safe and returns false otherwise.

References m_args, m_estate, m_has_estimated_state, and Maneuver::FollowSystem::Arguments::safe_distance.

Referenced by consume(), and onStateReport().

void Maneuver::FollowSystem::Task::computeNEDOffsets ( double  lat,
double  lon,
double  depth,
double  psi 

Function to compute new point to send to vehicle considering offsets.

References m_maneuver, and m_path.

Referenced by consume().

void Maneuver::FollowSystem::Task::consume ( const IMC::EstimatedState *  msg)
void Maneuver::FollowSystem::Task::consume ( const IMC::FollowSystem *  maneuver)
void Maneuver::FollowSystem::Task::enableMovement ( bool  enable)

Function for enabling and disabling the control loops.

Referenced by consume(), onPathControlState(), and onStateReport().

void Maneuver::FollowSystem::Task::onManeuverDeactivation ( void  )
void Maneuver::FollowSystem::Task::onPathControlState ( const IMC::PathControlState *  pcs)

Function to check if the vehicle is getting near to the next waypoint.

References enableMovement().

void Maneuver::FollowSystem::Task::onStateReport ( void  )

Member Data Documentation

Arguments Maneuver::FollowSystem::Task::m_args
IMC::EstimatedState Maneuver::FollowSystem::Task::m_estate

Vehicle's Estimated State.

Referenced by checkSafety(), and consume().

bool Maneuver::FollowSystem::Task::m_first_announce

is it the first time consume announce is being ran?

Referenced by consume(), and onManeuverDeactivation().

bool Maneuver::FollowSystem::Task::m_has_estimated_state

this boolean tells us if we have an estimated state already

Referenced by checkSafety(), consume(), and onManeuverDeactivation().

Counter<double> Maneuver::FollowSystem::Task::m_heading_timestamp

Remote State computed heading's timestamp, for evaluating the best heading to be used.

Referenced by consume(), and onUpdateParameters().

double Maneuver::FollowSystem::Task::m_last_known_bearing

variable to hold the last known bearing

Referenced by consume().

double Maneuver::FollowSystem::Task::m_last_known_lat

variable that will hold the last known latittude

Referenced by consume(), and onStateReport().

double Maneuver::FollowSystem::Task::m_last_known_lon

variable that will hold the last known longitude

Referenced by consume(), and onStateReport().

Counter<double> Maneuver::FollowSystem::Task::m_last_update

the last Clock::get() when the neighbor system's position was updated

Referenced by consume(), onStateReport(), and onUpdateParameters().

IMC::FollowSystem Maneuver::FollowSystem::Task::m_maneuver

Variable to save the maneuver's data.

Referenced by computeNEDOffsets(), consume(), and onStateReport().

IMC::DesiredPath Maneuver::FollowSystem::Task::m_path

Desired path to be thrown.

Referenced by computeNEDOffsets(), and consume().

double Maneuver::FollowSystem::Task::m_remote_heading

this variable will hold the value of the heading computed when using the announce method instead of the remote state.

Referenced by consume().

double Maneuver::FollowSystem::Task::m_start_time

the start time of the maneuver measured at consume maneuver

Referenced by consume(), and onStateReport().

Collaboration diagram for Maneuver::FollowSystem::Task:
Collaboration graph