# Problem

I need to calculate the minimum time, t, it takes to travel a given distance, x.

# Constraints and Known Variables

Distance x is broken up into two distinct, known segments:

• xv = vacuum distance
• xa = atmospheric distance
• x = xv + xa

While traveling the length of distance xv, I am under constant, known acceleration or deceleration:

• ava = vacuum acceleration rate
• avd = vacuum deceleration rate

While traveling the length of distance xa, I am under constant, known acceleration or deceleration:

• aaa = atmospheric acceleration rate
• aad = atmospheric deceleration rate

I will have known velocity constraints:

• v0 = starting velocity
• vf = ending velocity
• vmax = max velocity (cannot exceed this velocity)

# Example 1

I'm in a spacecraft 60km above the surface of a moon. I need to travel to the surface of the moon as quickly as possible. Ignore rotations/orbits. Both my starting and ending velocities are/must be 0 m/s. The moon's atmosphere begins sharply at 30km (there is no gradient here). I have four distinct acceleration/deceleration rates: acceleration in a vacuum, deceleration in a vacuum, acceleration in atmosphere, and deceleration in atmosphere. My spacecraft is governed by a top speed. What is the shortest amount of time it takes me to reach the surface.

# Example 2

I'm in a spacecraft on the surface of the same moon. I need to climb to an altitude of 45km as quickly as possible (remember, the atmosphere ends sharply at 30km). My starting velocity is 0 m/s, but I do not care what my ending velocity is, so long as it does not exceed the top speed of my craft.

# Question

I've solved the above problem for a single rate of acceleration and a single rate of deceleration. However, the addition of the notion of two distinct rates of acceleration and two distinct rates of deceleration has really thrown me through a loop. I'm pretty much lost after banging my head against a wall for a few days.

• why not solve for the two situations separately? it seems they can be thought of as distinct problems. Aug 29, 2018 at 2:16
• I second the above comment. You have starting velocity. First, find velocity at the point were atmosphere ends and that's your initial velocity for the second part of the problem. Aug 29, 2018 at 2:26
• They are not entirely distinct problems. If my ending velocity was 0 and my final velocity coming out of segment 1 and into segment 2 was too large to decelerate from, I've got a problem. I'd have to cap my segment 1 final velocity to the max allowable velocity entering segment 2, considering ending velocity requirements and rate of deceleration. They are inter-related insofar as segment 1 must respect the overall problem's constraints with respect to what would happen in segment 2. Aug 29, 2018 at 16:43
• Well, it seems you've since gotten it sorted out. At a glance, i would solve this using letters in place of the relevant starting and ending velocities, and then use those results to bound the relevant things. Aug 30, 2018 at 1:25

For the second, accelerate fully in the atmosphere until either you hit top speed or you hit the top of the atmosphere. In the first case, just keep going to $45$ km. In the second, keep accelerating in vacuum until maximum speed, then just hold it.