Skip to content
Back to Essays

P52: The Star Alignment Program Every Apollo Astronaut Had to Master

How astronauts sighted stars through a sextant to align the AGC's inertial platform—the ritual that kept Apollo on course across 240,000 miles

Matt Dennis

Every few hours during an Apollo mission, one of the astronauts stopped what he was doing, floated to the navigation station in the lower equipment bay of the Command Module, pressed his eye against a 28-power sextant, found a star, marked it, found a second star, marked it, and waited for the Apollo Guidance Computer to crunch the numbers. If everything looked right, he keyed VERB 33 ENTER on the DSKY and the computer torqued the gyroscopes. The inertial platform was realigned. The spacecraft knew which way was which again.


This was Program 52—P52—and it was the most frequently executed program in the entire AGC software. Astronauts performed it dozens of times per mission. It was the first thing crews practiced in the simulator and the last skill they were tested on before flight. P52 was where celestial navigation met digital computing, where a human eye looking at a star 400 light-years away provided the reference that kept a 1960s computer pointed in the right direction across a quarter-million miles of empty space.


Why the Platform Drifted

The heart of Apollo’s navigation system was the Inertial Measurement Unit, or IMU—a set of three nested gimbals supporting a gyro-stabilized platform. Three gyroscopes kept the platform fixed in inertial space while the spacecraft rotated around it. Three accelerometers mounted on the platform measured velocity changes along each axis. The AGC read these accelerometers to know where the spacecraft was going and how fast.


The platform was the spacecraft’s sense of direction. Every navigation computation, every guidance maneuver, every attitude reference depended on the platform knowing its orientation relative to the stars. If the platform drifted—if the gyroscopes allowed it to rotate even slightly from its intended orientation—every calculation downstream was contaminated by the error.


And gyroscopes drift. It’s a fundamental property of mechanical gyroscopes. The Apollo IMU used fluid-floated, single-degree-of-freedom integrating gyroscopes manufactured by the MIT Instrumentation Laboratory (later the Charles Stark Draper Laboratory). These were among the finest gyroscopes ever built, with drift rates measured in millidegrees per hour—but millidegrees accumulated. Over the course of a translunar coast lasting three days, uncorrected drift could accumulate to a significant angular error. An error of just 0.1 degrees in platform orientation translated to a position error of several hundred feet at the Moon’s distance.


P52 existed to zero out that accumulated drift by comparing the platform’s idea of where stars should be with where they actually were.


The Optics: Scanning Telescope and Sextant

The Command Module carried two optical instruments for celestial navigation, both mounted in the lower equipment bay and accessible through eyepieces at the navigator’s station. The Command Module Pilot was the designated navigator, though all three crew members trained on the procedure.


The Scanning Telescope was a wide-field instrument with a 60-degree field of view and 1x magnification. Its purpose was star acquisition—finding the target star and getting it roughly centered. The wide field made it possible to identify star patterns even when the platform orientation was uncertain. The scanning telescope could be aimed under AGC control or manually by the astronaut using a hand controller.


The Sextant was a narrow-field, 28-power instrument with a 1.8-degree field of view. It displayed two images superimposed in the eyepiece: one from a fixed line of sight (the “star line”) and one from a movable mirror (the “landmark line”). The astronaut adjusted the movable mirror using a hand controller until the star image was precisely centered on the crosshairs. When the images overlapped perfectly, the instrument’s shaft and trunnion angles defined a precise direction vector from the spacecraft to the star.


The optical system was entirely mechanical and optical—no electronics, no cameras, no image processing. A human eye was the sensor. The astronaut’s hand was the actuator. The only digital element was the angle encoders that reported the shaft and trunnion positions to the AGC. This made the system robust to any electronic failure that didn’t affect the AGC itself.


The Star Catalog: 37 Points of Reference

Woven into the AGC’s rope memory was a catalog of 37 navigation stars, each stored as a unit vector in the Apollo reference coordinate system. The catalog was carefully selected to provide good geometric coverage of the celestial sphere, ensuring that at least two well-separated stars would be visible from almost any spacecraft attitude.


The stars were numbered 01 through 37 and the crews knew them by number as well as name. Star 01 was Alpheratz (Alpha Andromedae). Star 07 was Menkar (Alpha Ceti). Star 30 was Menkent (Theta Centauri). Star 37 was Schedar (Alpha Cassiopeiae). The crew carried star charts, but most astronauts memorized the catalog’s key entries and could identify the brighter navigation stars on sight.


Some stars served specific roles. Sirius (Star 15) and Canopus (Star 16) were the two brightest stars in the catalog and were commonly used as the first acquisition target when the platform orientation was poorly known. Stars near the ecliptic poles provided the best geometric separation from stars near the ecliptic plane, and the AGC’s star selection logic preferred pairs with large angular separation—ideally near 90 degrees—to minimize the mathematical sensitivity of the alignment solution.


The AGC could recommend a star pair using its PICAPAR (Pick-a-Pair) routine, or the astronaut could select stars manually using VERB 01 NOUN 70 to display the star number and VERB 01 NOUN 71 to display the star’s coordinates. Experienced crews often had preferred star pairs they’d practiced with extensively and would override the computer’s suggestion.


The P52 Procedure: Step by Step

The astronaut initiated P52 by keying VERB 37 ENTER 52 ENTER on the DSKY—the standard program-change sequence. The computer responded with a flashing VERB 04 NOUN 06, requesting the alignment option. The most common option was Option 1: “Preferred IMU Orientation”—aligning the platform to a predefined reference orientation appropriate for the current mission phase.


After the astronaut selected the option and the desired REFSMMAT (Reference to Stable Member Matrix—the target orientation for the platform), the AGC computed where two navigation stars should appear relative to the current platform orientation. It then drove the optics to the predicted position of the first star and displayed the star number on the DSKY.


The astronaut looked through the scanning telescope first. If the platform hadn’t drifted much since the last alignment, the target star would be visible in the wide-field scope, close to the center. The astronaut identified the star—confirming it was the right one by checking the surrounding star field—and then switched to the sextant for the fine measurement.


Using the sextant’s hand controller, the astronaut adjusted the optics until the star image was precisely centered on the crosshairs. This required patience and a steady hand. In zero gravity, with the spacecraft occasionally firing RCS thrusters for attitude maintenance, keeping a star centered in a 1.8-degree field of view at 28x magnification was a real skill. Once satisfied, the astronaut pressed the MARK button—a dedicated hardware button near the optics station—which signaled the AGC to record the sextant shaft and trunnion angles along with the precise time of the mark.


The AGC typically requested multiple marks on the same star—usually five—and averaged them to reduce measurement error. The astronaut pressed MARK, waited for the AGC to confirm, fine-adjusted if needed, and pressed MARK again. After the required marks on the first star, the computer slewed the optics to the predicted position of the second star, and the process repeated.


With both stars marked, the AGC computed the angular difference between where the stars actually were (as measured through the sextant) and where they should have been (based on the platform’s current orientation). This difference was the platform’s accumulated drift error. The computer displayed the error to the astronaut as three angles—the “star angle difference” and the torquing angles for each gyro axis.


NOUN 93 and the Torquing Decision

After computing the alignment solution, the AGC displayed the three gyro torquing angles on the DSKY using NOUN 93. These angles—in hundredths of a degree—told the astronaut exactly how far the platform had drifted since the last alignment. The astronaut and Mission Control both evaluated these numbers.


Small torquing angles—a few hundredths of a degree on each axis—indicated the platform was holding well and the drift rates were within normal bounds. This was the expected case during quiet coast phases. Unusually large torquing angles could indicate a gyroscope problem, an optics error, or a bad star sighting.


The star angle difference was the first quality check. The AGC computed the angular separation between the two sighted stars based on the measured data and compared it to the known angular separation from the star catalog. The difference—displayed as the “star angle difference”—should be near zero. A difference greater than a few hundredths of a degree suggested the astronaut had marked the wrong star, the optics were misaligned, or the marks were sloppy. If the star angle difference was unacceptable, the astronaut would reject the solution and redo the sighting.


If everything checked out, the astronaut keyed VERB 33 ENTER—the “proceed” command—and the AGC sent precision current pulses to the IMU gyroscopes, physically torquing the platform to the corrected orientation. The platform was now aligned. The gyro torquing took a few seconds, during which the AGC could not process other navigation data—the platform was in motion and its readings were meaningless until the torquing settled.


This was the VERB 33 that crews waited for, the moment the alignment “took.” After torquing, the AGC updated its internal record of the platform orientation and the time of last alignment. The drift clock reset. P52 was complete until the next time.


REFSMMAT: The Reference Frame That Defined Everything

The platform’s target orientation—the orientation P52 was trying to achieve—was defined by the REFSMMAT, one of the most important and least intuitive concepts in Apollo navigation. REFSMMAT stood for “Reference to Stable Member Matrix,” and it was a 3x3 rotation matrix that defined how the IMU’s stable member (the gyro-stabilized platform) was oriented relative to the basic reference coordinate system.


Different mission phases used different REFSMMATs. A “launch pad REFSMMAT” was computed before liftoff and oriented the platform relative to the launch site at the moment of launch. A “lunar landing REFSMMAT” oriented the platform to be useful during powered descent, with axes aligned to the landing site’s local vertical and the direction of approach. A “PTC REFSMMAT” (Passive Thermal Control) was optimized for the slow barbecue roll the spacecraft performed during coast phases to distribute solar heating.


Changing the REFSMMAT was a ground-computed operation. Mission Control calculated the appropriate matrix for the next mission phase and uplinked it to the AGC. The crew then performed a P52 to realign the physical platform to match the new mathematical reference. This was a “coarse alignment” followed by a “fine alignment”—the coarse alignment slewed the gimbals to approximately the right orientation, and then the star sighting procedure fine-tuned the result to arcsecond precision.


The REFSMMAT concept allowed the same hardware to serve different purposes at different times. During launch, the platform was oriented for ascent guidance. During translunar coast, it was oriented for navigation star sighting. During powered descent, it was oriented for landing. The physical platform didn’t care—it just maintained whatever orientation the gyroscopes were torqued to. The REFSMMAT told the AGC how to interpret the platform’s data in the context of the current mission phase.


When P52 Went Wrong

P52 was routine, but it wasn’t foolproof. Several missions experienced sighting difficulties. Spacecraft waste water dumps created clouds of ice crystals that drifted near the spacecraft and appeared as bright points in the sextant, making star identification difficult. Crews learned to time their P52 alignments to avoid the aftermath of water dumps.


Sunlight reflecting off spacecraft structure or RCS exhaust plumes could wash out the sextant image. The scanning telescope’s wide field was particularly susceptible to stray light. Mission rules required that the spacecraft be in a favorable attitude for star sighting—with the optics pointed away from the Sun, Moon, and Earth, all of which were bright enough to obscure navigation stars.


Apollo 13 presented the most challenging P52 scenario. After the oxygen tank explosion crippled the Service Module, the Command Module was powered down to conserve battery life for reentry. The crew transferred to the Lunar Module as a lifeboat. The LM had its own guidance computer (the LGC, running Luminary software) and its own IMU, but it had a different optical system: the Alignment Optical Telescope, a simple unity-power periscope with no sextant capability.


The AOT was designed for use on the lunar surface, where the astronaut could identify stars through a fixed reticle pattern. Using it in free flight, with debris from the explosion creating a cloud of reflective particles around the spacecraft, was far more difficult. Jim Lovell struggled to distinguish stars from debris particles. The crew eventually used the Sun as an alignment reference—an improvised technique that provided a coarse alignment sufficient to set up the critical engine burns that brought them home.


Celestial Navigation in the Digital Age

P52 was a hybrid act—part ancient, part modern. The astronaut at the sextant was doing what navigators had done for centuries: sighting stars and measuring angles to determine position and orientation. The mathematics was essentially the same spherical trigonometry that Bowditch codified for maritime navigation in 1802. The difference was that the AGC could process the measurements in seconds, compute the alignment solution without tables or slide rules, and torque the platform with a precision no human hand could achieve.


The entire chain of P52—star catalog, optical instruments, human eye, angle encoders, computational algorithm, gyro torquing—was designed so that no single element had to be perfect. The star catalog was computed to seven decimal places. The optics measured to arcseconds. The human eye averaged across multiple marks. The algorithm was geometrically robust. The gyro torquing was precise to millidegrees. Each element contributed its best accuracy, and the system achieved better results than any element could alone.


Every Apollo crew performed P52 alignments in flight. Every alignment began with an astronaut pressing his eye against a sextant, finding a star, and pressing a button. The computer did the math. The gyroscopes did the torquing. But the fundamental measurement—the direction to a star—was made by a human being, using the oldest navigational technique in existence, crossing a quarter of a million miles of space.