Jump to content

Hohmann transfers on eccentric orbits


Recommended Posts

Hi there. I'm trying to make some kOS scripts to have a basic homemade rendez-vous autopilot. I'm looking for a bit of fancy maths to calculate the ideal phase angle to initiate a hohmann transfer. 

I found this thread that was helpful 

 

And this to compute the dV of the burns, which is cool.

external link

With all this information I was able to script a basic but working autopilot to do simple hohmann transfers.

 

However... I have not tried it so far but I doubt that this would be helpful if the target orbit is highly eccentric. Because what you're getting here (with the method described in the old thread) is a portion of the target's period ; and the angular velocity of a body in an eccentric orbit changes, so the relation between the period fraction that you get and the and the "angle" that the planet/ship will have travelled during your transfer will change too...

Right ?

 

I would very much like to know how MechJeb and some other mods always manage to compute the ideal phase angle even when the target orbit is highly eccentric. Would that be possible/reasonnable to replicate in kOS or does it involve a kiloton of computation and some mind boggingly complicated mathematics ?

Thanks !

Link to comment
Share on other sites

No, Hohmann transfer is for circular orbits. You cannot use it for elliptical orbits. https://en.wikipedia.org/wiki/Hohmann_transfer_orbit

As for how you would do it, I'd say maybe google the representation of the satellite's orbit in polar coordinates (I believe you can find r(t) and theta(t) in the deduction of Kepler's first law). Use these to find the tangent of the original orbit at any given point, find an ellipse that is tangent to both orbits, calculate the time you need on the transfer orbit, retrace and find the required location of the ship you are trying to rendezvous with, plot it out as a function of t, and find where it intersects the actual location of the target.

At least that's how I'd do it. Not sure if this is actually the most energy efficient way (actually I'm 95% sure there are certain cases where this is not efficient).

Anyway, that's not a kiloton of calculation, anyone who knows calculus should be able to do it, but it takes a really long time. Also, I've only tried mechjeb's rendezvous once, and it is very inefficient. I mostly plot the maneuver points myself and just use mechjeb for execution.

Link to comment
Share on other sites

1 hour ago, xlm said:

No, Hohmann transfer is for circular orbits. You cannot use it for elliptical orbits. https://en.wikipedia.org/wiki/Hohmann_transfer_orbit

Didn't know that. Well I meant hohmann-like then

1 hour ago, xlm said:

At least that's how I'd do it. Not sure if this is actually the most energy efficient way (actually I'm 95% sure there are certain cases where this is not efficient).

It's the most time efficient, and for the fuel I'd say it depends where in the eccentric orbit you do your intercept burn

1 hour ago, xlm said:

Anyway, that's not a kiloton of calculation, anyone who knows calculus should be able to do it, but it takes a really long time. Also, I've only tried mechjeb's rendezvous once, and it is very inefficient. I mostly plot the maneuver points myself and just use mechjeb for execution.

It's innefficient mostly because it doesn't combine maneuvers nor optimize their exectution order. But that's not my point, I'm referring mostly to MJ's "hohmann transfer to target" feature (in the maneuvre planer) which pretty much instantly plots the next possible intercept burn as long as the orbits are on the same plane. I could place the maneuver nodes by hand but the thing is, I already know how to do that, this time I'm trying to understand the maths and physics behind what's efficient and what isn't.

I mean I could program something to iteratively "guess" the ideal transfer with some accuracy (that's pretty much what you're describing). But it would take an enormous amount of steps compared to an analytical way of finding the right transfer orbit, if, of course, there is any.

Edited by lBoBl
Link to comment
Share on other sites

It is clearly not the most time efficient way. The most time efficient way is to point you ship towards the target, accelerate to light speed, reach target, and decelerate to match speed. In reality you don't have that kind of thrust of course, but the solution is still going to be something similar, involving accelerating for half of your trip and braking for the other half.

Also, maybe what I wrote is a little misleading. When I wrote "plot" the location of the target, what I meant was to write out the function, put it on the LHS, and put the actual orbit of the target on the RHS, and solve the equation. It's not iterative, it's quite analytical.

Link to comment
Share on other sites

1 hour ago, lBoBl said:

I mean I could program something to iteratively "guess" the ideal transfer with some accuracy (that's pretty much what you're describing). But it would take an enormous amount of steps compared to an analytical way of finding the right transfer orbit, if, of course, there is any.

Astrogator does something similar; it does a bisection method search of departure times seeking to minimize distance between the bodies at craft apoapsis. It's pretty quick.

https://github.com/HebaruSan/Astrogator/blob/0915b464707164a1d7774ecd2577dd5328256ff5/src/PhysicsTools.cs#L248-L324

I settled on this because "find an ellipse that is tangent to both orbits" started to melt my brain.

Edited by HebaruSan
Link to comment
Share on other sites

Assuming the initial orbit is circular, there are following cases:

  1. Orbits are coplanar
  2. Orbital planes are different, target orbit semimajor axis lies on the node line
  3. Orbital planes are different, target orbit semimajor axis does not lie on the node line

I'm also assuming that initial orbit is lower than target orbit.

In the first case, you need to time the first burn to arrive at Ap at the same time the target does. To calculate time to apoapsis for arbitrary orbiting object, you have to use the concepts of mean anomaly and mean motion. Mean motion is the average angular speed of an object in orbit (360° / orbital period), and mean anomaly is time since last periapsis divided by the mean motion. Thanks to Kepler's equation, mean anomaly can be expressed as a function of true anomaly, and from it one can easily get time to apoapsis.

In the second case, first burn is to match apoapses in the node opposite to AP, second burn at AP ideally combines matching periapses and inclinations. To get the rendezvous, you'l probably need to split the second burn in two. The second burn raises periapsis to get close approach at the next AP pass and partially corrects inclination, the third one finishes matching orbits.

In the third case, first burn is on the side opposite to the highest node of the target orbit to raise the AP, then basically the same procedure of split burn to match orbits and phases but with more trigonometry involved.

Also, highly recommend Braeunig website. It has lots of useful information on orbital mechanics and calculation of transfers.

 

Link to comment
Share on other sites

Thanks guys, this is exactly the kind of resources I was looking for. 

I'm gonna do some cool reading this weekend :) 

@Panda5461 I'm mostly interested in case number one. But your method is quite interesting because if I understand correctly your can compute not only the time to Ap of your target but also the time to any point of it's orbit right ? When you're referring to Ap you mean the transfer orbit's apoapsis and not necessarily the target orbit's Ap, right ? Cause if that's the case it's EXACTLY what I needed :)

Link to comment
Share on other sites

7 minutes ago, lBoBl said:

if I understand correctly your can compute not only the time to Ap of your target but also the time to any point of it's orbit right ?

That is correct. When you know two true anomalies (i.e. angles from Pe direction), you can easily calculate the difference in mean anomalies which easily translates into the time-of-flight.

8 minutes ago, lBoBl said:

When you're referring to Ap you mean the transfer orbit's apoapsis and not necessarily the target orbit's Ap, right ?

I'm assuming that first burn matches Ap of transfer orbit with the Ap of target orbit. The transfer will take exactly half of the transfer orbit period, which can be calculated from its semimajor axis.

And uh-oh, I forgot to say in the previous post that you have to match apoapses by the first burn for fuel-optimal transfer. This also means that, in general case, you have to split the burn at the transfer orbit Ap to match phases, just the same as in the second case.

Link to comment
Share on other sites

6 minutes ago, Pand5461 said:

That is correct. When you know two true anomalies (i.e. angles from Pe direction), you can easily calculate the difference in mean anomalies which easily translates into the time-of-flight.

I'm assuming that first burn matches Ap of transfer orbit with the Ap of target orbit. The transfer will take exactly half of the transfer orbit period, which can be calculated from its semimajor axis.

And uh-oh, I forgot to say in the previous post that you have to match apoapses by the first burn for fuel-optimal transfer. This also means that, in general case, you have to split the burn at the transfer orbit Ap to match phases, just the same as in the second case.

I see. I usually try to intercept(1st burn) and match(2nd) the first time I raise the orbit, but thinking about it that is only fuel efficient if both orbits are roughly circular. Doing three burns instead of two does make a lot of sense. I'll maybe try to query the eccentricity of both orbits to determine if the time-efficient way is reasonnable or not before I run the actual algorithm. Thanks !

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...