Equation for exponential deceleration so the objects “stops” at destination

727 Views Asked by At

Let's say my ship's velocity during deceleration phase is given by:

v(t) = v0 * exp(-k * t)

where v0 is the speed at the time of starting deceleration and k is arbitrary constant.

My problem is: Is it possible to calculate such k that the ship "stops" (let's say slows to a velocity vf) at the target position given:

  • v0
  • distance to the target d0 ?

Or alternatively: given k calculating a distance at which deacceleration should start?

I'm making a space simulation game where the ship's warp drive needs to accelerate/decelerate exponentially. While accelerating to a maximum speed is easy the problem is with decelerating so that the ship "stops" at the destination.

Thank you in advance for any help.

1

There are 1 best solutions below

0
On BEST ANSWER

The total distance travelled on stopping would be

$$ d_{0} = v_{0}\int_{0}^{t_{f}}e^{-kt}dt $$

Which evaluates to

$$ d_{0} = \frac{v_{0}}{k}(1 - e^{-kt_{f}}) $$

We also have

$$ v_{f} = v_{0}e^{-kt_{f}} $$

So we can plug in $ln(\frac{v_{f}}{v_{0}})$ for -$kt_{f}$ in the original equation to get

$$ d_{0} = \frac{v_{0}}{k}(1 - \frac{v_{f}}{v_{0}}) $$

or

$$ k = \frac{v_{0} - v_{f}}{d_{0}} $$