DUNE: Uniform Navigational Environment  2016.05.0
Simulators::Environment::Task Struct Reference

Public Member Functions

 Task (const std::string &name, Tasks::Context &ctx)
 
void onResourceAcquisition (void)
 
void onResourceRelease (void)
 
void onUpdateParameters (void)
 
void onResourceInitialization (void)
 
void onEntityReservation (void)
 
void consume (const IMC::GpsFix *msg)
 
void consume (const IMC::SimulatedState *msg)
 
void task (void)
 
void updateBottomDistance (void)
 
double depthAt (double x, double y)
 
void updateForwardDistance (void)
 
double forwardRange (double psi_offset=0.0)
 
double bottomIntersection (void)
 

Public Attributes

IMC::Distance m_bd
 
IMC::Distance m_fd
 
IMC::SimulatedState m_sstate
 
double m_a_n
 
double m_a_e
 
double m_b_n
 
double m_b_e
 
Random::Generatorm_prng
 
QuadTreem_qtree
 
double m_ref_lat
 
double m_ref_lon
 
double m_off_n
 
double m_off_e
 
PencilBeamm_pb
 
Arguments m_args
 

Constructor & Destructor Documentation

Simulators::Environment::Task::Task ( const std::string &  name,
Tasks::Context &  ctx 
)
inline

Member Function Documentation

double Simulators::Environment::Task::bottomIntersection ( void  )
inline

Compute the depths of c_forward_points in front of the vehicle Use connections between these points as line segments and intersect them with lower beam part of the echo sounder.

Returns
range after intersection

References depthAt(), Simulators::Environment::Arguments::forward_width, DUNE::Math::lineSegmentIntersect(), m_args, m_off_e, m_off_n, m_sstate, and Simulators::Environment::Arguments::max_range.

Referenced by forwardRange().

void Simulators::Environment::Task::consume ( const IMC::GpsFix *  msg)
inline
void Simulators::Environment::Task::consume ( const IMC::SimulatedState *  msg)
inline

References m_sstate.

double Simulators::Environment::Task::depthAt ( double  x,
double  y 
)
inline

Compute depth at a certian (x, y) position.

Parameters
[in]xcoordinate of position
[in]ycoordinate of position
Returns
depth at specified point

References Simulators::Environment::Point::distance(), Simulators::Environment::Arguments::interp_radius, m_args, m_qtree, Simulators::Environment::Arguments::oob_depth, Simulators::Environment::QuadTree::search(), and Simulators::Environment::Arguments::tide.

Referenced by bottomIntersection(), and updateBottomDistance().

double Simulators::Environment::Task::forwardRange ( double  psi_offset = 0.0)
inline
void Simulators::Environment::Task::onEntityReservation ( void  )
inline
void Simulators::Environment::Task::onResourceAcquisition ( void  )
inline
void Simulators::Environment::Task::onResourceRelease ( void  )
inline

References m_pb, m_prng, and m_qtree.

void Simulators::Environment::Task::updateBottomDistance ( void  )
inline

Update bottom distance value with bathymetry.

References Simulators::Environment::Arguments::bd_std_dev, depthAt(), DUNE::Math::Random::Generator::gaussian(), m_args, m_bd, m_off_e, m_off_n, m_prng, and m_sstate.

Referenced by task().

Member Data Documentation

double Simulators::Environment::Task::m_a_e

Referenced by consume(), and forwardRange().

double Simulators::Environment::Task::m_a_n

Pier points offsets point A north, A east, B north ...

Referenced by consume(), and forwardRange().

double Simulators::Environment::Task::m_b_e

Referenced by consume(), and forwardRange().

double Simulators::Environment::Task::m_b_n

Referenced by consume(), and forwardRange().

IMC::Distance Simulators::Environment::Task::m_bd
IMC::Distance Simulators::Environment::Task::m_fd

Forward distance message.

Referenced by onEntityReservation(), onResourceInitialization(), and updateForwardDistance().

double Simulators::Environment::Task::m_off_e
double Simulators::Environment::Task::m_off_n

NE offsets in regard to navigational reference.

Referenced by bottomIntersection(), consume(), and updateBottomDistance().

PencilBeam* Simulators::Environment::Task::m_pb
Random::Generator* Simulators::Environment::Task::m_prng
QuadTree* Simulators::Environment::Task::m_qtree
double Simulators::Environment::Task::m_ref_lat

Reference latitude and longitude for data points.

Referenced by consume(), and onResourceInitialization().

double Simulators::Environment::Task::m_ref_lon
IMC::SimulatedState Simulators::Environment::Task::m_sstate
Collaboration diagram for Simulators::Environment::Task:
Collaboration graph