Skip to main content
Left closed in review as "Original close reason(s) were not resolved" by Jon Custer, Miyase, John Rennie
Post Closed as "Not suitable for this site" by Bob D, David Bailey, Farcher
edited tags
Link
Bob D
  • 77.9k
  • 6
  • 58
  • 152
added 5 characters in body
Source Link
Daniel
  • 103
  • 3

I'm running a simulation that updates in a fixed time $dt$.

I have a car moving straight with initial velocity $v_0$. This car has to move exactly a distance $D$ in $t$ seconds (for simplicity, suppose $t = f \times dt$, where $f$ is an integer).

How can I find the deceleration for the car to stop exactly after traversing $D$?


I'm getting confused because if I know the car will stop after $f$ frames, then the deceleration should be $(v_0 \div f)$, but when I do

for $i = 0, \dots , (f-1):$

$\quad$ position = position + speed * dt

$\quad$ speed = speed - deceleration * dt

The car doesn't stop where it should.

I'm running a simulation that updates in a fixed time $dt$.

I have a car moving straight with initial velocity $v_0$. This car has to move exactly a distance $D$ in $t$ seconds (for simplicity, suppose $t = f \times dt$, where $f$ is an integer).

How can I find the deceleration for the car to stop exactly after traversing $D$?


I'm getting confused because if I know the car will stop after $f$ frames, then the deceleration should be $(v_0 \div f)$, but when I do

for $i = 0, \dots , (f-1):$

$\quad$ position = position + speed

$\quad$ speed = speed - deceleration * dt

The car doesn't stop where it should.

I'm running a simulation that updates in a fixed time $dt$.

I have a car moving straight with initial velocity $v_0$. This car has to move exactly a distance $D$ in $t$ seconds (for simplicity, suppose $t = f \times dt$, where $f$ is an integer).

How can I find the deceleration for the car to stop exactly after traversing $D$?


I'm getting confused because if I know the car will stop after $f$ frames, then the deceleration should be $(v_0 \div f)$, but when I do

for $i = 0, \dots , (f-1):$

$\quad$ position = position + speed * dt

$\quad$ speed = speed - deceleration * dt

The car doesn't stop where it should.

edited tags
Link
Qmechanic
  • 213.1k
  • 48
  • 590
  • 2.3k
added 304 characters in body
Source Link
Daniel
  • 103
  • 3
Loading
Source Link
Daniel
  • 103
  • 3
Loading