UbuntuLinuxKing

Create an autopilot for Brachistochrone Trajectories?

Recommended Posts

Hi all,

I am wondering if it would be possible to create a Mechjeb-like interface that can control the ship with three parameters:

1: A target planet or ship.

2: A selected amount of acceleration force measured in gravities.

3: Whether or not the ship has the delta-v to complete the brachistochrone trajectory.

Once all three of these are fulfilled, the ship should (hopefully) burn at the target, flip 180 degrees at the exact midpoint, and burn to arrive at a safe speed. These rules do assume a torchdrive, but that's easy - just set the thrust value and ISP of your torch to some ridiculous value in the CFG. So, does anyone know what it would take to make something like this?

Thanks!

 

 

Share this post


Link to post
Share on other sites

It would be possible of course. Needs math and programming skills beyond mine though.

Just a question: are you ready for day-long trips to outer planets without time warp ability?

  • Like 1

Share this post


Link to post
Share on other sites

If acceleration is a constant 'a', then velocity is linear (v = a * t), and distance is quadratic (d = a * t^2 / 2). Take your distance to target, solve the quadratic equation to figure out how long it would take to travel that distance from a stationary start, then plug that time into the velocity equation; if the resulting velocity is greater than your actual target-relative velocity, point towards the target, else point target-retrograde.

EDIT: One step further, flip if this is true:   v > sqrt(2 * a * d)

For example, for 1g and 100 Mm, you should flip if you're going 44294 m/s or more.

Edited by HebaruSan

Share this post


Link to post
Share on other sites
6 hours ago, HebaruSan said:

If acceleration is a constant 'a', then velocity is linear (v = a * t), and distance is quadratic (d = a * t^2 / 2). Take your distance to target, solve the quadratic equation to figure out how long it would take to travel that distance from a stationary start, then plug that time into the velocity equation; if the resulting velocity is greater than your actual target-relative velocity, point towards the target, else point target-retrograde.

EDIT: One step further, flip if this is true:   v > sqrt(2 * a * d)

For example, for 1g and 100 Mm, you should flip if you're going 44294 m/s or more.

Thanks! That's probably easier than screaming at Unity to give me an exact flip point.

7 hours ago, Pand5461 said:

It would be possible of course. Needs math and programming skills beyond mine though.

Just a question: are you ready for day-long trips to outer planets without time warp ability?

One word: BetterTimeWarp.

You can do 20x Phys Warp without much issue.

Alternatively, I could make an option to spend some time coasting, during which you could TimeWarp.

Edited by UbuntuLinuxKing

Share this post


Link to post
Share on other sites

@UbuntuLinuxKing oh, you think of doing it yourself?

OK, but you've been warned about longer-than-usual burns. I also have absolutely no idea what happens if ship is thrusting during a SOI transition. That may or may not be one of the ways to summon Kraken.

A trip to Jool will take about 4 hours at 100g, ten times so at 1g. I prefer more traditional methods without über-drives and with ability to timewarp at ridiculous rates.

For high-thrust drives: If the thrust arc is negligible in comparison with the planet's SMA, then you'll need a Lambert solver to calculate intercept. Otherwise, keeping relative speed directly to the target will probably be sufficient. Still, some steering is needed beyond the flipping in the middle.

For low-thrust drives (ions, electrical propulsion): the trajectory optimization is very challenging. I don't even know what maths the space agencies use to plan missions like Dawn.

Share this post


Link to post
Share on other sites
5 minutes ago, Pand5461 said:

@UbuntuLinuxKing oh, you think of doing it yourself?

OK, but you've been warned about longer-than-usual burns. I also have absolutely no idea what happens if ship is thrusting during a SOI transition. That may or may not be one of the ways to summon Kraken.

A trip to Jool will take about 4 hours at 100g, ten times so at 1g. I prefer more traditional methods without über-drives and with ability to timewarp at ridiculous rates.

For high-thrust drives: If the thrust arc is negligible in comparison with the planet's SMA, then you'll need a Lambert solver to calculate intercept. Otherwise, keeping relative speed directly to the target will probably be sufficient. Still, some steering is needed beyond the flipping in the middle.

For low-thrust drives (ions, electrical propulsion): the trajectory optimization is very challenging. I don't even know what maths the space agencies use to plan missions like Dawn.

Thrusting during an SOI change is safe, I've tested it. What summons the Kraken while using torch drives is entering an atmosphere at a shallow angle with the drive firing.

Edited by UbuntuLinuxKing

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now