56 ,
double *ThisCurrentVelocity
57 ,
double *ThisTargetPosition
58 ,
double *ThisTargetVelocity
61 *ThisCurrentPosition = -(*ThisCurrentPosition ) ;
62 *ThisCurrentVelocity = -(*ThisCurrentVelocity ) ;
63 *ThisTargetPosition = -(*ThisTargetPosition ) ;
64 *ThisTargetVelocity = -(*ThisTargetVelocity ) ;
65 *Inverted = !(*Inverted) ;
75 ,
double *ThisCurrentPosition
76 ,
double *ThisCurrentVelocity
77 ,
const double &MaxVelocity
78 ,
const double &MaxAcceleration
80 ,
const bool &Inverted )
82 double TimeForCurrentStep = (*ThisCurrentVelocity - MaxVelocity)
102 *ThisCurrentTime += (TimeForCurrentStep);
103 *ThisCurrentPosition += 0.5 * (*ThisCurrentVelocity + MaxVelocity)
104 * TimeForCurrentStep;
105 *ThisCurrentVelocity = MaxVelocity;
115 ,
double *ThisCurrentPosition
116 ,
double *ThisCurrentVelocity
117 ,
const double &MaxAcceleration
119 ,
const bool &Inverted )
121 double TimeForCurrentStep = *ThisCurrentVelocity / MaxAcceleration;
140 *ThisCurrentTime += (TimeForCurrentStep);
141 *ThisCurrentPosition += 0.5 * (*ThisCurrentVelocity) * TimeForCurrentStep;
142 *ThisCurrentVelocity = 0.0;
double PolynomialTimes[MAXIMAL_NO_OF_POLYNOMIALS]
An array of ending times in seconds.
void VToVMaxStep2(double *ThisCurrentTime, double *ThisCurrentPosition, double *ThisCurrentVelocity, const double &MaxVelocity, const double &MaxAcceleration, MotionPolynomials *PolynomialsLocal, const bool &Inverted)
One intermediate Step 2 trajectory segment: v -> vmax (NegLin)
TypeIIRMLPolynomial AccelerationPolynomial[MAXIMAL_NO_OF_POLYNOMIALS]
An array of acceleration polynomials.
void NegateStep2(double *ThisCurrentPosition, double *ThisCurrentVelocity, double *ThisTargetPosition, double *ThisTargetVelocity, bool *Inverted)
Negate input values.
Three arrays of TypeIIRMLMath::TypeIIRMLPolynomial.
Header file for functions and definitions of constant values and macros.
Header file for the class TypeIIRMLMath::TypeIIRMLPolynomial and the struct TypeIIRMLMath::MotionPoly...
TypeIIRMLPolynomial VelocityPolynomial[MAXIMAL_NO_OF_POLYNOMIALS]
An array of velocity polynomials.
void VToZeroStep2(double *ThisCurrentTime, double *ThisCurrentPosition, double *ThisCurrentVelocity, const double &MaxAcceleration, MotionPolynomials *PolynomialsLocal, const bool &Inverted)
One intermediate Step 2 trajectory segment: v -> 0 (NegLin)
void SetCoefficients(const double &Coeff2, const double &Coeff1, const double &Coeff0, const double &Diff)
Sets the coefficients of the polynomial object.
unsigned char ValidPolynomials
The number of polynomials in use (0 ... MAXIMAL_NO_OF_POLYNOMIALS)
TypeIIRMLPolynomial PositionPolynomial[MAXIMAL_NO_OF_POLYNOMIALS]
An array of position polynomials.