This document covers the Apollo Guidance Computer's implementation of orbital mechanics calculations and conic section trajectory computations. These subroutines solve fundamental problems involving spacecraft trajectories under central force fields (Earth and Moon gravity), providing the mathematical foundation for navigation, guidance, and mission planning.
For information about the broader orbital integration system that uses these routines, see Attitude and Translation Control. For IMU-related calculations, see IMU Calibration and Alignment.
The conic subroutines provide a comprehensive set of mathematical tools for computing spacecraft trajectories as conic sections (circles, ellipses, parabolas, hyperbolas) around central bodies. The implementation supports both Earth and Moon as central bodies through scaling parameters, enabling trajectory calculations throughout the Apollo mission profile. The subroutines use a general-usage point-of-view rather than optimizing for specific mission phases, allowing multiple usages across different constraints.
Sources: Comanche055/CONIC_SUBROUTINES.agc33-59
The system consists of several primary subroutines that solve different aspects of the two-body orbital mechanics problem. These routines are shared between the Command Module (CM) and Lunar Module (LM) software.
Sources: Comanche055/CONIC_SUBROUTINES.agc33-578
The subroutines implement classical orbital mechanics using the following mathematical framework. Scaling is dependent on the primary body (Earth or Moon), determined by the index register X1.
| Parameter | Description | Scaling |
|---|---|---|
RRECT | Position vector | +29 Earth, +27 Moon (meters) |
VRECT | Velocity vector | +7 Earth, +5 Moon (m/centisec) |
X1 | Body Index | -2 Earth, -10 Moon |
TAU | Transfer time | +28 (centiseconds) |
XKEPNEW | Guess for root X | +17 Earth, +16 Moon (sqrt meters) |
Sources: Comanche055/CONIC_SUBROUTINES.agc96-115 Comanche055/CONIC_SUBROUTINES.agc194-215
The KEPLER routine solves the fundamental orbital propagation problem: given an initial state vector and transfer time, compute the final state vector. It utilizes an iteration technique to find the root of Kepler's equation.
Key features:
TAU for backward extrapolation and TAU values exceeding the orbital period Comanche055/CONIC_SUBROUTINES.agc77-82KEPPREP (often via CSMCONIC or LEMCONIC) to compute an initial guess XKEPNEW Comanche055/CONIC_SUBROUTINES.agc125-128KEPPREP calculates square roots of gravitational parameters MUEARTH or MUMOON and normalizes position/velocity vectors Comanche055/ORBITAL_INTEGRATION.agc42-51Sources: Comanche055/CONIC_SUBROUTINES.agc58-91 Comanche055/CONIC_SUBROUTINES.agc125-128 Comanche055/CONIC_SUBROUTINES.agc690-762 Comanche055/ORBITAL_INTEGRATION.agc42-107
The LAMBERT routine solves boundary value problems: given initial and final position vectors and transfer time, compute the required initial velocity vector.
| Variable | Description | Usage |
|---|---|---|
R1VEC | Initial position vector | Input |
R2VEC | Target position vector | Input |
TDESIRED | Desired transfer time | Input |
GEOMSGN | Transfer angle indicator | Input (+0.5 if <180°, -0.5 if >180°) |
VVEC | Required initial velocity | Output |
Sources: Comanche055/CONIC_SUBROUTINES.agc163-277
Implements the time equation for conic trajectories using polynomial approximations. It calculates the time of flight for a given change in the universal variable $X$.
Sources: Comanche055/CONIC_SUBROUTINES.agc851-928
Provides generalized Newton-Raphson iteration for the Lambert problem and other nonlinear equation solving. It includes logic for step size adjustment and boundary checking.
Sources: Comanche055/CONIC_SUBROUTINES.agc931-1008
The system includes subroutines for converting between Inertial Reference systems and Planetary (Earth-fixed or Moon-fixed) coordinate systems.
Key conversion routines:
R-TO-RP: Converts a vector in the basic reference system to a planetary system (Earth or Moon) using the transformation matrix MMATRIX Luminary099/PLANETARY_INERTIAL_ORIENTATION.agc112-125LSPOS: Computes unit position vectors of the Sun (VSUN) and Moon (VMOON) in the basic reference system using ephemeris data Luminary099/LUNAR_AND_SOLAR_EPHEMERIDES_SUBROUTINES.agc28-49MOONMX: Specifically computes the transformation matrix MMATRIX for the Moon using angles like node longitude (NODI) and inclination (I) Luminary099/PLANETARY_INERTIAL_ORIENTATION.agc138-160Sources: Luminary099/PLANETARY_INERTIAL_ORIENTATION.agc28-136 Luminary099/LUNAR_AND_SOLAR_EPHEMERIDES_SUBROUTINES.agc28-167
Mission programs utilize these subroutines for trajectory prediction and targeting. For example, PROG21 (Ground Tracking Determination) integrates state vectors and converts the results to geographic coordinates for display.
Sources: Comanche055/GROUND_TRACKING_DETERMINATION_PROGRAM.agc32-52 Comanche055/GROUND_TRACKING_DETERMINATION_PROGRAM.agc110-128 Comanche055/GROUND_TRACKING_DETERMINATION_PROGRAM.agc178-188
Critical mathematical constants are defined for both Earth and Moon operations:
| Constant | Value/Definition | Source |
|---|---|---|
MUEARTH | Earth Gravitational Parameter | Comanche055/ORBITAL_INTEGRATION.agc46 |
MUMOON | Moon Gravitational Parameter | Comanche055/ORBITAL_INTEGRATION.agc46 |
CSTODAY | 8640000 (Centisec/Day) | Luminary099/LUNAR_AND_SOLAR_EPHEMERIDES_SUBROUTINES.agc104 |
504LM | Moon Libration Vector | Luminary099/PLANETARY_INERTIAL_ORIENTATION.agc42 |
Sources: Comanche055/ORBITAL_INTEGRATION.agc42-70 Luminary099/LUNAR_AND_SOLAR_EPHEMERIDES_SUBROUTINES.agc98-105 Luminary099/PLANETARY_INERTIAL_ORIENTATION.agc41-43
Refresh this wiki