# Trying to figure out Orbital Mechanics

1. Sep 6, 2014

### MattRob

Sooo, this is something I'm really happy I figured out, buuuut, I want to make sure it's correct.

I guess the context doesn't really matter, so you can skip the slashed part if you like. Honestly I'm not sure what forum this belongs in (Mathematics? Topology? There's no "geometry" forum, heh), but the application of it is astronomical and has to do with orbits and launch windows, so I figured there'd be some expertise, here, at least.

Context/Application:
///
I got the full realism overhaul on Kerbal Space Program, and I'm planning a mission that involves a docked two-craft assembly inserting into a low orbit over Io, undocking, the lander landing then launching again to conduct a rendezvous with the orbiter, a la' Apollo. The only problem is, I can guarantee I won't be in an equatorial orbit, and I want to be a stickler for realism and get back up before radiation doses build up too much. Issue is, Io spins, so I'm no longer under the orbiter's orbit if I stay too long. But I've started to realize, that the launch windows to get into the correct orbital plane are a bit complicated to figure out, and that I could use my latitude to pick how long until that launch window opens again.

So I'm trying to figure out how to determine that launch window. If I can find this angle, then it's really simple math based on how quickly Io spins, to pick my latitude for a certain surface stay time.
///

The problem itself:

I've got an orbit inclined by a certain amount $I$. I need to find the longitude/angle in-between the two points that this orbit intersects at any particular latitude. I'll call this angle $\theta$.

First step, to simplify the problem, I assumed that I could stretch out the sphere to a cylinder while preserving the relationship of theta to other relevant features (ie, inclination and latitude), so long as the orbit is stretched as well.

Next, I realized that viewed from above, the orbit and the planet are a circle (this is why the cylindrical projecting happened - if I'd viewed this from above without it, then the orbit would be an ellipse and this would be much more difficult).

And the angle suddenly became, instead of a complex problem in 3d space with a globe and an inclined circle, a simple problem of a 2d circle. "I know the math for this!"

If I use the center of the circle as the origin, then $\phi = acos(\frac{x}{r})$, and $\theta = 2\phi$ . Given an x-coordinate, I could find $\theta$! So how to find that?

Well, there's an illustration here I haven't covered yet. Viewed on the X-Z plane, the relationship in-between $z$ and $x$ is obvious.
$tan(I) = \frac{z}{x}$, $x = \frac{z}{tan(I)}$

Subbing back in,

$\frac{1}{2}\theta = \phi = acos(\frac{z}{r tan(I)})$

And for z, I simply had to remember that I'm working with a cylinder instead of a sphere. My vertical distance from the equatorial plane ($z$) is simply given by my radius and my latitude ($\varphi$) :

*illustrating how despite the fact I've moved onto a cylinder, rather than a sphere, "latitude" still retains meaning, and how it carries over and its trigonometric relations.

$tan(\varphi) = \frac{z}{r}$

$\theta = 2acos(\frac{tan(\varphi)}{tan(I)})$

Where $I$ is the inclination of the orbit to the equator, and $\varphi$ is the latitude.

So, did I get it right? I've shown that this is the case for a cylinder, but I'm wondering if my initial assumption about warping the sphere into a cylinder holds.

I'm just starting my Sophomore year as an undergraduate for "Physics-Astronomy," and I can't help but shake the feeling that this is a little bit what it must feel like to do original research, except it would be far more complex and something nobody's done before :p

A ton of fun, nonetheless. Note, I titled the thread more generally (and only after I wrote the main body of text) because I'm going to be doing a lot of these little things, all generally about orbital mechanics. I'm encountering a huge number of these problems as I plan this mission in Kerbal Space Program (gravity assists, finding relative inclination in-between two orbits given their LAN and $I$ to a parent body, how to find out when to launch to enter the ecliptic plane from a launch site at $\varphi$ latitude, etc.), and I figured I'd might as well keep it in one thread.

Last edited: Sep 6, 2014
2. Sep 18, 2014

### Greg Bernhardt

I'm sorry you are not finding help at the moment. Is there any additional information you can share with us?

3. Sep 22, 2014

### enorbet

Greetings
I, like you, find Kerbal to be exciting and fascinating and I'm glad it has enjoyed great popularity and even among serious scientists. However, you may find it difficult to get serious scientists to get very involved in helping you answer specific questions because afaik, it still lacks some rather serious attributes and has others just wrong. It is still an impressive learning tool and a more than merely impressive game and a superb proof of concept that will undoubtedly improve and be improved upon by others.

Until they rewrite the physics engine, this may be a show-stopper for serious inquiry beyond basics. It certainly complicates things and makes it difficult not only to get beyond a certain point but to see when the game data stacks up to diverge from reality sufficiently to have no solid meaning.

Still, I salute you for tackling the learning curve, and the several youtube videos I have watched do correct some commonly held misconceptions. It seems an important milestone in many ways.

4. Jan 4, 2015

### MattRob

How did I miss this reply? Well, I came to refer back to this and saw this new reply here, so better late than never?

The question is really more of one about real-world mechanics than Kerbal mechanics. I'm mostly curious if this holds up in reality. But, given an accurate simulation of 2-body mechanics and 3d geometry, then everything else on here should follow...

And interestingly enough, there's a really neat set of mods that addresses most of these departures from reality. It's actually somewhat comprehensive.
-N-body simulation
-Microdragging
-Accurate planets (By using data pulled from NASA's archives even on planetary alignment - launch windows occur at real world dates where T-0 in the game is New Year in Greenwich, 1954, iirc)
-Corrected thrust and specific impulse simulations
-Corrected aerodynamics
-Corrected Re-entry heating
-Simulation of life support
-Accurate engines modeled after/very closely off of real-world counterparts (including lack of throttle-ability and limited ignitions (generally 1))
-Ullage simulation
-Realistic parachute simulation
-Communications considerations
-Light-lag command considerations for unmanned crafts

Though notably it still lacks the effects of microgravity and prolonged spaceflight conditions on the human body, as well as systems failures. Some patchwork sort of solutions would be to use the centrifuge habitat module, and the same mod that includes that also throws in extra mass for simulated radiation shielding. But for a game it's still quite impressive.