I want to compute the displacement of an object at a certain moment in time, given the values for:
- Initial velocity vStart (m/s)
- Target velocity vEnd (m/s)
- Total distance traveled sTotal (meters)
- Total duration tTotal (seconds)
At any given time between 0 and tTotal seconds I want to compute the displacement at that moment.
For example, a car travels at 50 m/s, and wants to decelerate to 35 m/s over 200 meters, and knows this will take 15 seconds. I want to compute the car's displacement after e.g. 4 seconds from when he starts decelerating, considering the case where the deceleration is constant.
How would I do this?