56 ,
double *ThisCurrentVelocity
57 ,
double *ThisTargetPosition
58 ,
double *ThisTargetVelocity)
60 *ThisCurrentPosition = -(*ThisCurrentPosition ) ;
61 *ThisCurrentVelocity = -(*ThisCurrentVelocity ) ;
62 *ThisTargetPosition = -(*ThisTargetPosition ) ;
63 *ThisTargetVelocity = -(*ThisTargetVelocity ) ;
73 ,
double *ThisCurrentPosition
74 ,
double *ThisCurrentVelocity
75 ,
const double &MaxVelocity
76 ,
const double &MaxAcceleration)
78 double TimeForCurrentStep = (*ThisCurrentVelocity - MaxVelocity)
81 *TotalTime += TimeForCurrentStep;
82 *ThisCurrentPosition += 0.5 * (*ThisCurrentVelocity + MaxVelocity)
84 *ThisCurrentVelocity = MaxVelocity;
94 ,
double *ThisCurrentPosition
95 ,
double *ThisCurrentVelocity
96 ,
const double &MaxAcceleration)
98 double TimeForCurrentStep = *ThisCurrentVelocity / MaxAcceleration;
100 *TotalTime += TimeForCurrentStep;
101 *ThisCurrentPosition += 0.5 * (*ThisCurrentVelocity) * TimeForCurrentStep;
102 *ThisCurrentVelocity = 0.0;
void VToVMaxStep1(double *TotalTime, double *ThisCurrentPosition, double *ThisCurrentVelocity, const double &MaxVelocity, const double &MaxAcceleration)
One intermediate Step 1 trajectory segment: v -> +vmax (NegLin)
void NegateStep1(double *ThisCurrentPosition, double *ThisCurrentVelocity, double *ThisTargetPosition, double *ThisTargetVelocity)
Negate input values during Step 1.
void VToZeroStep1(double *TotalTime, double *ThisCurrentPosition, double *ThisCurrentVelocity, const double &MaxAcceleration)
One intermediate Step 1 trajectory segment: v -> 0 (NegLin)