I hope this is the right newsgroup for this question, otherwise please
direct me to the correct one. My math and my knowledge of car mechanics
range from rusty to inexistent, I hope you can still bear with me.
Having said that: I am trying to set up a very simplicistic car
simulation. My first step looks basically like this:
// time frame in s, applied thrust in N
public void step(double time,double thrust) {
double force=thrust-getResistance(); // rolling and air resistance
double acceleration=force/weight;
velocity+=acceleration*time;
position+=velocity*time;
That seems to work. Now I would like to specify the amount of fuel burnt
in the given time frame instead of applied thrust. (I assume that I get
the whole fuel energy without any loss for the moment.) But I have
problems figuring out how to calculate the resulting thrust force from
the fuel energy.
I think I need the distance traveled in this time frame, however, this
value is not available at the moment I'm calculating thrust. Am I
totally on the wrong track? Could somebody please enlighten me or point
me to a decent web page on this topic?
Regards,
Patrick