Jump to content

Analytically Solving for Gravitational Parameter and Body Diameter


Candre

Recommended Posts

0.17 is going to have unexplored territory ripe for study. One of the things I'm certain we'll be needing ASAP are the gravitational parameters and the semi-major axes (plural right?) of the new bodies. So, is there a way to solve for them analytically? (aka non-heuristic methods?)

I tried a few minutes ago, but I'm burned out from staying up to the wee hours of the morning.

Some things I considered:

• We have the period, apoapsis, periapsis, velocity, and distance. We're looking for the gravitational parameter and the body diameter

• Assume that you're in a circular orbit, so that we can assert that r = SMA in the vis-viva equation

I have a hunch that we don't have enough info.

Link to comment
Share on other sites

Well, to measure a gravity field (and thus the mass of the body generating it) you need a test mass. For the planets that have moons, those will act as your test masses; their orbital data contains the information about parent body mass. For lone planets, we'll have to get there.

Link to comment
Share on other sites

Well, we can first consider that the gravitational acceleration of a body at a distance r is:

a = GM/r^2

where G is the universal gravitation constant, and M is the mass of the body.

Further, the centripital acceleration of a body in a circular orbit is

a = v^2/r

where v is its velocity.

For a stable orbit these two accelerations must be equal, hence

v^2/r = GM/r^2

M = rv^2/G

Therefore, if you know the radius of an orbit and the velocity of the orbit, you can find the mass of the body.

Body radius is a different story. That would have to be measured by direct observation (ie telescope), as any spherical body behaves as a point mass for gravitational purposes.

Edited by Bluejayek
Addition
Link to comment
Share on other sites

One small issue is that KSP currently displays apo- and periapsis as altitudes above the planet's surface, not as distances "r" from the planet's center. However, I believe that the orbital elements of spacecraft are in the persistent.sfs file so you can pull them from there to get the planet's mass, and then compare with the displayed apses values to get the body radius.

Link to comment
Share on other sites

If you're landed on the planet, it's easy to determine the planet's radius; just change your velocity display to Orbit mode, and time warp to find the period of rotation. From there, basic math: v_t = r * ̉ۡ, so (v_t)/̉ۡ=r

Link to comment
Share on other sites

One small issue is that KSP currently displays apo- and periapsis as altitudes above the planet's surface, not as distances "r" from the planet's center. However, I believe that the orbital elements of spacecraft are in the persistent.sfs file so you can pull them from there to get the planet's mass, and then compare with the displayed apses values to get the body radius.

That's cheating!

Instead, take two circular orbits at different heights. Let R1 be the height of the first orbit above the surface, R2 be the second height, and r be the radius of the planet.

Then you solve the two orbits as above and end up with the two equations

M = (r+R1)*v1^2/G

M = (r+R2)*v2^2/G

The M is the same mass of the body in both cases, so we can equate these

(r+R1)*v1^2/G = (r+R2)*v2^2/G

r*v1^2 - r*v2^2 = R2*v2^2 - R1*v1^2

r = (R2*v2^2 - R1*v1^2)/(v1^2-v2^2)

Then, once you have found r you can just substitute into one of the earlier equations to find M, e.g.

M = (r+R2)*v2^2/G

M = [(R2*v2^2-R1*v1^2)/(v1^2-v2^2)+R2]*v2^2/G

Link to comment
Share on other sites

As mentioned before, the r is in fact the sum of the radius of the body (let's call that R) and the height of the orbit. So r = R + h

Take the formula M = rv^2/G. Substitute the r by R + h and the formula will be M = (R + h)v^2/G with M, R and G being constants. h and v are known values.

Determine their values for two different altitudes (of circular orbits). Lets call them h1, v1, h2 and v2. M is a constant so the values from the formula must be the same for both the altitudes. Therefor (R + h1)v1^2/G = (R + h2)v2^2/G which is the same as (R + h1)v1^2 = (R + h2)v2^2 (as G is not zero).

First remove the brachets

Rv1^2 + h1v1^2 = Rv2^2 + h2v2^2

Bring the terms with R to one side and the other values to the other side

Rv1^2 - Rv2^2 = h2v2^2 - h1v1^2

now isolate R

R(v1^2 - v2^2) = h2v2^2 - h1v1^2

R = (h2v2^2 - h1v1^2)/(v1^2 - v2^2)

Fill in the values of h1, h2, v1 and v2 and the result will give you the radius of the object.

Edit: I see someone else did the same math and posted it earlier.

Edited by TheCardinal
Link to comment
Share on other sites

Since you are in a circular orbit and have the orbital period and orbital velocity, you multiply the two to get the circumference of the orbit.

C = T*v

We use the equation for a circle:

C = (d+AP+PE)*pi

so, d = T*v/pi - AP - PE

where:

d = body radius (km)

AP and PE are in km ASL

v = orbital velocity (km/s)

T = orbital period in seconds

That was easy. Now for the gravitational parameter.

GM = v^2*r

where:

GM = gravitational parameter (km^3/s^2)

v = orbital velocity (km/s)

r = orbital radius (km)

That's it.

Edited by Kosmo-not
Link to comment
Share on other sites

It can sometimes be difficult to pinpoint the orbital period exactly. Velocity is much easier as it is right there in the UI, hence I argue that the more mathetmatically complex method I posted is easier and more exact.

Although, being able to do yours with a single ship is good.

Link to comment
Share on other sites

It can sometimes be difficult to pinpoint the orbital period exactly. Velocity is much easier as it is right there in the UI, hence I argue that the more mathetmatically complex method I posted is easier and more exact.

You look at the times to reach AP and PE, take the difference, and multiply by 2.

Besides, the OP said the period was part of the given information.

Edited by Kosmo-not
Link to comment
Share on other sites

You don't have to use circular orbits. You can use two elliptical orbits instead. (Which, because of the way the map screen works in the paid version, means you can do it easily with one spacecraft, and besides, nothing manually flown in KSP winds up in a true circular orbit, anyway.)

Knowing the period and apse altitudes of two different orbits allows you to solve for the radius.

Knowing the radius allows you to solve for the mass.

When I have more time, I'll sit down and rerun through the math for that. As I recall, I think the first part required me to solve a cubic equation, and I wound up going to Wolfram Alpha for that when measuring Kerbol.

Edit: Thinking about it further, a reasonable person would probably use a numerical method such as Newtons's Method or the Secant method to solve for the first part. The closed-form result is a lengthy nightmare.

Edited by maltesh
Link to comment
Share on other sites

Determining Kerbin's radius from a landed position, using the method I described above:

Landed at an altitude of 69m above sea level, I am moving at 174.553 m/s in the orbital frame of reference (vt).

The period of rotation is six hours, or 2.16x104 seconds, meaning that the angular velocity is 2(pi)/21600 rad/sec.

vt = r * omega

therefore

r = vt / omega = 174.553 / ( 2pi / 21600 ) = ( 174.553 * 21600 ) / (2pi) = 600 069.012

so

r = 600 069 m at an altitude ASL of 69 m

rKerbin = 600 km

Link to comment
Share on other sites

Okay, here we go, using two separate Elliptical Orbits.

h1 is the average of the periapsis and apoapsis altitudes on Orbit 1. Semimajor axis of orbit 1 is h1 + r

h2 is the average of the periapsis and apoapsis altitudes on Orbit 2. Semimajor axis of orbit 2 is h2 +r

p1 is the period of orbit 1.

p2 is the period of orbit 2.

Using Kepler's Third Law of planetary motion,

ddg5C.gif

Units don't matter at this point, as long as you use the same units for all distance values, and the same units for all time values. Units will matter later.

And now we solve for r.

That will work. And if you follow the link above, and plug in the appropriate numbers, you'll get an answer. In fact, you'll get three answers, two of which are complex numbers, and one of which is a real number, which will be the radius of your planet.

Let's say you don't want to directly solve for r because all the radicals give you a headache and/or your calculator/spreadsheet deals poorly with imaginary numbers.

Let's use Newton's Method, instead. (Hello, calculus, how have you been?)

Let's define a reasonable guess at the radius of the planet as r0.

We'll define two functions: VdfYk.gif and Z0XEi.gif

And using newton's method...

4d1wm.gif

So if you put in your initial estimate, r0, you'll get r1, which will be a value closer to the actual radius. Put in r1, you get r2 and so on. In a few iterations, you'll have a good, solid value for the radius.

This is probably more work than you wanted to do, admittedly.

At any rate, once you've got the radius, you can find the semimajor axis of one of the orbits. a = h1 + r

And knowing the period (p) of that same orbit...

(It is now extremely important that all length units be in meters, and all time units be in seconds, so do the appropriate conversions if you haven't yet.)

We can find the standard gravitational parameter, μ .

xYq3R.gif

Divide μ by the Newtonian Gravitational Constant , G = 6.67 x 10-11 Nm2/kg2 and you'll have the mass.

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