For a project I am doing, I need to calculate the time a car will take to travel from point A to point B, given that:
- The distance between A and B is straight
- The car has starting velocity Vstart, and a maximum velocity Vmax
- At point B, a curve starts, where the car must have a different maximum velocity: Vcurvemax. This velocity is typically lower than Vmax
- The car will accelerate coming from A, at its accelaration rate, at most until it reaches velocity Vmax. At some point along the line from A to B, whether or not Vmax was reached, the car needs to decelarate (at its decelaration rate), in order to be at velocity Vcurvemax when reaching point B
My question is: is it possible to calculate precisely the time the car will take to cover the distance between A and B, given these circumstances? Actually, this comes down to another question: is it possible to calculate precisely the point between A and B where the car needs to start decelarating?
I could estimate it fairly accurately by doing a few calculations (in a programmatic loop) to find out just about where the car will have to start decelarating. However, I wonder if a calculation could precisely determine this.
Thanks for any ideas!