DUNE: Uniform Navigational Environment  2020.01.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 Simulators::Environment::Arguments::forward_width, DUNE::Math::lineSegmentIntersect(), and Simulators::Environment::Arguments::max_range.

void Simulators::Environment::Task::consume ( const IMC::GpsFix *  msg)
inline
void Simulators::Environment::Task::consume ( const IMC::SimulatedState *  msg)
inline
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, Simulators::Environment::Arguments::oob_depth, Simulators::Environment::QuadTree::search(), and Simulators::Environment::Arguments::tide.

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

Update bottom distance value with bathymetry.

References Simulators::Environment::Arguments::bd_std_dev, and DUNE::Math::Random::Generator::gaussian().

Member Data Documentation

double Simulators::Environment::Task::m_a_e
double Simulators::Environment::Task::m_a_n

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

Arguments Simulators::Environment::Task::m_args
double Simulators::Environment::Task::m_b_e
double Simulators::Environment::Task::m_b_n
IMC::Distance Simulators::Environment::Task::m_bd

Bottom distance message.

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

Forward distance message.

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

NE offsets in regard to navigational reference.

PencilBeam* Simulators::Environment::Task::m_pb

Pencil beam object.

Random::Generator* Simulators::Environment::Task::m_prng

PRNG handle.

QuadTree* Simulators::Environment::Task::m_qtree

The tree.

double Simulators::Environment::Task::m_ref_lat

Reference latitude and longitude for data points.

double Simulators::Environment::Task::m_ref_lon
IMC::SimulatedState Simulators::Environment::Task::m_sstate

Current position.

Collaboration diagram for Simulators::Environment::Task:
Collaboration graph