DESERT 4.0.0
UWSMPosition Class Reference

#include <uwsmposition.h>

Inheritance diagram for UWSMPosition:
Inheritance graph
Collaboration diagram for UWSMPosition:
Collaboration graph

Public Member Functions

 UWSMPosition ()
 
virtual ~UWSMPosition ()=default
 
virtual double getX () override
 
virtual double getY () override
 
virtual double getZ () override
 
virtual double getXdest () const
 
virtual double getYdest () const
 
virtual double getZdest () const
 
double getSpeed () const
 
virtual int command (int argc, const char *const *argv) override
 
virtual void setdest (double x_dest, double y_dest, double z_dest, double speed)
 
virtual void setdest (double x_dest, double y_dest, double z_dest)
 
virtual bool isDestReached () const
 
virtual void setX (double x) override
 
virtual void setY (double y) override
 
virtual void setZ (double z) override
 

Private Member Functions

virtual void update (double now)
 

Private Attributes

int debug_
 
double trgTime_
 
double lastUpdateTime_
 
double Xdest_
 
double Ydest_
 
double Zdest_
 
double Xsorg_
 
double Ysorg_
 
double Zsorg_
 
double speed_
 

Constructor & Destructor Documentation

◆ UWSMPosition()

UWSMPosition::UWSMPosition ( )

UWSMPosition constructor

References debug_.

◆ ~UWSMPosition()

virtual UWSMPosition::~UWSMPosition ( )
virtualdefault

UWSMPosition destructor

Member Function Documentation

◆ command()

int UWSMPosition::command ( int  argc,
const char *const *  argv 
)
overridevirtual

TCL command interpreter. It implements the following OTcl methods:

  • setdest <x> <y> <z> <speed>
  • setdest <x>< y>< z>
  • update

Moreover it inherits all the OTcl method of Position

Parameters
argcnumber of arguments in argv
argvarray of strings which are the comand parameters (Note that argv[0] is the name of the object)
Returns
TCL_OK or TCL_ERROR whether the command has been dispatched succesfully or not.

References debug_, setdest(), and update().

Here is the call graph for this function:

◆ getSpeed()

double UWSMPosition::getSpeed ( ) const

Get the current speed of the node.

Returns
double Current speed of the node

References speed_.

Referenced by UnderwaterPhysicalNoise::getSpeedKnots(), UwPosBasedRtROV::initPkt(), and UwTrackerModule::updateTrackMeasure().

◆ getX()

double UWSMPosition::getX ( )
overridevirtual

Get the current projection on x-axis of the node postion If necessary (updating time expired), update the position values.

Returns
double Current projection on x-axis of the node postion

References lastUpdateTime_, trgTime_, and update().

Referenced by UwROVModule::command(), UwPosBasedRtROV::command(), UwPosBasedRtROV::initPkt(), UwROVModule::initPkt(), UwROVModule::recv(), UwTrackerModule::updateTrackMeasure(), and UwSCFTrackerModule::updateTrackPosition().

Here is the call graph for this function:

◆ getXdest()

double UWSMPosition::getXdest ( ) const
virtual

Get the x coordinate of the destination point

Returns
double Coordinate along x-axis of destination point

References Xdest_.

Referenced by UwPosBasedRtROV::initPkt().

◆ getY()

double UWSMPosition::getY ( )
overridevirtual

Get the current projection on y-axis of the node postion If necessary (updating time expired), update the position values.

Returns
double Current projection on y-axis of the node postion

References lastUpdateTime_, trgTime_, and update().

Referenced by UwROVModule::command(), UwPosBasedRtROV::command(), UwPosBasedRtROV::initPkt(), UwROVModule::initPkt(), UwROVModule::recv(), UwTrackerModule::updateTrackMeasure(), and UwSCFTrackerModule::updateTrackPosition().

Here is the call graph for this function:

◆ getYdest()

double UWSMPosition::getYdest ( ) const
virtual

Get the y coordinate of the destination point

Returns
double Coordinate along y-axis of destination point

References Ydest_.

Referenced by UwPosBasedRtROV::initPkt().

◆ getZ()

double UWSMPosition::getZ ( )
overridevirtual

Get the current projection on z-axis of the node postion If necessary (updating time expired), update the position values.

Returns
double Current projection on z-axis of the node postion

References lastUpdateTime_, trgTime_, and update().

Referenced by UwROVModule::command(), UwPosBasedRtROV::command(), UwPosBasedRtROV::initPkt(), UwROVModule::initPkt(), UwROVModule::recv(), UwTrackerModule::updateTrackMeasure(), and UwSCFTrackerModule::updateTrackPosition().

Here is the call graph for this function:

◆ getZdest()

double UWSMPosition::getZdest ( ) const
virtual

Get the z coordinate of the destination point

Returns
double Coordinate along z-axis of destination point

References Zdest_.

Referenced by UwPosBasedRtROV::initPkt().

◆ isDestReached()

bool UWSMPosition::isDestReached ( ) const
virtual

◆ setdest() [1/2]

void UWSMPosition::setdest ( double  x_dest,
double  y_dest,
double  z_dest 
)
virtual

References debug_, lastUpdateTime_, speed_, trgTime_, update(), Xdest_, Xsorg_, Ydest_, Ysorg_, Zdest_, and Zsorg_.

Here is the call graph for this function:

◆ setdest() [2/2]

void UWSMPosition::setdest ( double  x_dest,
double  y_dest,
double  z_dest,
double  speed 
)
virtual

References debug_, lastUpdateTime_, speed_, trgTime_, update(), Xdest_, Xsorg_, Ydest_, Ysorg_, Zdest_, and Zsorg_.

Referenced by UwROVModule::command(), command(), and UwROVModule::recv().

Here is the call graph for this function:

◆ setX()

void UWSMPosition::setX ( double  x)
overridevirtual

Set the projection on x-axis of the node postion

Parameters
doubleProjection on the x-axis of the node position

References Xdest_, and Xsorg_.

Referenced by UwSCFTrackerModule::start().

◆ setY()

void UWSMPosition::setY ( double  y)
overridevirtual

Set the projection on y-axis of the node postion

Parameters
doubleProjection on the y-axis of the node position

References Ydest_, and Ysorg_.

◆ setZ()

void UWSMPosition::setZ ( double  z)
overridevirtual

Set the projection on z-axis of the node postion

Parameters
doubleProjection on the z-axis of the node position

References Zdest_, and Zsorg_.

◆ update()

void UWSMPosition::update ( double  now)
privatevirtual

Update both the current position coordinates.

Parameters
doubleTime when to update position

References debug_, lastUpdateTime_, speed_, trgTime_, Xdest_, Xsorg_, Ydest_, Ysorg_, Zdest_, and Zsorg_.

Referenced by command(), getX(), getY(), getZ(), setdest(), and setdest().

Member Data Documentation

◆ debug_

int UWSMPosition::debug_
private

◆ lastUpdateTime_

double UWSMPosition::lastUpdateTime_
private

Time when last update of the coordinates was computed.

Referenced by getX(), getY(), getZ(), setdest(), setdest(), and update().

◆ speed_

double UWSMPosition::speed_
private

Speed of the node.

Referenced by getSpeed(), setdest(), setdest(), and update().

◆ trgTime_

double UWSMPosition::trgTime_
private

Time when the TCL command setdest is invoked.

Referenced by getX(), getY(), getZ(), setdest(), setdest(), and update().

◆ Xdest_

double UWSMPosition::Xdest_
private

Position along x-axis of the destination point.

Referenced by getXdest(), isDestReached(), setdest(), setdest(), setX(), and update().

◆ Xsorg_

double UWSMPosition::Xsorg_
private

Position along x-axis of the starting point.

Referenced by setdest(), setdest(), setX(), and update().

◆ Ydest_

double UWSMPosition::Ydest_
private

Position along y-axis of the destination point.

Referenced by getYdest(), isDestReached(), setdest(), setdest(), setY(), and update().

◆ Ysorg_

double UWSMPosition::Ysorg_
private

Position along y-axis of the starting point.

Referenced by setdest(), setdest(), setY(), and update().

◆ Zdest_

double UWSMPosition::Zdest_
private

Position along z-axis of the destination point.

Referenced by getZdest(), isDestReached(), setdest(), setdest(), setZ(), and update().

◆ Zsorg_

double UWSMPosition::Zsorg_
private

Position along z-axis of the starting point.

Referenced by setdest(), setdest(), setZ(), and update().


The documentation for this class was generated from the following files: