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

#include <uwsmposition.h>

Inheritance diagram for UWSMPosition:
Collaboration diagram for UWSMPosition:

Public Member Functions

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

Private Member Functions

virtual void update (double now)
 

Private Attributes

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

Detailed Description

Definition at line 57 of file uwsmposition.h.

Constructor & Destructor Documentation

◆ UWSMPosition()

UWSMPosition::UWSMPosition ( )

Constructor.

Definition at line 60 of file uwsmposition.cpp.

◆ ~UWSMPosition()

UWSMPosition::~UWSMPosition ( )
virtual

Destructor.

Definition at line 75 of file uwsmposition.cpp.

Member Function Documentation

◆ command()

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

TCL command interpreter setdest <integer value>integer value>integer value>: set the movement pattern: the firts two values define the point to be reached (i.e., the direction of the movement) and the third value defines the speed to be used

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 no

Definition at line 80 of file uwsmposition.cpp.

◆ getSpeed()

double UWSMPosition::getSpeed ( ) const

Method that return the actual speed.

Definition at line 303 of file uwsmposition.cpp.

◆ getX()

double UWSMPosition::getX ( )
virtual

Method that return the current projection of the node on the x-axis.

If it's necessary (updating time ia expired), update the position values before returns it.

Definition at line 237 of file uwsmposition.cpp.

◆ getXdest()

double UWSMPosition::getXdest ( ) const
virtual

Method that return the x cooridnate of the destination point.

Definition at line 285 of file uwsmposition.cpp.

◆ getY()

double UWSMPosition::getY ( )
virtual

Method that return the current projection of the node on the y-axis.

If it's necessary (updating time ia expired), update the position values before returns it.

Definition at line 267 of file uwsmposition.cpp.

◆ getYdest()

double UWSMPosition::getYdest ( ) const
virtual

Method that return the y cooridnate of the destination point.

Definition at line 291 of file uwsmposition.cpp.

◆ getZ()

double UWSMPosition::getZ ( )
virtual

Method that return the current projection of the node on the z-axis.

If it's necessary (updating time ia expired), update the position values before returns it.

Definition at line 276 of file uwsmposition.cpp.

◆ getZdest()

double UWSMPosition::getZdest ( ) const
virtual

Method that return the z cooridnate of the destination point.

Definition at line 297 of file uwsmposition.cpp.

◆ isDestReached()

bool UWSMPosition::isDestReached ( ) const
virtual

Definition at line 225 of file uwsmposition.cpp.

◆ setdest() [1/2]

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

Definition at line 143 of file uwsmposition.cpp.

◆ setdest() [2/2]

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

Definition at line 111 of file uwsmposition.cpp.

◆ setX()

void UWSMPosition::setX ( double  x)
virtual

Definition at line 246 of file uwsmposition.cpp.

◆ setY()

void UWSMPosition::setY ( double  y)
virtual

Definition at line 253 of file uwsmposition.cpp.

◆ setZ()

void UWSMPosition::setZ ( double  z)
virtual

Definition at line 260 of file uwsmposition.cpp.

◆ update()

void UWSMPosition::update ( double  now)
privatevirtual

Method that updates both the position coordinates.

Definition at line 173 of file uwsmposition.cpp.

Member Data Documentation

◆ debug_

int UWSMPosition::debug_
private

speed of the node

Definition at line 158 of file uwsmposition.h.

◆ lastUpdateTime_

double UWSMPosition::lastUpdateTime_
private

time in which the TCL command setdest is invoked

Definition at line 145 of file uwsmposition.h.

◆ speed_

double UWSMPosition::speed_
private

position on the z-axis of the starting point (when the TCL command setdest is invoked)

Definition at line 156 of file uwsmposition.h.

◆ trgTime_

double UWSMPosition::trgTime_
private

Definition at line 144 of file uwsmposition.h.

◆ Xdest_

double UWSMPosition::Xdest_
private

time last updated of the coordinates was computed

Definition at line 147 of file uwsmposition.h.

◆ Xsorg_

double UWSMPosition::Xsorg_
private

position on the z-axis of the destination point

Definition at line 150 of file uwsmposition.h.

◆ Ydest_

double UWSMPosition::Ydest_
private

position on the x-axis of the destination point

Definition at line 148 of file uwsmposition.h.

◆ Ysorg_

double UWSMPosition::Ysorg_
private

position on the x-axis of the starting point (when the TCL command setdest is invoked)

Definition at line 152 of file uwsmposition.h.

◆ Zdest_

double UWSMPosition::Zdest_
private

position on the y-axis of the destination point

Definition at line 149 of file uwsmposition.h.

◆ Zsorg_

double UWSMPosition::Zsorg_
private

position on the y-axis of the starting point (when the TCL command setdest is invoked)

Definition at line 154 of file uwsmposition.h.


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