DESERT 3.6.0
Loading...
Searching...
No Matches
UWSMPosition Class Reference

#include <uwsmposition.h>

Inheritance diagram for UWSMPosition:
Collaboration diagram for UWSMPosition:

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_
 

Detailed Description

Definition at line 56 of file uwsmposition.h.

Constructor & Destructor Documentation

◆ UWSMPosition()

UWSMPosition::UWSMPosition ( )

UWSMPosition constructor.

Definition at line 57 of file uwsmposition.cpp.

◆ ~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.

Definition at line 73 of file uwsmposition.cpp.

◆ getSpeed()

double UWSMPosition::getSpeed ( ) const

Get the current speed of the node.

Returns
double Current speed of the node

Definition at line 325 of file uwsmposition.cpp.

◆ 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

Definition at line 252 of file uwsmposition.cpp.

◆ getXdest()

double UWSMPosition::getXdest ( ) const
virtual

Get the x coordinate of the destination point.

Returns
double Coordinate along x-axis of destination point

Definition at line 307 of file uwsmposition.cpp.

◆ 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

Definition at line 285 of file uwsmposition.cpp.

◆ getYdest()

double UWSMPosition::getYdest ( ) const
virtual

Get the y coordinate of the destination point.

Returns
double Coordinate along y-axis of destination point

Definition at line 313 of file uwsmposition.cpp.

◆ 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

Definition at line 296 of file uwsmposition.cpp.

◆ getZdest()

double UWSMPosition::getZdest ( ) const
virtual

Get the z coordinate of the destination point.

Returns
double Coordinate along z-axis of destination point

Definition at line 319 of file uwsmposition.cpp.

◆ isDestReached()

bool UWSMPosition::isDestReached ( ) const
virtual

Definition at line 239 of file uwsmposition.cpp.

◆ setdest() [1/2]

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

Definition at line 145 of file uwsmposition.cpp.

◆ setdest() [2/2]

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

Definition at line 110 of file uwsmposition.cpp.

◆ 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

Definition at line 263 of file uwsmposition.cpp.

◆ 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

Definition at line 270 of file uwsmposition.cpp.

◆ 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

Definition at line 277 of file uwsmposition.cpp.

◆ update()

void UWSMPosition::update ( double  now)
privatevirtual

Update both the current position coordinates.

Parameters
doubleTime when to update position

Definition at line 179 of file uwsmposition.cpp.

Member Data Documentation

◆ debug_

int UWSMPosition::debug_
private

Definition at line 199 of file uwsmposition.h.

◆ lastUpdateTime_

double UWSMPosition::lastUpdateTime_
private

Time when last update of the coordinates was computed.

Definition at line 201 of file uwsmposition.h.

◆ speed_

double UWSMPosition::speed_
private

Speed of the node.

Definition at line 208 of file uwsmposition.h.

◆ trgTime_

double UWSMPosition::trgTime_
private

Time when the TCL command setdest is invoked.

Definition at line 200 of file uwsmposition.h.

◆ Xdest_

double UWSMPosition::Xdest_
private

Position along x-axis of the destination point.

Definition at line 202 of file uwsmposition.h.

◆ Xsorg_

double UWSMPosition::Xsorg_
private

Position along x-axis of the starting point.

Definition at line 205 of file uwsmposition.h.

◆ Ydest_

double UWSMPosition::Ydest_
private

Position along y-axis of the destination point.

Definition at line 203 of file uwsmposition.h.

◆ Ysorg_

double UWSMPosition::Ysorg_
private

Position along y-axis of the starting point.

Definition at line 206 of file uwsmposition.h.

◆ Zdest_

double UWSMPosition::Zdest_
private

Position along z-axis of the destination point.

Definition at line 204 of file uwsmposition.h.

◆ Zsorg_

double UWSMPosition::Zsorg_
private

Position along z-axis of the starting point.

Definition at line 207 of file uwsmposition.h.


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