Jump to content

How to find apo/peri in real life?


power5000

Recommended Posts

Essentialy you use http://en.wikipedia.org/wiki/Orbit_equation. By knowing your current altitude, speed and direction, you can calculate your current theta', i.e. the angular velocity, and E, i.e. the sum of potential and kinetic energy. Solving the very first equation for r (and using l=mr²theta') gives you r³ = gamma·(1+e cos(theta))·(theta')². You can calculate gamma if you know the mass of what you are orbiting, you can calculate the constant e from E. By pluging all those in you can now calculate your current theta and thus know all those parameter. Your apo- and periapsis are at theta=pi and theta=0, respectively, in that first equation on wikipedia.

Link to comment
Share on other sites

Well if you play ksp enough you normally get a generalization of orbital speeds especially for kerbin. It is about 2500 m/s. If you are going that fast and your altitude is not changing rapidly you should be fine.

But if you want information IVA you should really get Raster Prop Monitor

Link to comment
Share on other sites

Okay I understand some of that could you do a quick example problem so I can see something a little more tangible?

Say we are flying around Kerbin at an altitude of 100km with a velocity of 2400m/s and the prograde marker is 10 degrees above the horizon. But Kerbin has a radius of 600km, so our distance from the center of Kerbin is 700km.

To figure out our apoapsis and periapsis we need to calculate our eccentricity. We take the orbit equation and do some algebra to solve for e:

e= ((É^2*r^3/GM) - 1)/cos(θ)

So we first have to figure out É (angular velocity) which is easy enough. Its simply the component of your velocity vector that's perpendicular to the normal vector. So some trigonometry (v*cos(θ)) tells me that you have an angular velocity of about 3.376e-3 radians/second. We also can grab GM (Standard gravitational parameter) for Kerbin from the KSP wiki at 3.5316e12. So we got all the numbers we need to figure out the eccentricity. Plug them all in and you get an eccentricity of 0.1086.

With the eccentricity known we have established the shape of the orbit. Now we just need to figure out the size of the orbit to know our apoapsis and periapsis. For this we need to know the semimajor axis of the orbit. An easy way to figure this one out is via the specific orbital energy:

a = -0.5*MG/(0.5v^2-MG/r)

Plug in the numbers again and we get a semimajor axis of 815558 meters. Now we can easily find out the ap and pe via:

e = (rap-rpe)/2a

Do some maths and you'll see that the difference between your pe and ap is 177139 meters. We know the semimajoraxis is the average of the apoapsis and the periapsis so our final answer is:

Apoapsis height: 904127.8 meters (304km above kerbin's surface)

Periapsis height: 726988.6 meters (127km above kerbin's surface)

Link to comment
Share on other sites

You made a mistake there, as your periapsis is lower than initial height. The approach seems correct, though, and I am too lazy to check the numbers...

Damn you're right, I shouldn't do algebra at 1AM... I'll see what I screwed up tomorrow morning.

Link to comment
Share on other sites

So we first have to figure out É(angular velocity) which is easy enough. Its simply the component of your velocity vector that's perpendicular to the normal vector. So some trigonometry (v*cos(θ))

I get the concept behind this but how did you find theta/true anomaly?

Link to comment
Share on other sites

You don't need anomaly. If you know your angular velocity and distance, you know your angular momentum. If you know your linear velocity and distance, you know your energy. Knowing energy and angular momentum gives you the apsides.

Link to comment
Share on other sites

What you're after is commonly called the 'shape' of an orbit--apoapsis and periapsis--which are both easily computed if you know the semi-major axis and the eccentricity of the orbit. We already have three orthogonal values for the 6-value system (the other three are for plane orientation, irrelevant to this problem), so this is actually pretty simple. I'd recommend the following approach:

* Compute h, the magnitude of angular momentum, from r, the known radius (altitude plus radius of the orbited body, which we assume is spherical); v, the magnitude of the orbital (inertial) velocity; and gamma, flight path angle (the angular separation between your current heading and the nearest horizon): h = r * v * cos(gamma)

* Compute the semi-major axis using the expression for orbital energy: a = (mu * r) / (2 * mu - r * v^2)

* Compute the eccentricity from h, mu, and a: e = sqrt(1 - h^2 / (mu * a))

* Compute radius at apogee or perigee from a and e: ra = a (1 + e), rp = a (1 - e)

Most of these are simply derived from geometry and basic orbital properties. Here's an example:

r = 1.6e6 (altitude = 1e6, radius of Kerbin = 6e5 m)

v = 1.2e3 m/s

gamma = 10 deg (~0.175 radians)

mu = 3.5316e12 m3/s2

Here are the steps:

* h = 1.6e6 * 1.2e3 * cos(0.175) = 1.8907e9 m2/s

* a = 3.5316e12 * 1.6e6 / (2 * 3.5316e12 - 1.6e6 * 1.2e3^2) = 1.1873e6 m

* e = sqrt(1 - 1.8907e9^2 / (3.5316e12 * 1.1873e6)) = 0.3841

* ra = 1.6433e6 m

rp = 7.3126e5 m

I do need to run these against the previous example, though--likely after I've cooked (or while I'm cooking... =p) dinner.

Link to comment
Share on other sites

e= ((É^2*r^3/GM) - 1)/cos(θ)

So we first have to figure out É(angular velocity) which is easy enough. Its simply the component of your velocity vector that's perpendicular to the normal vector. So some trigonometry (v*cos(θ)) tells me that you have an angular velocity of about 3.376e-3 radians/second. We also can grab GM (Standard gravitational parameter) for Kerbin from the KSP wiki at 3.5316e12. So we got all the numbers we need to figure out the eccentricity. Plug them all in and you get an eccentricity of 0.1086.

You seem to be confusing theta, the true anomaly, with gamma, the flight path angle. You can rearrange the geometric and kinematic orbit equations to cancel out the cos(theta) terms, at which point (at least in my own math) you should have:

e = sqrt(1 - h^2 / (mu * a))

Link to comment
Share on other sites

snip

:o I understand that! thank you very much I'm only a high school student and everything I know about orbital mechanics is self taught from looking at equations and playing with them bit by bit and I could not figure this one out on my own.... thank you!!

Link to comment
Share on other sites

Essentialy you use http://en.wikipedia.org/wiki/Orbit_equation. By knowing your current altitude, speed and direction, you can calculate your current theta', i.e. the angular velocity, and E, i.e. the sum of potential and kinetic energy. Solving the very first equation for r (and using l=mr²theta') gives you r³ = gamma·(1+e cos(theta))·(theta')². You can calculate gamma if you know the mass of what you are orbiting, you can calculate the constant e from E. By pluging all those in you can now calculate your current theta and thus know all those parameter. Your apo- and periapsis are at theta=pi and theta=0, respectively, in that first equation on wikipedia.

Despite a decade of university statistics training, just looking at that makes my brain hurt. This is why I went into medical research instead of astronomy.

Never could get my head around Greek, in languages or mathematics.

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...