1
$\begingroup$

Let's say my ship's velocity during deceleration phase is given by: $$ v(t) = v_0 \exp(-k t) $$

where $v_0$ 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 $v_f$) at the target position given the initial velocity, $v_0$, and distance to the target, $d_0$?

Or alternatively: given $k$ calculating a distance at which deceleration 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.

$\endgroup$

2 Answers 2

1
$\begingroup$

First, you can use your velocity expression to determine the time that it takes to reach a certain final velocity, $v_f$.

$$v_f=v_0e^{-k\Delta t}$$

Given that $\Delta t$ is the amount of time spent decelerating. If you solve this for $\Delta t$ you'll find:

$$\Delta t=-{1 \over k}\ln\left({{v_f \over v_0}}\right)$$

Next, you can determine an expression for the position with respect to time by finding the antiderivative of $v(t)$:

$$s(t)=\int v_0e^{-kt}dt=- {v_0 \over k}e^{-kt}+C$$

If you assume that you begin deceleration at position $s(0)=0$ then you may use that to determine the constant $C$, and the final expression for position at time $t$ after the start of deceleration is:

$$s(t)={v_0 \over k}\left(1-e^{-kt} \right)$$

Finally, assuming you would like to travel a distance $\Delta d$ in time $\Delta t$ (the time it takes to reach $v_f$), the above expression becomes:

$$\Delta d={v_0 \over k}\left(1-e^{-k\Delta t} \right)$$

Then you just plug the original expression found for $\Delta t$ into this expression for $\Delta d$ and you can solve for $k$. Note that you may run into trouble if you try to specify $v_f=0$ because the exponential never truly goes to zero. Of course, eventually it will become close enough that your simulation won't be able to tell the difference, but you may want to specify some velocity slightly above $0$ to avoid any potential problems.

EDIT: This solution, obviously, excludes any relativistic effects. If you are building a simulator involving a space ship it's possible you are dealing with velocities close to the speed of light. If you wanted to be completely accurate in this case, you would have to make some adjustments to take length contraction and time dilation into effect.

$\endgroup$
1
  • $\begingroup$ Thank you for the answer and detailed steps that assured me that I shouldn't try solving math issues at 2pm at night...:) Solving for k, as You said gives me k = (v0 - vf) / d which, after checking, seems to be correct. Oh, yes, i'm aware that the exponential decay never reaches zero that's why I said "stop" and in my simulation I have set vf to 1. As to speed of light...my ship travels at 3AU / s so well above c - it's not a realistic game :) $\endgroup$ Commented Feb 26, 2015 at 12:17
1
$\begingroup$

You need to solve system like following:

$\begin{cases} d_0=\int_{0}^{\tau}v_0 \exp(-kt)dt=\frac{v_0}{k} (1-\exp(-k\tau)) \\ v_f=v_0\exp(-k\tau)\end{cases}$

You need to solve for $\tau$ which is time till stop, and $k$ which is essentially rate of acceleration.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.