refers precisely to the thing I am having trouble understanding!
In
//calculate the speed required to reach the target given the desired
//deceleration
double speed = dist / ((double)deceleration * DecelerationTweaker);
How does this calculate the speed? I just cannot understand it, besides doesn't
x/a have the dimensions of time squared?
I think it should be completely different, I am obviously missing something
u-Initial (current) velocity required (what we want to calculate above)
v - Final velocity (in this case zero)
x - Distance to target "dist" in the above?
a - The acceleration, in the above a = -deceleration * DecelerationTweaker?
Constant acceleration equation:
v^2 = u^2 + 2ax
therefore
u = sqrt(2*deceleration * DecelerationTweaker*x)
Can anybody point out the error?