24 void predict_s_tva(
double s0,
double v0,
double a0,
double delay,
double a1,
double vbound,
double t0,
double dt,
double t1,
adore::mad::LLinearPiecewiseFunctionM<double,3>& result)
30 double tmp = result.
getData()(0,i);
45 double tmp = result.
getData()(0,i);
56 int n = (std::ceil)((t1-t0)/dt);
57 result.
getData().set_size(3+1,n);
71 if( a>0.0 && v+a*dti>vbound )
76 else if( a<0.0 && v+a*dti<0.0 )
81 s+=(
std::max)(0.0,v*dti+0.5*a*dti*dti);
85 void predict_t_sva(
double s0,
double v0,
double a0,
double delay,
double a1,
double vbound,
double t0,
double dt,
double t1,
adore::mad::LLinearPiecewiseFunctionM<double,3>& result)
87 int n = (std::ceil)((t1-t0)/dt);
88 result.
getData().set_size(3+1,n);
91 double a = delay>dt?a0:a1;
101 if(t+dti>t1)dti=t1-t;
103 a = (t+dti<t0+delay) ? a0 : a1;
104 if( a>0.0 && v+a*dti>vbound )
109 else if( a<0.0 && v+a*dti<0.0 )
114 s+=(
std::max)(0.0,v*dti+0.5*a*dti*dti);
Definition: velocityprediction.h:22
void predict_t_sva(double s0, double v0, double a0, double vbound, double t0, double dt, double t1, adore::mad::LLinearPiecewiseFunctionM< double, 3 > &result)
Definition: velocityprediction.h:54
void predict_t_sva(double s0, double v0, double a0, double delay, double a1, double vbound, double t0, double dt, double t1, adore::mad::LLinearPiecewiseFunctionM< double, 3 > &result)
Definition: velocityprediction.h:85
void predict_s_tva(double s0, double v0, double a0, double vbound, double t0, double dt, double t1, adore::mad::LLinearPiecewiseFunctionM< double, 3 > &result)
Definition: velocityprediction.h:39
void predict_s_tva(double s0, double v0, double a0, double delay, double a1, double vbound, double t0, double dt, double t1, adore::mad::LLinearPiecewiseFunctionM< double, 3 > &result)
Definition: velocityprediction.h:24
adoreMatrix< T, n+1, 0 > & getData()
Definition: llinearpiecewisefunction.h:147
adoreMatrix< T, N, M > max(adoreMatrix< T, N, M > a, const adoreMatrix< T, N, M > &b)
Definition: adoremath.h:686
Definition: areaofeffectconverter.h:20