2D Car Simulation with Throttle Linear Physics
Posted
by
James
on Game Development
See other posts from Game Development
or by James
Published on 2012-09-18T15:16:04Z
Indexed on
2012/09/18
15:54 UTC
Read the original article
Hit count: 297
I'm trying to make a simulation game for an automatic cruise control system. The system simulates a car on varying inclinations and throttle speeds.
I've coded up to the car physics but these do note make sense.
The dynamics of the simulation are specified as follows:
a = V' - V
T = (k1)V + ?(k2) + ma
V' = (1 - (k1 / m) V) + T - ( k2 / m) * ?
Where
- T = throttle position
k1 = viscous friction
V = speed
V' = next speed ? = angle of incline
k2 = m g sin ?
a = acceleration
m = mass
Notice that the angle of incline in the equation is not chopped up by sin or cos. Even the equation for acceleration isn't right.
Can anyone correct them or am I misinterpreting the physics?
© Game Development or respective owner