This is just a rough of what I am trying to figure out.
Top speed is a given - Example 120 mph
Shift Point is 8000 RPM's
Number of Gears in Tranny are say 4
I am trying to get the kinks out of this simple formula
speed=(speed+((topspeed-currentspeed)/((RPMs/Shiftpoint)*5)/Gear*6)
Like I said it is rough and still needs a lot of work but in essence my thought process is like you are determining the number of units the car moves forward.
so if current speed is 80 in third gear at 6500 RPM then my formula would look something like
speed=(80+((120-80)/((6500/8000)*5)/3*6))
or
speed =(80+((40)/((.8125)*5)/3*6)) or speed= speed + 13.67
as rpms increase the potential accel increases and acceleration is decreased with a higher gear. When the car reaches max speed you can no longer accelerate. The only issue is balancing the formula with your needed acceleration needs. You will have to determine how you want to handle RPM's.
Like I said the formula is very rough and probably not the best math example. I am sure someone can write better code and also note this is not tested in DB but just a on paper math example.
Maybe you can get an idea for your needs.
Good luck
Wasting CPU Cycles since the 286 was a hot machine.