How can I calculate speed based on previous speed?

  • Thread starter Thread starter Tim Leijten
  • Start date Start date
  • Tags Tags
    Force Speed Time
AI Thread Summary
To calculate speed in a train simulator program while accounting for frame rate drops and force changes, the formula can be revised to incorporate the previous speed. The suggested equation is Speed = (f/m) * time between frames + previous speed. This adjustment allows for a smoother transition between frames and more accurate speed calculations. Implementing this method can enhance the realism of the simulation. Accurate speed calculation is crucial for improving the overall performance of the simulator.
Tim Leijten
Messages
28
Reaction score
1
Hi,

I am developing a Train Simulator kind of program where I calculate speed each frame.
I currently do that by:
Speed = (f/m)*elapsed frames*time between frames
This works, but goes wrong when there are framerate drops or if the force changes, that's why i want to calculate the speed with the speed in the previous frame, and the time a frame took to complete.
Can someone help me with calculating speed based on the previous speed and time between frames?Thanks
 
Physics news on Phys.org
It's just a minor revision of the equation you have:
Speed = (f/m)*time between frames+ previous speed
 
  • Like
Likes Tim Leijten and anorlunda
russ_watters said:
It's just a minor revision of the equation you have:
Speed = (f/m)*time between frames+ previous speed
Thank you!
 
  • Like
Likes russ_watters
The rope is tied into the person (the load of 200 pounds) and the rope goes up from the person to a fixed pulley and back down to his hands. He hauls the rope to suspend himself in the air. What is the mechanical advantage of the system? The person will indeed only have to lift half of his body weight (roughly 100 pounds) because he now lessened the load by that same amount. This APPEARS to be a 2:1 because he can hold himself with half the force, but my question is: is that mechanical...
Hello everyone, Consider the problem in which a car is told to travel at 30 km/h for L kilometers and then at 60 km/h for another L kilometers. Next, you are asked to determine the average speed. My question is: although we know that the average speed in this case is the harmonic mean of the two speeds, is it also possible to state that the average speed over this 2L-kilometer stretch can be obtained as a weighted average of the two speeds? Best regards, DaTario
Some physics textbook writer told me that Newton's first law applies only on bodies that feel no interactions at all. He said that if a body is on rest or moves in constant velocity, there is no external force acting on it. But I have heard another form of the law that says the net force acting on a body must be zero. This means there is interactions involved after all. So which one is correct?
Back
Top