DUNE: Uniform Navigational Environment  2022.04.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

◆ Task()

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

Member Function Documentation

◆ bottomIntersection()

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.

◆ consume() [1/2]

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

◆ consume() [2/2]

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

◆ depthAt()

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.

◆ forwardRange()

double Simulators::Environment::Task::forwardRange ( double  psi_offset = 0.0)
inline

◆ onEntityReservation()

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

◆ onResourceAcquisition()

◆ onResourceInitialization()

◆ onResourceRelease()

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

◆ onUpdateParameters()

◆ task()

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

◆ updateBottomDistance()

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().

◆ updateForwardDistance()

Member Data Documentation

◆ m_a_e

double Simulators::Environment::Task::m_a_e

◆ m_a_n

double Simulators::Environment::Task::m_a_n

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

◆ m_args

Arguments Simulators::Environment::Task::m_args

◆ m_b_e

double Simulators::Environment::Task::m_b_e

◆ m_b_n

double Simulators::Environment::Task::m_b_n

◆ m_bd

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

Bottom distance message.

◆ m_fd

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

Forward distance message.

◆ m_off_e

double Simulators::Environment::Task::m_off_e

◆ m_off_n

double Simulators::Environment::Task::m_off_n

NE offsets in regard to navigational reference.

◆ m_pb

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

Pencil beam object.

◆ m_prng

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

PRNG handle.

◆ m_qtree

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

The tree.

◆ m_ref_lat

double Simulators::Environment::Task::m_ref_lat

Reference latitude and longitude for data points.

◆ m_ref_lon

double Simulators::Environment::Task::m_ref_lon

◆ m_sstate

IMC::SimulatedState Simulators::Environment::Task::m_sstate

Current position.

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