54#define sgn(x) (((x) == 0.0) ? 0.0 : ((x) / fabs(x)))
55#define pi (4 * atan(1.0))
73 virtual double getX();
79 virtual double getY();
86 virtual double getZ();
129 virtual int command(
int argc,
const char *
const *argv);
131 double x_dest,
double y_dest,
double z_dest,
double spead);
132 virtual void setdest(
double x_dest,
double y_dest,
double z_dest);
134 virtual void setX(
double x);
135 virtual void setY(
double y);
136 virtual void setZ(
double z);
142 virtual void update(
double now);
virtual void setY(double y)
double lastUpdateTime_
time in which the TCL command setdest is invoked
virtual ~UWSMPosition()
Destructor.
int debug_
speed of the node
virtual double getY()
Method that return the current projection of the node on the y-axis.
virtual double getX()
Method that return the current projection of the node on the x-axis.
virtual bool isDestReached() const
virtual int command(int argc, const char *const *argv)
TCL command interpreter setdest <integer value>integer value>integer value>: set the movement pattern...
virtual void setZ(double z)
UWSMPosition()
Constructor.
virtual void update(double now)
Method that updates both the position coordinates.
double getSpeed() const
Method that return the actual speed.
virtual double getZdest() const
Method that return the z cooridnate of the destination point.
virtual double getYdest() const
Method that return the y cooridnate of the destination point.
double speed_
position on the z-axis of the starting point (when the TCL command setdest is invoked)
virtual double getZ()
Method that return the current projection of the node on the z-axis.
double Zdest_
position on the y-axis of the destination point
virtual void setX(double x)
virtual double getXdest() const
Method that return the x cooridnate of the destination point.
double Xdest_
time last updated of the coordinates was computed
double Ydest_
position on the x-axis of the destination point
double Xsorg_
position on the z-axis of the destination point
double Zsorg_
position on the y-axis of the starting point (when the TCL command setdest is invoked)
virtual void setdest(double x_dest, double y_dest, double z_dest, double spead)
double Ysorg_
position on the x-axis of the starting point (when the TCL command setdest is invoked)