The magazine of the Melbourne PC User Group

Saturn V — Apollo 11   Part 2 
Earth Orbit and Trans Lunar Injection

Ken Holmes

As we move out into earth/moon space, we must consider the gravity of both bodies, so the code for this Part is rather large, containing the core code, similar to that used in the Lagrange programs, which will apply in all Sectors of the journey. Our program structure may not gain the approval of programmers but we will largely avoid SUBs, which may confuse beginners, by using one main module with the Sectors handled as CASEs in a SELECT CASE structure. This avoids the need to share variables and saves a few lines in the magazine; future Listings will be much shorter (promise!).

In Listing 2, the first lines define the earth/moon radii, gravity constants and distances. The sun's gravity gradient will be ignored but its direction and illumination will be used; as the journey is essentially along the earth's orbit, the effect is small. The moon orbit's eccentricity will disappear and we will use the common centre of gravity as the origin with earth and moon in circular orbits. The view is from the north star, so the earth, moon and sun are apparently rotating anticlock relative to fixed axes, and we will point the -y axis at the sun at the moment of launch. Angles on these axes will be measured anticlock from the x axis, so the sun will be at 270 deg. and will appear to rotate anticlock at 360 deg. per 365.25 days. The moon rotates 360 deg. in a sidereal month of 654.2 hours; there was a new moon (sun and moon lined up) 48 hr 20 mins before launch, so the moon at launch would have moved 24.5 degrees further, and be at 294.5 deg. Launch time was 0932 on 16/7/69 or 1410 GMT, with the sun over 32.5 deg, West longitude; this places Florida (81 deg. West) 48.5 deg. clockwise from 270 deg. and thus at 221.5 deg. On reaching orbit at 0944, Apollo had moved 21.5 deg. to 243 deg. and, with an orbital period of 88.1 mins, it would have moved, at about 85 minutes after launch past 360 deg. to 180 deg. This is the point where we start our plot and Apollo will do almost another orbit to 151 deg. at 165 mins 45 secs before the TLI burn. These figures are simplistic since we are working only in 2D, ignoring the earth's tilt and sphericity, and do not correspond exactly to figures quoted for Apollo 11, but they will suffice.

In northern mid-summer, the north pole is tilted 23 degrees towards the sun and Florida, at 38 deg. north, would daily vary, from 61 deg. at midnight to 15 deg. at midday, above the ecliptic (the earth's orbital plane). At 9.32 am on July 16, it would have been about 20 deg. above and descending. The moon's orbital plane is inclined at 5 deg. to the ecliptic and, if you want to go to the moon, it seems like a good idea to get into the moon's orbital plane at the earliest; since this is a family program, we are going to assume this has been taken care of and will work only in two dimensions to greatly simplify the code. If Apollo 11 launched a little north of east it could be going parallel to the moon's plane as it reached orbit and its orbital plane (which, like the moon's, passes through the earth's centre) would be at a minimal angle to the moon's. At every odd quarter orbit thereafter, Apollo would cross the moon's plane and a lateral thrust could steer it into that plane. Our ship orbited at 180 km height for 2 hr 30 min (7 quarter orbits?), measuring the exact orbit attained and planning the TLI burn, before firing up Stage 3 again to head off to the moon. Suitable direction of the thrust would have provided a component to steer it into the moon's plane. The 3D geometry is rather complicated but is the major consideration in choice of launch windows - times of day, lunar month and year.

Orbit Basics

A circular orbit is attained when the gravitational acceleration (gce / rd^2) exactly provides the centripetal acceleration (vel^2 / rd). Thus, the velocity, cv, must equal the square root of (gce / rd). Considering Specific Potential Energy (per unit mass), if a body moves outwards a distance of drd against gravity, its PE will increase by dPE (= drd x gce / rd^2). If this is integrated from rd to infinity, we get (- gce / rd), which is called the energy deficit. ie. the energy needed to escape to infinity (from the earth in this case). This energy may be supplied as Kinetic Energy due to "escape velocity".

However, we don't want to go to infinity, just the moon, so we want to enter a long elliptical orbit to get beyond the moon and then try to intercept it. If, at rd1, we accelerate to v1 travelling at right angle to the radius, the Total Energy will be (v1^2 / 2 - gce / rd1) and we will be at the perigee. As the body travels outwards, the PE will increase at the expense of the KE (ie. velocity) since TE is conserved. When we reach the apogee, at rd2 and v2, the same TE will be (v2^2 / 2 - gce / rd2). One of Kepler's laws says that equal areas (triangles) are swept out in unit time by the radial line; at apogee and perigee, where velocity is at right angles, this means that v1 x rd1 = v2 x rd2. Solving the two equations tells us that
v1 = square root( 2 x gce x rd2 / rd1(rd1 + rd2)

Note that, if rd2 = rd1 (a circular orbit), you get sqrt(gce / rd1). Check? How beautifully simple is the mathematics of the natural laws!

We are orbitting at 6558 km and, decided by trial and error, we aim for an apogee of 549200 km (moon is 380000 km) and can calculate the required v1. As we fire the Stage 3 rocket horizontally, it will move outward a little during the burn, so we actually calculate the required Total Energy and cut the motor when this is reached. Note this on the plot of Specific Energy where TE is changed from -30 in orbit to -0.68, ie. 98% towards escape energy; note also how the velocity shoots up but then drops off rapidly as it moves out on the long orbit. The T&E process involved running this program in a loop with next month's journey to the moon, varying the notional apogee required and the start time of the burn, until we intercept the moon exactly as we wish, with closest approach on the far side at about 110 km altitude and also in the same total time as Apollo 11. The position of the sun at 270 deg, is evident from the illumination of the earth in Figure 1. I have no knowledge of the attitude control during the TLI burn, so have arbitrarily devised the code to thrust along the local horizontal.


Figure 1.

Tidying Up

SUB Init, Listing 2, draws a schematic of the Stage 3 remnant configuration. Four hours after launch, with Stage 3 still attached, the Command Module and Service Module were detached from the Lunar Excursion Module and swung through 180 degrees to dock the CM and LEM access hatches as shown in Figure 2 here. The code displays this sequentially on Figuse 1 via SUB Tidyup. Then the Stage 3 and the attached Instrument Unit were dumped; the latter had provided all telemetry and control functions to this point. The remaining fuel was used to fire Stage 3 off into space although, after Apollo 12 had placed a seismic recorder on the moon, a later Stage 3 was directed to hit the moon which resonated for an hour or so - a sort of moonquake which revealed some of the internal structure of the moon.

 


Figure 2.

Next Month

We will examine several variations of the path to the moon to select the appropriate one. Note some lines of code already present but commented out here. All will be revealed.

Reprinted from the November 2000 issue of PC Update, the magazine of Melbourne PC User Group, Australia