/* * compute the acceleration for given velocity and enforce min_acceleration */ double BasicComputeAcceleration(DeviceIntPtr dev, DeviceVelocityPtr vel, double velocity, double threshold, double acc) { double result; result = vel->Profile(dev, vel, velocity, threshold, acc); /* enforce min_acceleration */ if (result < vel->min_acceleration) result = vel->min_acceleration; return result; }
/* * compute the acceleration for given velocity and enforce min_acceleartion */ static float BasicComputeAcceleration( DeviceVelocityPtr pVel, float velocity, float threshold, float acc){ float result; result = pVel->Profile(pVel, velocity, threshold, acc); /* enforce min_acceleration */ if (result < pVel->min_acceleration) result = pVel->min_acceleration; return result; }
/* * compute the acceleration for given velocity and enforce min_acceleartion */ float BasicComputeAcceleration( DeviceIntPtr dev, DeviceVelocityPtr vel, float velocity, float threshold, float acc){ float result; result = vel->Profile(dev, vel, velocity, threshold, acc); /* enforce min_acceleration */ if (result < vel->min_acceleration) result = vel->min_acceleration; return result; }