# Estimating traversal time of car on a path

1. Apr 16, 2010

### fishingspree2

Hello, I have defined a C2 continuous path using piecewise functions, and I want to estimate the time a car takes to go from the beginning to the end. There are many things left out, such as weight transfer. Here is the "pseudocode" of what I tried:

deltaT is set to 0.1 seconds
input: beginning, end, deltaT

t=0
v=0
a="some acceleration i choose"
position= beginning

while "end of path not reached" do
travelleddistance=$$v\Delta t+0.5a\Delta t^{2}$$
position="new position on the path, given the travelled distance"
t=$$t+\Delta t$$
$$v=\min \left(\sqrt{\frac{curveradius\cdot \mu_{s}\left(mass\cdot g+downforce)}{mass}},v+a\Delta t,\left(\textrm{maxspeed given power of car, bounded by air drag}\right)\right)$$
$$a=\min\left ( \sqrt{\textrm{formula derived from tractioncircle}},\frac{Power of car}{v\cdot mass} \right )$$​
end do
output: t

A few questions:
this basic algorithm assumes the car can always decelerates from speed v to the next maximum speed, for any delta T. Any ideas on how to take deceleration limits into account?