Gravity Simulator
General >> Discussion >> to the Moon

Message started by Tony on 07/09/07 at 12:59:52

Title: to the Moon
Post by Tony on 07/09/07 at 12:59:52

In this simulation, a spacecraft departs low Earth orbit on a journey to the Moon.  This is a Type-1 trajectory, but only slightly greater than a pure Hohmann transfer.  It leaves on August 24, 2007, and arrives on August 27, just in time for the space tourists aboard to witness a total eclipse of the Sun (lunar eclipse as seen from Earth).

This only works with the beta version.  It uses Autopilot to perform the necessary burns needed for trans-lunar injetion, and lunar orbit insertion.  Try viewing it in rotating frame mode to see the looping path it takes.

Title: Re: to the Moon
Post by frankuitaalst on 07/09/07 at 22:08:25

Nice piece of work ! Are there any guidelines to choose the point of burns and the duration of them ?

Title: Re: to the Moon
Post by Tony on 07/10/07 at 00:21:28

It's a combination of math and some trial and error.  Try it like this:

  • Start with any simulation that has the Sun, Earth, and Moon.
  • Add an object named Spacecraft (or anything you like) in low Earth orbit using Objects > Create Objects.  I choose a semi-major axis of 6578000 m which is 200 km above Earth's surface, but you can choose anything you like.
  • Choose an arrive date.  In the above simulation, I choose to arrive a few hours before the beginning of a solar eclipse, when a person on the Moon would watch the Earth cover the Sun.
  • Open a "Distance and Velocity" box using menu View > Add Distance and Velocity Box.  Set it for Moon and Earth.
  • Open an "Orbital Elements Box" using menu View > Add Orbital Elements Box.  Set it for Moon and Earth.
  • Run your simulation to the desired arrive date and time, and note the exact Earth, Moon distance, and the Moon's True Longitude (3rd number from the bottom on the Orbital Elements box).
  • Compute your spaceship's departure True Longitude by adding or subtracting 180 degrees from the Moon's True Longitude (whichever gives you a number between 0 and 359).
  • Compute the semi-major axis of the transfer ellipse.  It is ((semi-major axis of your low Earth orbit + Earth, Moon distance on the arrival date and time) / 2)
  • Compute the transfer time using the formula: pi*sqrt(a^3/(G*M)), where a is the semi-major axis of the transfer ellipse, G is the gravitational constant, and M is Earth's mass.  Watch your units.  If you use 6.67x10-11 for G, you must use kilograms and meters in this formula.
  • Compute your approximate departure time by subtracting this amount of time from your arrival date and time.
  • Compute your transfer velocity using Vt=sqrt(G*M*(((2)/(a1))-((1)/(a2)))) where a1 is the semi-major axis of your low Earth orbit, and a2 is the semi-major axis of your transfer ellipse.
  • Compute your low Earth orbit circular velocity using sqrt(GM/a1) where a1 is the semi-major axis of your low Earth orbit.
  • Compute your delta V, which is your (transfer velocity - circular velocity).
  • Start the simulation over again.  
  • Open an Orbital Elements box.  Set it to Spacecraft and Earth.
  • Run the simulation until you are within about 45 minutes of your approximate departure time.
  • Wait until your spaceship reaches its departure True Longitude.  It is now time to thrust.
  • Accelerate in a prograde direction by delta V.  You can do this with the "Thrust Box" menu View > Add Thrust Box, choose Spacecraft and Earth.  Or you can do it with the AutoPilot using "Orient Prograde" and "Thrust".  You must use Thrust twice to give "Initiate" and "Cutoff" times.  You can either give the spacecraft an instantaneous boost by placing your deltaV value in the acceleration box, and making your cutoff time 1 second after your Initiate time, or you can divide it over time.  For example, if your deltaV is 3 km/s, you could accelerate at 30 m/s/s for 100 seconds.  Just begin 50 seconds before your true departure time.

  • Watch your spacecraft leave low-Earth orbit and head for the Moon.  If you did everything perfect, you might actually crash into the Moon.  But since the Moon's orbit is inclined 5 degrees to the ecliptic, the odds are that you will pass under or over the Moon.  This is not bad, since you'll still be close enough to the Moon at closest approach to brake into orbit.  In my simulation, the Moon was close to the ecliptic (as it must be for an eclipse to happen), so I didn't have this problem.  You'd like your closest approach to the Moon to be equal to the semi-major axis of your desired circular orbit, and in the same plane as your desired orbit.  Re-run the simulation, tweaking your departure time, and / or your acceleration value until you pass the Moon in the desired location.

To break into Lunar orbit:
At your closest approach to the Moon, thrust retrograde relative to the Moon until you are in circular orbit.  You can determine the exact speed using sqrt(GM/a), where M is the Moon's mass and a is your desired semi-major axis.  Or you can open an Orbital Elements box using menu View > Add Orbital Elements Box, choosing Spacecraft and Moon, and thrusting until your eccentricity is as close to 0 as you can get it.

It's difficult to get it on your 1st try.  But if you program it into Autopilot, you can save your simulations and tweak the numbers and try again until you get it right.

Gravity Simulator » Powered by YaBB 2.1!
YaBB © 2000-2005. All Rights Reserved.