-

NASA LUNAR MODULE -REFERENCED EQUATIONS OF MOTION

by Brian Woycechowsky

Published by the Center for Technology & Innovation, Inc. Binghamton, New York www.ctandi.org © 2021 Contents Foreword ...... iii

About the Authors ...... iv

A Perspective from Inside NASA: Memories of the 13 Mission ...... v

Preface ...... viii

Introduction ...... 1

Axes Systems Used by the LM’s Equations of Motion (EOM) ...... 4

Translational Equations of Motion ...... 6

Rotational Equations of Motion ...... 8

The M-frame to B-frame Transformation ...... 10

The M-frame to S-frame Transformation Matrix ...... 12

Nomenclature ...... 15 References ...... 18

2021 Supplement ...... 29

LIST OF FIGURES

Figure 1: Lunar Landing Mission Trajectory ...... 1

Figure 2: LM Body Axes – the B-frame...... 2

Figure 3: LEM RCS Thrusters and Body (B-Frame) Geometry ...... 3

Figure 4: Inertial Earth (E-frame) and Moon (M-frame) Geometry ...... 4

Figure 5: Relation between M-Frame and Selenographic S-Frame ...... 5

Figure 6: LM Translational Equations of Motion (EOM) ...... 7

Figure 7: Rotational Equations of Motion...... 9

Page ii FOREWORD

Link’s Apollo team pioneered the first real-time simultaneous simulation of multiple virtual worlds to tr* ain NASA astronauts and Mission Control teams to become proficient in manned spacecraft navigation, operation, and malfunction recovery in order to return crews safely from the previously uncharted territory of earth orbit and the moon.

The work of the Link Apollo team, begun in mid-1963, was intensely integrated with the larger Apollo effort, in terms of both spacecraft design and training flight crews and ground control teams. The Link Apollo team reported to three clients – to NASA , to North American Rockwell Corporation for the Apollo Mission Simulator (AMS), and to Grumman Aircraft Engineering Corporation for the Lunar Module Simulator (LMS).

Custom real-time capability for digital computation of on-board system status, navigation position, communications, and ground control and monitoring instrumentation was developed to permit the concurrent, interactive training of Mission Control, Command Module, and Lunar Module crews. Computation of the dynamic ephemeris, orbital and cis-lunar dynamics, flight regimes of the spacecraft, visual systems, and simulation of on-board computers were particularly challenging. The Link team responded to the dynamic requirements of evolving spacecraft modifications, telemetry, and malfunction options to deliver mission critical products on target, on time.

As an epitome of thinking, designing, fabricating and operating, the Apollo simulators are without parallel – gathering within their steely and angular casings all that was possible (in that largely pre-digital era) to devise systems that would train humans to go to another world. -- Doug Millard, Deputy Keeper, Technologies & Engineering, London Museum of Science

During the course of building simulators for the US manned space exploration program, Link's corporate entity shifted from the original Link Aviation Devices. In 1954, the company was sold to General Precision Systems, Inc., *becoming The Link Group, often abbreviated GP-Link. In 1969, General Precision sold The Link Group to The Singer Company, and the group became Singer's Simulation Products Division, often abbreviated Singer-Link. The successor company in early 2021 is L3 Harris Technologies Link Training and Simulation.

Page iii ABOUT THE AUTHORS

Brian Woycechowsky is a native of Binghamton, NY, who earned a bachelor’s degree in Aeronautical Engineering from Rensselaer Polytechnic Institute (RPI) and a master’s degree from the School of Advanced Technology, Binghamton University. In 1957, Brian started at Link Aviation Devices in the Aerodynamic Section, moving to Systems Engineering and later to Visual Systems. He worked on early passenger jet aircraft simulators, including Boeing’s 707 and Lockheed’s Electra. In the early 1960s, he developed flight dynamics and equations of motion for the full suite of space vehicles: T-20 for Edwards Air Force Base and the Gemini, Apollo, and Space Shuttle programs for NASA. Brian was instrumental in the development of the math models for the Apollo simulator, which trained the astronauts to navigate to/from the Moon and to perform the complex rendezvous maneuvers required. He finished his career at Link in Systems Engineering, responsible for solving general math problems for a range of flight simulators until his retirement in 1990.

Frank Hughes started at NASA in 1966 on the day the crates arrived carrying the Link Apollo simulators and retired 33 years later as Chief of Space Flight Training. He was an instructor during the Apollo program, then trained Space Shuttle crews, and went on to lead training efforts for the International Space Station. Currently, he is president of Tietronix Software, Inc., a team of professionals with expertise in software development, mixed realities, process management, medical services, training and simulations, gaming, and information technology. Mr. Hughes joined the Board of Directors of the Center for Technology and Innovation in March, 2019.

Frank Cardullo began his career in the simulation industry in 1966. He worked as a Systems Engineer on the Apollo simulators for Link, prior to taking a faculty position at the State University of New York (SUNY) at Binghamton in 1980. Now retired, he remains Emeritus Professor of Mechanical Engineering at SUNY Binghamton and is the technical coordinator for all Watson School simulation short courses. Professor Cardullo is very active in simulation research and serves as a consultant for many aerospace companies and U.S. government agencies. He joined the Board of Directors of the Center for Technology and Innovation in March, 2019.

Page iv A PERSPECTIVE FROM INSIDE NASA: MEMORIES OF THE APOLLO 13 MISSION

As a simulator instructor at NASA working at the Kennedy Space Center (KSC) in Florida in April 1970, the first 55 hours of the Apollo 13 mission couldn’t have gone better. The vehicle was flying on course to the Moon; not a problem was being tracked in the Mission Control Center (MCC). We were starting to get serious about training the Apollo 14 crew, the next crew to fly.

On Monday evening, April 13, the crew did a great 27-minute TV tour of the two spacecraft, both the Command/Service Module (CSM) and the Lunar Module (LM). Then, about 10 minutes later, during a routine procedure of stirring up the oxygen in Tanks 1 and 2, Tank 2 exploded. As we learned later, the force of Tank 2 exploding blew out the entire side of the Service Module. It also took out the plumbing of Tank 1, creating a serious gas escape that started changing the flight path of the entire spacecraft. The crew had lost more than half of their oxygen supply.

I had left work after the TV show and did not know about the explosion until I got home, about 30 minutes away. I was called back immediately and so drove back to work and got there about 10 PM. As it turned out, I was to be there until 3 PM on Friday.

We were monitoring the activities in the MCC in Houston and were able to listen to their deliberations. We knew that we had to get ready for a lot of simulations to get the vehicle back home, so we sent a team of people across the street to the Operations & Checkout building where the actual vehicles had been checked out to fly. That team was able to get all the data that the KSC people had gathered on each vehicle subsystem. Rather than the average or typical parameters normally used, the real values of every component of the Apollo 13 CSM and the LM were loaded into the simulators. Now the Command Module Simulator (CMS) and Lunar Module Simulator (LMS) at both the KSC and the Johnson Spaceflight Center were effectively configured just like the actual vehicles. They were ready to simulate and help develop any procedures that would be needed.

The first effort was to assist the MCC people in getting the LM powered-up to be a haven for the crew, as the CSM needed to be powered down to conserve the power needed for re-entry. The LM power-up generally took several hours but quick action by the MCC and in the simulator allowed the crew to get it done in about 45 minutes.

The next task that was attacked in the LMS was to make a controlled burn using the LM computer. This maneuver was to accelerate the vehicle around the Moon and back to the Earth. Apollo 13 was on a trajectory that would have allowed it to orbit the Moon and land on its designated target. Now a new trajectory was needed that would bring the crew directly back to the Earth as quickly as possible. This was a major test of the equations of motion which were the heart of the simulator, calculating where the vehicle would go as it maneuvered.

Page v No one had ever simulated a LM maneuver with the heavy and now dead CSM still attached; normally the LM’s engines and thrusters acted only on the LM itself. We put that maneuver through the LM simulator multiple times, and it showed how to do it and how to make sure that the vehicle stayed safe and did not go out of control. The LMS proved that it was an exceptional tool to prove how the real vehicles would perform.

About Tuesday evening, the combined CSM and LM vehicle went around the Moon and when we saw it again, we were glad to see it heading back to Earth now. But the MCC wanted another burn performed to further increase the speed of the vehicle and get it back sooner. By now the crew had powered down the LM to save battery power, in order to stretch out the resources that they had. That meant that the crew had to perform the burn maneuver manually to achieve the desired speed increase. With no computer, had to control the vehicle pitch and Fred Haise had to manually control the vehicle yaw.

We set up the LMS with these conditions to recreate the exact situation in space. Two astronauts on the ground went through the maneuver and recorded what they learned about how to control it. They performed that maneuver about 10 times in the LMS until they got it to work well. Then the maneuver was typed up and sent to Houston’s MCC to read it up to the crew. Once again, the equations of motion of the simulator predicted just the way the real vehicle did once they performed that burn. It was hard on the crew but they had talked to the astronauts who did it in the simulator and so they had confidence in the maneuver. The close coordination between the two teams allowed them to shift the reentry several hours earlier than it would have been otherwise.

That burn maneuver was needed again later on Wednesday when the desired reentry angle was not correct, and they tried to get to the right angle. The maneuver was practiced again in the simulator to get it smoother and easier, but it was always a difficult thing to do. Now the crew was tired and cold, so the maneuver only achieved part of the desired results when they performed it. However, the LMS worked perfectly and gave the system good results.

On Wednesday and Thursday, the Command Module Simulator was busy in both the Houston and at the Cape working on the procedures to power-up the Command Module (CM). That would allow the crew to transfer back to the vehicle that had the heat shield needed for landing. These procedures were complicated, and the development of the steps was so important that the CSM simulators at both locations were used.

Those procedures were finally ready and were read up to the crew late Thursday evening. The crew practiced the procedures by reading through them several times and asking questions to the MCC. Several times, the simulator people ran through the steps and answered those questions in real time. Then Jack Swigert went into the CM and turned it on; it worked just like it had in the simulator. It was awesome.

Page vi One last step was trying to find out what happened to the Service Module (SM) in the explosion -- how much damage had occurred. The MCC came up with the attitudes that would work to get good photos of the SM when it was jettisoned. Farouk El Baz was the one in the MCC that led the team who computed what angle the combined CM/LM should be at to get good lighting to photograph the damaged SM.

On Friday morning, just hours before the reentry, the crew jettisoned the SM. They obtained photos that showed the damage, which helped redesign Service Modules for the future flights. An hour later, the crew flew on to a perfect reentry and landing.

The Link-built simulators out of Binghamton, NY had proved again and again that those simulators were the unsung heroes of the Apollo 13 rescue mission.

Frank E. Hughes Chief of Space Flight Training, NASA (retired)

Page vii PREFACE

This preface is intended to provide the reader with a broader context for the report which follows. The Equations of Motion (EOM) mathematical model of the Apollo Lunar Module Simulator (LMS) was only one of a multitude of math models comprising the LMS. Each subsystem of the Lunar Module (LM) was mathematically modeled, coded in assembly language, and executed in the LMS computer system. Both Apollo Mission Simulators employed Computer Control Corp. (CCC) machines: the LMS used the CCC Model 224 and the Command Model Simulator (CMS) used the CCC Model 024. These were both 24-bit fixed-point machines. The maximum update rate was 20 Hz. The LMS EOM model received inputs from appropriate subsystem calculations, such as the vehicle Reaction Control System (RCS) and main engines, and calculated the spacecraft state vector that provided inputs to other simulated subsystems. In addition to models of the spacecraft’s physical subsystems, the simulation required a number of mathematical models and other data representing the flight environment of the LM. These included models of the time-referenced physical characteristics of the LM, such as its mass properties and the sloshing of fluids in the fuel tanks, etc., as well as ephemerides of the various celestial bodies. Many of these subsystem math models provided drive signals to instruments on the flight deck of the LMS.

The equations of motion and the force and moment models are also in this category. In any vehicle simulator, the forces and moments acting on and about its center of mass produce linear and angular accelerations. These accelerations may be integrated successively into linear and angular velocities and subsequently to position and orientation in space. These elements of the LM state vector were computed relative to the Earth, the Moon, the celestial sphere and the Command Service Module (CSM). In order for these to be presented accurately to the various radar systems and other sensor systems displays, several reference axes systems were necessary, thereby requiring the spacecraft state to be calculated in each of them by the mathematics of coordinate transformation. These techniques, developed by Euler, Hamilton, and others are discussed extensively in this report.

Additionally, the various elements of the simulator's visual system depended upon the LM state calculated by the EOM. The visual system employed on the LMS had several components which required information from LM state vector relative to the above mentioned objects in space. The LMS visual system had the capability of displaying the actual star field according to the mission date and time-of-day ephemeris. It also calculated and presented images of the lunar surface, the CSM and the Earth, all in correct perspective and location to each window in the spacecraft, the telescope and the various instruments used by the astronauts.

Hence, the EOM and its companion forces and moments mathematical models can be considered the heart and brain of the simulator. It should be noted that all these calculations had to be executed in near real time using 1950s / early 1960s computational technologies. Furthermore, the Apollo mission crew training simulators, both the Lunar Module Simulator and

Page viii its companion Command Module Simulator, performed a critical role in saving the crew of Apollo 13 after the in-flight explosion on the spacecraft, as all who watched the eponymous movie observed.

Frank M. Cardullo Emeritus Professor of Mecanical Engineering Thomas J. Watson College of Engineering and Applied Science Binghamton University, State University of New York

Page ix INTRODUCTION

Figure 1 depicts the trajectory of the Lunar Module (LM) during a lunar landing mission. The trajectory is controlled by guidance system inputs to the descent engine and the attitude control thrusters called the Reaction Control System (RCS). The ascent engine burns used to achieve rendezvous with the Command Module (CM) after lift-off from the lunar surface are also shown. They are the co-elliptic sequence initiate (CSI) burn, the constant delta height (CDH) burn, the terminal phase initiate (TPI) burn, and the mid-course correction burn.

Figure 1: Lunar Landing Mission Trajectory (adapted from Bettwy and Baker, 1967, p.2)

Throughout the mission, the forces and torques which act on the LM create translational and rotational accelerations which, when integrated, define the LM’s trajectory and orientation. The relationship between these forces and torques and the accelerations they cause are the LM’s Equations of Motion (EOM). The accelerations are with respect to a fixed (non-rotating) frame of reference (axes system) centered at the Moon. LM translation and orientation are with respect to this fixed frame of reference called the M-frame. The LM’s M-frame coordinates are those of its center of gravity (CG). The orientation of the LM is described by an axes system which rotates with the LM (called the B-frame), centered at its CG. The B-frame is shown in Figure 2 and in Figure 3; the M-frame is depicted in Figure 4. In order to identify the Moon’s physical features, an

Page 1 axes system which rotates with the Moon, called the selenographic frame of reference (S-frame), is used. Its relationship to the M-frame is shown in Figure 5.

Figure 2: LM Body Axes – the B-frame (adapted from Bettwy and Baker, 1967, p.11)

Page 2

Figure 3: LEM RCS Thrusters and Body (B-Frame) Geometry (adapted from Grumman Aerospace Engineering Corporation (GAEC), 1965, p.1678)

Page 3 AXES SYSTEMS USED BY THE LM’S EQUATIONS OF MOTION (EOM)

The LM’s combined descent and ascent stages are shown in Figure 2. Figure 3 is a detailed representation of the ascent stage. Both figures show the location of the LM’s B-frame. The 푋 axis is directed out of the top of the LM, and the 푍 axis points forward. The 푌 axis completes an orthogonal right-handed triad of axes and points out the right-hand side.

As shown in Figure 4, the M-frame is parallel to a non-rotating axes system centered at the

Earth. The 푋 axis is parallel to the mean equinox of date, the 푍 axis is parallel to the Earth’s mean spin vector, and the 푌 axis lies in a plane parallel to the Earth’s mean equator. This choice was made for consistency with the Earth-centered EOM used during Earth-centered training missions and for convenient access to Earth/Moon ephemeris data.

Figure 4: Inertial Earth (E-frame) and Moon (M-frame) Geometry (adapted from GAEC, 1965, p.1676)

Figure 5 illustrates the relationship between the M-frame and the selenographic S-frame. The

selenographic 푋 axis lies at the intersection of the plane of the Moon’s equator and the plane of the Moon’s prime meridian. It points toward the Earth. The 푍 axis is directed out the lunar pole and the 푌 axis completes an orthogonal right-handed triad.

Page 4

As shown in Figure 5, the S-frame is displaced from the M-frame by five successive rotations:

1.) a rotation through the angle (휖) that the ecliptic plane makes with the plane of the Earth’s mean equator; 2.) a rotation through the angle (Ω) that the mean ascending node of the lunar orbit makes with the mean equinox of date measured in the ecliptic plane; 3.) a rotation through the angle (Ι) that the plane of the lunar equator makes with the ecliptic plane; 4.) a rotation in the plane of the lunar equator through the angle ☾ −Ω between the mean

ascending node of the lunar orbit and the −푋 axis, where ☾ is the mean lunar longitude; 5.) a final rotation through 180° (휋), in order that 푋 points toward the Earth.

Figure 5: Relation between M-Frame and Selenographic S-Frame (adapted from GAEC, 1965, p.1681)

Page 5 TRANSLATIONAL EQUATIONS OF MOTION

The flow of the LM’s translational equations of motion is shown in Figure 6. The LM’s

M-frame coordinates (푥 , 푦 , 푧) result from successive integrations of the LM’s acceleration with respect to the M-frame. Because the M-frame does not rotate, the acceleration is equal to the

sum of the forces acting on the LM divided by the LM’s mass (푚 ). The forces that act on the LM are the universal gravitational force, perturbations to the universal gravitational force due to the tri-axial shape of the Moon, and the B-frame-referenced forces. The acceleration due to the universal gravitational force (−휇⁄푟 ) is projected onto the M-frame using the direction cosines 푥⁄푟 , 푦⁄푟 , 푧⁄푟 , where 휇 is the product of the universal gravitational constant and the mass of the Moon, and 푟 is the LM’s distance from the center of the Moon. The acceleration due to the Moon’s tri-axial gravitational perturbation is first evaluated as S-frame components and the components are then transformed into M-frame components. B-frame-referenced forces are main engine and RCS thrust, stage separation forces, and the force due to fuel and oxidizer slosh. The B-frame components of these forces are summed and their sum is then transformed into M- frame components. The S-frame tri-axial gravitational acceleration perturbation components and the LM’s position with respect to the lunar surface depend on the LM’s S-frame coordinates

(푥 , 푦 , 푧) , which are obtained by transforming 푥 , 푦 , 푧 onto the S-frame. The elements of the B-frame to M-frame transformation matrix are functions of four parameters (a quaternion) which are evaluated by the rotational equations of motion. The M-frame to S-frame transformation matrix and its transpose depend on the orientation of the Moon with respect to the M-frame, which is specified by the ephemeris for the Earth/Moon system.

Page 6

푚 푚 푚 퐹 퐹 퐹 푧̇ , 푧̈ , 푧 푥 푦 + + + 푦̇ 푦 푥̇ 푥 푧̇ 푧 푧̇ 푧 푦̇ , 푦̈ , , , + + + + + + 푎 푎 푎 푃 + 푃 + 푃 + 푥̇ 푥̈ 푚 푑푡 푑푡 푑푡 푑푡 푑푡 푑푡 푧 푥 푦 푦̇ 푦 푎 푎 푎 푧̈ 푧̇ 푥̈ 푦̈ 푥̇ 푦̇ 푟 푟 , , 푟 ∫ ∫ ∫ ∫ ∫ ∫ 푎 푎 푎 Acceleration −휇 −휇 −휇 Translational ======M-frame Velocity M-frame = = = (W&B) Math Model Math (W&B) (EOM) Initialization (EOM) Equations of Motionof Equations Coordinates S-frame 푥̇ 푥 M-frame Coordinates M-frame From Weight & Balance & Weight From M-frame Translational M-frame 푧̇ 푧 푥̇ 푥 푦̇ 푦 푧 푥 푦 푧̈ 푥̈ 푦̈ , , , , 푎 푧 푟 푥 푦 푃 , 퐹 , 푧 푥 푦 푃 , 퐹 , 푃 퐹 , ,

푧 푧 , 푥 푦 푦 (EOM)

푃 퐹 푃 퐹 푃 퐹 푧 + 1 − 1 − from Ephemeris Math Model Math Ephemeris from 푎 푎 푎 푔 푔 푔 푟 푔 푦 + 5 푎 푎 푎 5 푔 푔 푔 Force 푥 푎 푎 푎

푔 푔 푔 Parameter Perturbation Perturbation Gravitational 퐴 = = = = Center of the the Moon Center of 퐹 + 퐵 + M-frame GravitationalM-frame LM’s Distance from the from Distance LM’s 푟 푃 푃 푃 퐹 퐹 퐹 M-frame Non-GravitationalM-frame from Rotational Equations of Motion of Equations Rotational from ,퐵 퐴, 푎 푃 , 푃 , 퐹 , 푃 푧 퐹 , Math Model Math , , , from Ephemeris from : LM Translational Equations of Motion 퐹 6 푦 , 푇 푇 푇 푟 퐹 ) 푥 ) 푇 , 퐹 + Figure Figure 푇 + 푇 + 푇 + 푇 + 푇 , o 휃 cos i 휃 sin 푇 + o 휃 cos 2퐵 − i 휃 sin 2퐴 − 푇 + (푇 − (푇 − 푇 + 푇 퐹 푇 + 퐹 퐹 i 휓 sin o 휓 cos o 휓 cos i 휓 sin o 휓 cos Force 휓 cos 푇 + 푇 + 푇 + 푇 + 퐹 + 푇 + 푇 + 푇 + 푇 , 푇 푟 푟 푟 3퐶푥 3퐶푦 3퐶푧 푇 = 푇 = 푇 = 푇 = 푇 = 푇 = 푇 = 푇 = − 푇 = Perturbation Engine Thrust Engine Thrust Engine B-frame RCS Thrust RCS B-frame B-frame Ascent B-frame 푇 = 푇 = 푇 + 푇 = B-frame Descent B-frame 푇 , = = = 푇 푇 푇 푇 푇 푇 S-frame Gravitational S-frame B-frame Non-GravitationalB-frame 푇 푇 푇 퐹 퐹 퐹 푃 푃 푃 푇 휃 , 휃 , 퐹 푇 푇 퐹 푇 , … , 휓 ,퐵 퐶 퐵, 퐴, 휓 푇 from Stage from Separation RCS Thrust RCS (constants) Math Model Math Model Math Model Math Model Math from Fuel and Fuel from Oxidizer Slosh Oxidizer from Propulsion from Propulsion from Control Math Model Math Control Model Math Control from Stabilization & & Stabilization from & Stabilization from from RCS Math Model Math RCS from

Page 7 ROTATIONAL EQUATIONS OF MOTION

The rotational equations of motion, shown in Figure 7, determine the LM’s rotational velocity

B-frame components (푃 , 푄 , 푅) , which, in turn, determine the quaternion rates (푒̇ , 푒̇ , 푒̇ , 푒̇) , by integrating the LM’s rotational acceleration. The rotational acceleration component equations are more complex than those for the translational acceleration because the LM rotates and the LM’s mass distribution must be considered. This results in expressions that involve not only the applied torques but also (푃 , 푄 , 푅) , 푃̇ , 푄̇ , 푅̇ , and the moments and products of inertia. The integration of the quaternion rates must be rectified in order to insure that the quaternion identity: 푒 + 푒 + 푒 + 푒 = 1 is satisfied, a requirement of the M-frame to B-frame transformation matrix. Quaternion initialization is specified in terms of three angles (Euler angles) because of the non-intuitive nature of quaternions. The motivation behind the LM’s rotational acceleration is the applied torques (main engine thrust, RCS thrust, fuel slosh, and staging), all of which must be referenced to the LM’s center of gravity. However, for the purpose of computational efficiency, the RCS torques are first referenced to a fixed point and then transferred to the center of gravity.

Page 8 , 푅 ÷ 퐼 ÷ 퐼 ÷ 퐼 , 푄 푅 4 푅 푅 푅 ̇ 푃 3 ̇ , 푒 + 푁 + 푀 + 푒 − 푒 − 푒 + 푒 , 푅 + 퐿 2 ̇ , 푒 푅 푃 푄 푄 푄 푄 푄 푃 , 푄 푄 푃 푅 푅 푄 ̇ , 푒 1 푄 푒 푃 푃 푑푡 + 푄 푅 푑푡 + 푅 푑푡 + 푒 푑푡 + 푒 푑푡 + 푒 푑푡 + 푃 푑푡 + 푒 ̇ ̇ ̇ − 푅 − 푅 + 푃 + 푒 + 푒 − 푒 − 푒 − 푄 − 푃 + 푅 − 푃 − 푄 + 푄 ̇ ̇ ̇ ̇ − 퐼 푃 푃 ̇ 푃 푃 ̇ 푅 푄 푄 − 퐼 − 퐼 푃 푃 푄 푃 푅 푅 푒 푒 푒 푒 퐼 = ∫ 푒̇ = ∫ 푒̇ = ∫ 푒̇ = ∫ 푒̇ = ∫ 푃 = ∫ 푄 = ∫ 푅 퐼 퐼 − − 푒 푒 푒 푒 푃 푅 푄 = + 퐼 + 퐼 + 퐼 B-frame Rotational before rectification ̇ = + 퐼 + 퐼 + 퐼 = + 퐼 + 퐼 + 퐼 Time Rates of Change ̇ = = = = Quaternion Quaternion Component , 푅 ̇ 푃 ̇ Quaternions Components Acceleration Acceleration Components ̇ 푅 푄 푒̇ 푒̇ 푒̇ 푒̇ B-frame Velocity Components , 푄 ̇ 푃 , 푒 , 푅 , 푒 퐼 , 푁 , , , , , 푄 , 푒 푒 퐼 푒 푒 푒 , 푀 , 푃 퐿 푒 퐼

− 1 and

1 + 퐸 푒

퐼 , ÷ , 휃 퐼 + , + 푀 , 휃 , 휃 , 휃 , 휃 , 푁 퐼 퐹 퐹 , 휓 = 푒 = 푒 , 푀 푒 , 휓 , 휓 , 휓 , 휓 훼 + 푀 퐿 퐸 퐹 + 푁 푀 + 퐿 + , 휙 휙 휙 휙 휙 = 훽 = − + 푀 , 푅 푒 + 푁 + 퐿 퐿 MathModel 푀 푇퐻퐸푁 푒 푇퐻퐸푁 푒 from Weight & Balance Math Model Initialization = 푓 = 푓 = 푓 = 푓 Slosh Torques + , 푄 Torque Summation 푒 푒 = 퐿 = 푀 = 푁 푒 푒 푃 푒 Quaternion Quaternion Rectification 퐿 Quaternion Quaternion Identity Error 푁 from from Fuel and Oxidizer Slosh 푀 퐸≥ 휀 퐸< 휀 from from Stage Separation Math Model 퐼퐹 퐼퐹 퐸 = : Rotational Equations of Motion of Equations Rotational : 7 , , , , , , , 푁 퐿 푒 푀 푒 푒 푒 푁 퐿 푀 Figure × 5.5 × 5.0 × 5.5 ] ] 푇 푇 , 푁 ] 푇 + 푒 − 푒 − 푒 푇

α 푇 푇 푇 푇 푇 푒 푒 푒 푒 푒 푒 − − 훽 , 푀 − 훾 + 푇 + 푇 + 푇 + 푇 + 푇 + 푇 − 훽 − 훽 − 푒 + 푒 − 푒 − 훾 − 훾 − 훼 − 훼 − 푒 − 푒 + 푒 − 푒 + 푒 + 푒 퐿 푇 푇 푇 푒 푒 푒 푒 푒 푒 + 푇 + 푇 + 푇 + 푇 + 푇 + 푇

γ 푇 푇 푇 푇 − 푒 − 푒 + 푒 푇 β α 푇 푒 푒 푒 푒 푒 푒 + + + Elements + 푇 + 푇 +훽 +훾 +훼 + 푇 + 푇 + 푇 + 푇 = 훽 = 훾 = 훼 = 푒 = 2 = 2 = 2 = 푒 = 2 = 2 = 2 = 푒 푇 푇 푇 푇 푇 푇 [ M-frame M-frame to B-frame [ = 퐿 = 푀 = 푁 [ Main Main Engine Torques 퐿 푁 푀 a a fixed reference point 푔 푔 푔 푔 푔 푔 푔 푔 푔 Transformation Transformation Matrix to the of Center Gravity = − = − = − RCS Torques with respect 퐿 푁 푀 RCS Torques with respect to 푁 푀 퐿 , 푇

, , 훾 , 훾 , 푔 , … , 푇 , 훽 푇

, … , 푇 , , 훽 훼 , 푇 from from RCS 푇 Math Model 훼 푇 to to Translational from from Weight and from Weight and from from Translational from Translational Equations of Motion Equations of Motion Equations of Motion Balance Math Model Balance Math Model

Page 9 THE M-FRAME TO B-FRAME TRANSFORMATION

The M-frame to B-frame transformation in terms of a quaternion is given by the similarity transformation:

푧′ 푥 − 푖푦′ 푧 푥 − 푖푦 = 퐻 퐻 푥 + 푖푦′ −푧′ 푥 + 푖푦 −푧 where (푥, 푦, 푧) are the components of a vector in a reference axes system, (푥, 푦, 푧) are components of the same vector in an axis system which is rotated with respect to the reference axes, 푖 = √−1 , H is the rotation matrix:

푒 + 푖푒 푒 + 푖푒 퐻 = , −푒 + 푖푒 푒 − 푖푒 and the inverse of H is:

푒 − 푖푒 −푒 − 푖푒 퐻 = . 푒 − 푖푒 푒 + 푖푒

Upon substitution:

푧′ 푥 − 푖푦′ 푒 + 푖푒 푒 + 푖푒 푧 푥 − 푖푦 푒 − 푖푒 −푒 − 푖푒 = 푥 + 푖푦′ −푧′ −푒 + 푖푒 푒 − 푖푒 푥 + 푖푦 −푧 푒 − 푖푒 푒 + 푖푒

Upon completion of the matrix product on the right-hand side and equating similar terms, the following relationships result:

푥 = (푒 − 푒 − 푒 + 푒 )푥 +2(푒푒 + 푒푒)푦 +2(푒푒 − 푒푒)푧 푦 =2(푒푒 − 푒푒)푥 + (푒 − 푒 + 푒 − 푒 )푦 +2(푒푒 + 푒푒)푧 푧 =2(푒푒 + 푒푒)푥 +2(푒푒 − 푒푒)푦 + (푒 + 푒 − 푒 − 푒 )푧

When (푥, 푦, 푧) are M-frame vector components and (푥, 푦, 푧) are B-frame components of the same vector, this is the M-frame to B-frame transformation. The matrix representation of this transformation is:

푥 푒 − 푒 − 푒 + 푒 2(푒푒 + 푒푒) 2(푒푒 − 푒푒) 푥 푦 = 2(푒푒 − 푒푒) 푒 − 푒 + 푒 − 푒 2(푒푒 + 푒푒) 푦 푧 푧 2(푒푒 + 푒푒) 2(푒푒 − 푒푒) 푒 + 푒 − 푒 − 푒

Page 10

This transformation is symbolically represented by:

푥 푔 푔 푔 푥 푦 = 푔 푔 푔푦 푧 푔 푔 푔 푧 and by equating like matrix elements, the equations for 푔 are:

푔 = 푒 − 푒 − 푒 + 푒 푔 =2(푒푒 + 푒푒) 푔 =2(푒푒 − 푒푒) 푔 =2(푒푒 − 푒푒) 푔 = 푒 − 푒 + 푒 − 푒 푔 =2(푒푒 + 푒푒) 푔 =2(푒푒 + 푒푒) 푔 =2(푒푒 − 푒푒) 푔 = 푒 + 푒 − 푒 − 푒

Since H is a rotation matrix, its determinant must equal unity, i.e.,

푒 + 푒 + 푒 + 푒 =1

This relationship is the quaternion identity, which must be satisfied in order that transformations between the M-frame and B-frame are valid. This is accomplished by rectifying the quaternion

(푒, 푒, 푒, 푒) .

Because of the non-intuitive nature of the quaternion (푒, 푒, 푒, 푒) , 푒, 푒, 푒,and 푒 are initialized using the angles: pilot pitch (휃), pilot yaw (휓), and pilot roll (휙). The equations that describe this relationship are:

휙 휓 휃 휙 휓 휃 푒 = cos cos cos − sin sin sin 2 2 2 2 2 2

휙 휓 휃 휙 휓 휃 푒 = cos sin cos − sin cos sin 2 2 2 2 2 2

휙 휓 휃 휙 휓 휃 푒 = cos cos sin + sin sin cos 2 2 2 2 2 2

휙 휓 휃 휙 휓 휃 푒 = cos sin sin + sin cos cos 2 2 2 2 2 2

Page 11 THE M-FRAME TO S-FRAME TRANSFORMATION MATRIX

The M-frame to S-frame transformation matrix 푎 is the product of the four rotation matrices that correspond to the angular displacements shown in Figure 5 and a matrix 퐿 that takes the lunar libration (wobble) into account. Thus,

푎 = 퐿푅 푅푅푅 ☾ where:

푅 is the rotation thru the obliquity (휖), the angular displacement of the ecliptic from the Earth’s equatorial plane.

푅 is the rotation (Ω) in the plane of the ecliptic between the mean ascending node of the lunar orbit and the mean equinox of date.

푅 is the rotation thru the angle that the plane of the lunar equator would make with the plane of the ecliptic if the Moon did not librate.

푅 is the rotation in the plane of the lunar equator which, neglecting the lunar ☾ libration, establishes the S-frame. ☾ is the mean longitude of the moon measured with respect to the mean equinox of date in the ecliptic plane. The additional

rotation thru 휋 is required, because otherwise 푋 would face away from the Earth.

The matrices that represent these rotations are shown below, and the correspondence between

푎 and the product that defines 푎 is shown following the rotations.

푍 1 0 0 푍′() 푅 = 0 cos 휖 sin 휖 0 − sin 휖 cos 휖

푌′() 휖 푋 faces the viewer; 푍′() is perpendicular to the plane of the ecliptic. 휖 푌

Page 12 푌′()

Ω cos Ω sin Ω 0 푌′() 푅 = − sin Ω cos Ω 0 0 0 1

Ω This rotation is about 푍′() = 푍′(), which faces the viewer.

푋′() 푋 = 푋′()

푍′() = 푍′() 푍′ () 1 0 0 푅 = 0 cos Ι − sin Ι 0 sin Ι cos Ι Ι

This rotation is about −푋(), which is 푌′() Ι into the page.

푌′()

−푋′() 푋′

푌′() − cos ☾ − Ω − sin ☾ − Ω 0 푅 = ☾ sin ☾ − Ω − cos ☾ − Ω 0 0 0 1 ☾ − Ω 푌′()

This rotation is about 푍′() = 푍′() = 푍′ , which faces the viewer. ☾ − Ω 푌′

푋′() 푋′() = −푋′

Page 13 Upon substitution, the M-frame to S-frame transformation matrix is:

푎 푎 푎 푎 푎 푎 = 푎 푎 푎

퐿 퐿 퐿 −cos(☾ −Ω) −sin(☾ −Ω) 0 10 0 cosΩ sinΩ 0 1 0 0 퐿 퐿 퐿 sin(☾ −Ω) −cos(☾ −Ω) 00 cosI −sinI−sinΩ cosΩ 00 cosϵ sinϵ 퐿 퐿 퐿 0 01 0 sinI cosI 0 01 0 −sinϵ cosϵ

Page 14 NOMENCLATURE

푎 (푖, 푗 = 1,2,3) Elements of the M-frame to S-frame transformation matrix.

A, B, C Constants used in the evaluation of the Moon’s tri-axial gravitational perturbation S-frame components. 퐴 = 621.1358 × 10 퐵 = 207.0881 × 10 퐶 = 1.1263979 × 10

푒 (푖 = 1,2,3,4) A quaternion of real numbers which must satisfy the identity: 푒 + 푒 + 푒 + 푒 = 1 .

퐸 The quaternion identity error. 퐸 = (푒 + 푒 + 푒 + 푒 ) − 1 . It is used in the rectification of the quaternion (푒, 푒, 푒, 푒) .

퐹 A term used in the evaluation of the S-frame lunar tri-axial perturbation components.

퐹 The fuel slosh force.

퐹 The stage separation force.

퐹, 퐹, 퐹 The B-frame components of the total non-gravitational force which acts on the LM.

퐹, 퐹, 퐹 The M-frame components of the total non-gravitational force which acts on the LM.

푔 (푖, 푗 = 1,2,3) Elements of the M-frame to B-frame transformation matrix.

Ι Hayn’s constant = 1.535°, the angle the Moon’s equatorial plane makes with the ecliptic plane.

퐼, 퐼, 퐼 LM moments of inertia.

퐼, 퐼, 퐼 LM products of inertia.

퐿 (푖, 푗 = 1,2,3) Elements of the lunar libration correction matrix.

퐿, 푀, 푁 B-frame components of the total torque which acts on the LM.

Page 15 퐿, 푀, 푁 B-frame components of the main engine torque which acts on the LM.

퐿, 푀, 푁 B-frame components of the RCS torque which acts on the LM.

퐿, 푀, 푁 B-frame components of the RCS torque about a fixed reference point.

퐿, 푀 Fuel slosh B-frame 푋 and 푌 torque components.

푚 The LM’s mass.

푀, 푁 Stage separation B-frame Y and 푍 torque components.

푃, 푄, 푅 B-frame components of the B-frame rotational velocity of the LM with respect to the M-frame.

푃, 푃, 푃 M-frame components of the lunar tri-axial gravitational perturbation force divided by the LM’s mass.

푃, 푃, 푃 S-frame components of the lunar tri-axial gravitational perturbation force divided by the LM’s mass.

푟 The LM’s distance from the center of the Moon.

푡 Time.

푇 (푖 = 1, … ,16) The thrust of a RCS thruster.

푇 The ascent engine thrust.

푇 The descent engine thrust.

푇, 푇, 푇 The B-frame components of the thrust of the ascent engine.

푇, 푇, 푇 The B-frame components of the thrust of the descent engine.

푇, 푇, 푇 The B-frame components of the total thrust of the RCS thrusters.

푥, 푦, 푧 The LM M-frame coordinates.

푥, 푦, 푧 The LM S-frame coordinates.

☾ The mean longitude of the Moon measured in the ecliptic plane with respect to the mean equinox of date.

Page 16

훼, 훽, 훾 The LM’s body axes coordinates of the point of application of the ascent engine’s thrust.

훼, 훽, 훾 The LM’s body axes coordinates of the point of application of the descent engine’s thrust.

훼, 훽, 훾 The B-frame coordinates of the point of application of the main engine thrust.

훼, 훽, 훾 The B-frame coordinates of the fixed reference point with respect to which RCS B-frame moment components are referenced.

훼, 훽 The B-frame coordinates of the point of application of the fuel slosh force.

휖 The angle the ecliptic plane makes with the Earth’s equator.

휀 The threshold that determines whether the quaternion (푒, 푒, 푒, 푒) needs to be rectified.

휃, 휓 Misalignment angles of the ascent engine’s thrust.

휃, 휓 Stabilization and Control Math Model inputs of the angles the descent engine’s thrust makes with the LM’s body axes.

휃 LM pilot pitch with respect to the M-frame. It is a rotation about the 푌 axis.

휇 The product of the universal gravitational constant and the Moon’s mass. 휇 = 1.73139972 × 10

휙 LM pilot roll with respect to the M-frame. It is a rotation about the 푍 axis.

휓 LM pilot yaw with respect to the M-frame. It is a rotation about the 푋 axis.

Ω The angle the mean ascending node of the lunar orbit makes with the mean equinox of date. It is measured in the ecliptic plane.

Page 17 REFERENCES

Bettwy, T.S. and Baker, K.L. (1967). LM/AGS Flight Equations Narrative Description. [pdf] TRW Report No. 05952-6076-T000, dated 25 January 1967. Redondo Beach, CA: TRW Systems Group. Available at: http://www.ctandi.org/s/1967-01-25-LM-AGS-Flight-Equations.pdf [Accessed 6 March 2020].

Goldstein, H. (1959). Classical Mechanics. Sixth Printing – June 1959. Reading, MA: Addison-Wesley Publishing Company, Inc.

Grumman Aircraft Engineering Corporation (1965). LEM Mission Simulator (LMS) Math Model: True Motion Equations. [pdf, part 1 of 3] Report No. LED-440-3, dated 8/1965. Bethpage, NY: Grumman Aircraft Engineering Corporation. Available at: http://www.ctandi.org/s/1965-08-LEM-Mission-Simulator-Math-Model-1-130-1-65.pdf [Accessed 6 March 2020].

National Aeronautics and Space Administration (1965). Project Apollo Coordinate System Standards. Document Number SE-008-001-1, dated June 1965. Washington, DC: NASA.

Robinson, A.C. (1958). On the Use of Quaternions in Simulation of Rigid-Body Motion. Wright Air Development Center (WADC) Technical Report No. 58-17, dated December 1958. Wright- Patterson Air Force Base, OH: United States Air Force.

Page 18 TO THE LUNAR MODULE MOON- REFERENCED EQUATIONS OF MOTION REPORT

by Brian Woycechowsky

Published by the Center for Technology & Innovation, Inc. Binghamton, New York © 2021 TABLE OF CONTENTS

Introduction ...... S-1 LM Equations of Motion ...... S-2 LM Translational and Rotational Accelerations ...... S-2 The Forces and Moments that Act on the LM ...... S-2 The Gravitational Force ...... S-2 Non-Gravitational Forces and Moments ...... S-4 The Main Engine Thrust and Moment Components ...... S-4 The Thrust and Moment of the Reaction Control System ...... S-7 Fuel and Oxidizer Slosh Force and Moment Component ...... S-12 Stage Separation Force and Moment ...... S-12 The M-frame to B-frame Transformation ...... S-13 The Elements of the Transformation Matrix ...... S-13 The Transformation Using LM Euler Angles ...... S-13 The Transformation Using a Quaternion ...... S-15 The Satisfaction of the Direction Cosine Identities ...... S-17 The Determinant of the Transformation Matrix ...... S-18 The Choice of the Quaternion Transformation ...... S-18 The Evaluation of the M-frame to B-frame Transformation Matrix Elements ...... S-20 The Evaluation Using LM Euler Angle Rates ...... S-20 The Evaluation Using the Matrix Element Rates ...... S-24 The Evaluation Using the Quaternion Rates...... S-26 The Euler Parameters ...... S-28 The Relationship of the Quaternion to the LM Euler Angles ...... S-29 The Evaluation of the LM Euler Angles ...... S-35 The M-frame to S-frame Transformation ...... S-37 Background Information ...... S-37 The GAEC Derivation ...... S-38 A More Detailed Derivation ...... S-41 Vector Algebra and Direction Cosines ...... S-46 Vector Components ...... S-46 Vector Algebra...... S-47 The Transformation of Vector Components ...... S-48 Unit Vector Relationships ...... S-50

Page iii The Direction Cosine Identities ...... S-50 The M-frame to B-frame Transformation Using the Coefficients of a Quaternion Number .....S-54 Quaternion Number Algebra ...... S-54 The Transformation ...... S-55 References ...... S-56

LIST OF FIGURES

Figure S-1: Descent Engine Thrust Geometry ...... S-5

Figure S-2: LEM RCS Thrusters and Body (B-Frame) Geometry ...... S-8

Figure S-3: Time Measured from Ascent Engine Ignition ...... S-12

Figure S-4: Graphical Representation of the Sine and Cosine of an Angle ...... S-36

Figure S-5: The GAEC Derivation, part 1 of 2 ...... S-38

Figure S-6: Relation between M-Frame and Selenographic Frame (S-frame) ...... S-39

Figure S-7: The GAEC Derivation, part 2 of 2 ...... S-40

Figure S-8: Inertial Earth (E-frame) and Moon (M-frame) Geometry ...... S-41

Figure S-9: Projection of the Moon's Orbit onto the Ecliptic Plane ...... S-41

Figure S-10: Definition of the Vector 푉 ...... S-47

Figure S-11: X2, Y2, Z2 rotated with respect to X1, Y1, Z1 ...... S-48

Page iv INTRODUCTION

The Lunar Module (LM) Equations of Motion (EOM) are the application of Newton’s laws of motion. The M-frame components of the LM’s translational acceleration are equal to the M-frame components of the forces acting on the LM divided by the LM’s mass. The B-frame (body axes) components of the LM’s rotational acceleration are equal to more involved relationships, which must take into account the LM’s rotational motion, its moments and products of inertia, and the moments (torques) acting on the LM. The Moon’s gravitational force that acts on the LM is the sum of the main attractive force (휇푚 ÷ 푟) and the perturbations to it due to the tri-axial geometry of the Moon. The non-gravitational forces that act on the LM are the Reaction Control System (RCS) thrust, the descent and ascent engine thrusts, the fuel and oxidizer slosh force, and the stage separation force. The moments that act on the LM are due to the non-gravitational forces. The translational velocity components of the LM and its M-frame coordinates are obtained by successive integrations of its translational acceleration components. The rotational velocity of the LM is found by integrating its rotational acceleration. The orientation of the LM is determined from the integration of the time rate of change of a quaternion of real numbers (푒, 푒, 푒, 푒) that satisfy the identity: 푒 + 푒 + 푒 + 푒 = 1 , and then using 푒, 푒, 푒, and 푒 to define the elements of the M-frame to B-frame transformation matrix. The position of the LM with respect to the physical features of the Moon and the Moon’s gravitational perturbations depend on its selenographic (S-frame) location, which is found by transforming the LM’s M-frame coordinates. This transformation is the product of successive rotations through the Moon’s orbital elements plus a correction for the Moon’s libration (wobble).

The choice of the M-frame to B-frame transformation using 푒, 푒, 푒, and 푒 is discussed by comparison with the transformation using either the integrals of the time rates of change of the transformation matrix elements themselves or the integration of the time rates of change of the LM’s Euler angles to obtain the transformation matrix elements. The Euler angles cannot be used because they do not provide an all-attitude representation of the LM. Although there is little difference in computational efficiency between the remaining two options, the quaternion option was judged to be slightly more efficient.

Although the LM EOM do not require the evaluation of the LM Euler angles, they are required in order to drive the LM simulator’s visual displays. They are found from the M-frame to B-frame transformation matrix elements.

A review of vector algebra is provided for anyone not familiar with the use of vectors. This review includes an illustration of vector components, a discussion of vector multiplication, the transformation of vector components, unit vector relationships, and the derivation of the direction cosine identities.

The M-frame to B-frame transformation matrix is also derived using quaternion numbers. The derivation requires that the coefficients of a quaternion number (푞 = 푠 + 푖푎 + 푗푏 + 푘푐) satisfy the identity 푠 + 푎 + 푏 + 푐 = 1 . Their relationship to 푒, 푒, 푒, 푒 is: 푠 = 푒, 푎 = 푒, 푏 = 푒, and 푐 = 푒 .

The transformation matrix of vector components is also known as a rotation and its determinant must equal one. Also, since the elements of a transformation matrix are direction cosines, they satisfy the direction cosine identities.

Page S-1 LM EQUATIONS OF MOTION

LM TRANSLATIONAL AND ROTATIONAL ACCELERATIONS

The M-frame components of the translational acceleration of the LM are:

−휇푥 퐹 푥̈ = + 푃 + 푟 푚

−휇푦 퐹 푦̈ = + 푃 + 푟 푚

−휇푧 퐹 푧̈ = + 푃 + 푟 푚

where the first two terms are the Moon’s universal gravitational acceleration and the perturbation to it due to the Moon’s tri-axiality, and the third term is the summation of the body axes forces divided by the LM’s mass. Successive integration of these components produce the LM’s translational velocity and the LM’s M-frame coordinates.

The B-frame components of the LM’s rotational acceleration are:

푃̇ = Ι − Ι푄푅 + Ι푄̇ − 푅푃 + Ι푅̇ + 푃푄 + Ι(푄 − 푅 ) + 퐿 ÷ Ι

푄̇ = (Ι − Ι)푅푃 + Ι푃̇ − 푄푅 + Ι(푅 − 푃 ) + Ι푅̇ − 푃푄 + 푀 ÷ Ι

푅̇ = Ι − Ι푃푄 + Ι(푃 − 푄 ) + Ι푃̇ − 푄푅 + Ι푄̇ + 푅푃 + 푁 ÷ Ι where the "Ι" terms are the moments and products of inertia of the LM, and 퐿, 푀, 푁 are the body axes components of the moments (torques) that the body axes forces produce. The integration of 푃̇ , 푄̇, 푅̇ gives the rotational velocity of the LM which defines the time rates of change of the quaternion (푒, 푒, 푒, 푒) . Their integration defines the elements of the M-frame to B-frame transformation matrix.

The LM’s mass and moments and products of inertia are evaluated by the Weight and Balance Math Model.

THE FORCES AND MOMENTS THAT ACT ON THE LM

The Gravitational Force

Because the Moon is not a perfect sphere but is instead tri-axial, there is the perturbation to the universal gravitational representation of the gravitational force, due to the tri-axiality, that must be taken into consideration. Thus, the Moon’s gravitational attraction is:

휇 푚 −퐹 퐺 = + 푚 푃 푟 푟

Page S-2 where:

퐹 = 푥푖 + 푦푗 + 푧푘 and the M-frame components of 푃 are represented by:

푃 = 푃푖 + 푃푗 + 푃푘

Thus, the M-frame components of 퐺 are:

−휇 푥 −휇 푦 −휇 푧 퐺 = 푚 + 푃 푖 + + 푃 푗 + + 푃 푘 푟 푟 푟

The LM’s acceleration due to the gravitational perturbation is found by taking the gradient of the lunar tri-axiality potential (Φ).

3푧 3푦 Φ = 퐶 퐴 1 − + 퐵 1 − 푟 푟

where 푟 = (푥 + 푦 + 푧) , (푥, 푦, 푧) are the LM’s S-frame coordinates, and (퐴, 퐵, 퐶) are constants. Upon taking the gradient, the S-frame components of 푃 become:

푃 = 퐹 퐴 = = 621.1358 × 10

푃 = (퐹 − 2퐵) 퐵 = = 207.086 × 10 푃 = (퐹 − 2퐴) 퐶 = = 1.1263979 × 10

The S-frame coordinates are obtained by use of the M-frame to S-frame transformation of M-frame coordinates:

푥 푎 푎 푎 푥 푦 = 푎 푎 푎 푦 푧 푎 푎 푎 푧 where the 푎 are cosines of the angles the S-frame makes with the M-frame. They are the direction cosines of the S-frame with respect to the M-frame. The M-frame components of 푃 are obtained by use of the S-frame to M-frame transformation of the S-frame components:

푃 푎 푎 푎 푃 푃 = 푎 푎 푎 푃 푃 푎 푎 푎 푃

Page S-3 Non-Gravitational Forces and Moments

The non-gravitational forces and moments are due to the thrust of the descent and ascent engines, the RCS thrusts, fuel and oxidizer slosh, and the stage separation force. Their body axes components are first evaluated, then summed, and then transformed to M-frame components. The summation of their body axes components is

퐹 = 푇 + 푇 + 퐹 퐹 = 푇 + 푇 퐹 = 푇 + 푇 + 퐹 where 푇, 푇, 푇 are the main engine B-frame thrust components; 푇, 푇, 푇 are the RCS B-frame thrust components; 퐹 is the stage separation force which acts along the 푋 axis; and 퐹 is the fuel and oxidizer slosh force that acts along the 푍 axis. The transformation of the B-frame components to M-frame components is:

퐹 푔 푔 푔 퐹 퐹 = 푔 푔 푔 퐹 퐹 푔 푔 푔 퐹 where the 푔 are the cosines of the angles the B-frame makes with the M-frame. They are the direction cosines of the B-frame with respect to the M-frame.

The B-frame moment (torque) components are due to the B-frame-referenced forces. The B-frame-referenced moment components are denoted by 퐿, 푀, 푁 (the RCS B-frame thrust moment components); 퐿, 푀, 푁 (the main engine B-frame thrust moment components); 퐿, 푀 (the fuel and oxidizer B-frame slosh moment components); and 푀, 푁 (the stage separation moment B-frame components). Their summation is:

퐿 = 퐿 + 퐿 + 퐿 푀 = 푀 + 푀 + 푀 + 푀 푁 = 푁 + 푁 + 푁

The Main Engine Thrust and Moment Components

Before landing on the lunar surface the main engine is the descent engine and upon leaving the lunar surface the main engine is the ascent engine. Therefore,

푇 = 푇 or 푇 푇 = 푇 or 푇 푇 = 푇 or 푇

The descent engine is gimballed in order to provide additional attitude control. The gimbal angles 훿 and 훿 are associated with an axes system 푋, 푌, 푍 which is centered at the point of application of the descent engine thrust and is parallel to the body axes when the gimbal angles are both zero. The coordinates of its center are denoted 훼, 훽, 훾 . This geometry is shown in Figure S-1:

Page S-4 Figure S-1: Descent Engine Thrust Geometry (adapted from Grumman Aerospace Engineering Corporation (GAEC), 1965, p.1677

The rotations of 푋, 푌, 푍 from an initial parallel alignment with the body axes are:

Page S-5 푋()

푋() 훿 푥() cos 훿 0 sin 훿 푥() 푦() = 푋 0 1 0 푦() 푍 ( ) 푧() − sin 훿 0 cos 훿 푧() 훿

푍()

푋() 푋

훿 푥 cos 훿 sin 훿 0 푥() 푦 푦 = − sin 훿 cos 훿 0 () 푧 0 0 1 푧() 푌() δ

Therefore,

푥 cos 훿 cos 훿 sin 훿 cos 훿 sin 훿 푥() 푦 = − sin 훿 cos 훿 cos 훿 − sin 훿 sin 훿 푦() 푧 푧() − sin 훿 0 cos 훿 where 푥(), 푦(), 푧() are components of the descent engine thrust which are parallel to the body axes and 푥, 푦, 푧 are 푋, 푌, 푍 components. Thus, the thrust of the descent engine is given by:

푇 = 푇푖 = 푇 cos 훿 cos 훿 푖 + 푇 sin 훿 푗 + 푇 cos 훿 sin 훿 푘

Page S-6 and, 푇 = 푇 cos 훿 cos 훿 푇 = 푇 sin 훿 푇 = 푇 cos 훿 sin 훿

The descent engine moment is given by:

푀 = 퐹 × 푇

= 훼푖 + 훽푗 + 훾푘 × 푇푖 + 푇푗 + 푇푘 ( ) = 훽푇 − 훾푇푖 + 훾푇 − 훼푇 푗 + 훼푇 − 훽푇푘

and, 푀 = 훽푇 − 훾푇 푀 = 훾푇 − 훼푇 푀 = 훼푇 − 훽푇

The ascent engine is not gimballed. However, in order to account for a misalignment of the ascent engine, where the misalignment angles are 훿 and 훿, the body axes components of the ascent engine thrust are:

푇 = 푇 cos 훿 cos 훿 푇 = 푇 sin 훿 푇 = 푇 cos 훿 sin 훿 where 푇 is the thrust of the ascent engine. The body axes components of the ascent engine are:

푀 = 훽푇 − 훾푇 푀 = 훾푇 − 훼푇 푀 = 훼푇 − 훽푇

The Thrust and Moment of the Reaction Control System

The sixteen RCS thrusters are positioned about a fixed reference point (R.P.) whose body axes coordinates are 훼, 훽, 훾 . Their geometry is shown in Figure S-2. The directions of their thrusts are parallel to the body axes and the points where thrusts are applied are defined by the moment arms ℓ = 5′ and ℓ = 5.5′ with respect to the fixed reference point. RCS thrust is given by:

푇 = 푇 (the summation of the 16 thrusts)

Page S-7 Figure S-2: LEM RCS Thrusters and Body (B-Frame) Geometry (adapted from Grumman Aerospace Engineering Corporation (GAEC), 1965, p.1678)

Page S-8 The RCS moment is given by:

푀 = 퐹/.. × 푇 (the summation of thruster moments) where:

퐹/.. = 퐹../.. + 퐹

퐹../.. = 훼푖 + 훽푗 + 훾푘

퐹 is the position of the 푖th thruster with respect to the fixed reference point.

Upon substitution:

푀 = 퐹../.. + 퐹 × 푇

which can also be expressed as:

푀 = 퐹../.. × 푇 + 퐹 × 푇

= 퐹../. × 푇 + 퐹 × 푇

The vectors 퐹, 푇, and 퐹 × 푇 are tabulated in Table S–1 on the next page. From this tabulation:

푇 = 푇푖 + 푇푗 + 푇푘 where: 푇 = 푇 + 푇 + 푇 + 푇 − (푇 + 푇 + 푇 + 푇) 푇 = 푇 + 푇 − (푇 + 푇) 푇 = 푇 + 푇 − (푇 + 푇) and

퐹 × 푇 = 퐿푖 + 푀푗 + 푁푘 where:

퐿 = [푇 + 푇 + 푇 + 푇 − (푇 + 푇 + 푇 + 푇)]ℓ 푀 = [푇 + 푇 + 푇 + 푇 − (푇 + 푇 + 푇 + 푇)]ℓ 푁 = [푇 + 푇 + 푇 + 푇 − (푇 + 푇 + 푇 + 푇)]ℓ

Page S-9 Upon substitution:

푀 =퐿푖 +푀푗 +푁푘 where:

퐿 =훽푇 −훾푇 +퐿 푀 =훾푇 −훼푇 +푀 푁 =훼푇 −훽푇 +푁

Table S–1: 퐹, 푇, 푎푛푑 퐹 ×푇 Vector Tabulation

Thruster 푭풊 푻풊 푭풊 × 푻풊

1 퐹 = ℓ푗 + ℓ푘 −푇푖 −푇ℓ푗 +푇ℓ푘

2 퐹 = ℓ푗 + ℓ푘 푇푖 +푇ℓ푗 −푇ℓ푘

3 퐹 = ℓ푗 + ℓ푘 −푇푘 −푇ℓ푖

4 퐹 = ℓ푗 + ℓ푘 −푇푗 +푇ℓ푖

5 퐹 = ℓ푗 − ℓ푘 −푇푖 +푇ℓ푗 +푇ℓ푘

6 퐹 = ℓ푗 − ℓ푘 푇푖 −푇ℓ푗 −푇ℓ푘

7 퐹 = ℓ푗 − ℓ푘 푇푘 +푇ℓ푖

8 퐹 = ℓ푗 − ℓ푘 −푇푗 −푇ℓ푖

9 퐹 = −ℓ푗 − ℓ푘 −푇푖 +푇ℓ푗 −푇ℓ푘

10 퐹 = −ℓ푗 − ℓ푘 푇푖 −푇ℓ푗 +푇ℓ푘

11 퐹 = −ℓ푗 − ℓ푘 푇푘 −푇ℓ푖

12 퐹 = −ℓ푗 − ℓ푘 푇푗 +푇ℓ푖

13 퐹 = −ℓ푗 + ℓ푘 −푇푖 −푇ℓ푗 −푇ℓ푘

14 퐹 = −ℓ푗 + ℓ푘 푇푖 +푇ℓ푗 +푇ℓ푘

15 퐹 = −ℓ푗 + ℓ푘 −푇푘 +푇ℓ푖

16 퐹 = −ℓ푗 + ℓ푘 푇푗 −푇ℓ푖

Page S-10 Of course, equations for 퐿,푀, and 푁 can be obtained directly from ∑퐹/.. ×푇 . From the tabulation in Table S–2 below:

퐿 = (훽 + ℓ)(푇 −푇) + (훽 − ℓ)(푇 −푇) + (훾 + ℓ)(푇 −푇) + (훾 − ℓ)(푇 −푇) 푀 =훼(푇 +푇 −푇 −푇) + (훾 + ℓ)(푇 −푇 +푇 −푇) + (훾 − ℓ)(푇 −푇 +푇 −푇) 푁 =훼(푇 +푇 −푇 −푇) + (훽 + ℓ)(푇 −푇 +푇 −푇) + (훽 − ℓ)(푇 −푇 +푇 −푇)

Table S–2: 푀 Vector Tabulation

풊 푭풊/푪.푮. × 푻풊 푳푹풊풊 +푴푹풊풋 +푵푹풊풌

1 훼푖 + (훽 + ℓ)푗 + (훾 + ℓ)푘 × −푇푖 = −(훾 + ℓ)푇푗 +(훽 + ℓ)푇푘

2 훼푖 + (훽 + ℓ)푗 + (훾 + ℓ)푘 × 푇푖 = +(훾 + ℓ)푇푗 −(훽 + ℓ)푇푘

3 훼푖 + (훽 + ℓ)푗 + (훾 + ℓ)푘 × −푇푘 = −(훽 + ℓ)푇푖 +훼푇푗

4 훼푖 + (훽 + ℓ)푗 + (훾 + ℓ)푘 × −푇푗 = +(훾 + ℓ)푇푖 −훼푇푘

5 훼푖 + (훽 + ℓ)푗 + (훾 − ℓ)푘 × −푇푖 = −(훾 − ℓ)푇푗 +(훽 + ℓ)푇푘

6 훼푖 + (훽 + ℓ)푗 + (훾 − ℓ)푘 × 푇푖 = +(훾 − ℓ)푇푗 −(훽 + ℓ)푇푘

7 훼푖 + (훽 + ℓ)푗 + (훾 − ℓ)푘 × 푇푘 = +(훽 + ℓ)푇푖 −훼푇푗

8 훼푖 + (훽 + ℓ)푗 + (훾 − ℓ)푘 × −푇푗 = +(훾 − ℓ)푇푖 −훼푇푘

9 훼푖 + (훽 − ℓ)푗 + (훾 − ℓ)푘 × −푇푖 = −(훾 − ℓ)푇푗 +(훽 − ℓ)푇푘

10 훼푖 + (훽 − ℓ)푗 + (훾 − ℓ)푘 × 푇푖 = +(훾 − ℓ)푇푗 −(훽 − ℓ)푇푘

11 훼푖 + (훽 − ℓ)푗 + (훾 − ℓ)푘 × 푇푘 = +(훽 − ℓ)푇푖 −훼푇푗

12 훼푖 + (훽 − ℓ)푗 + (훾 − ℓ)푘 × 푇푗 = −(훾 − ℓ)푇푖 +훼푇푘

13 훼푖 + (훽 − ℓ)푗 + (훾 + ℓ)푘 × −푇푖 = −(훾 + ℓ)푇푗 +(훽 − ℓ)푇푘

14 훼푖 + (훽 − ℓ)푗 + (훾 + ℓ)푘 × 푇푖 = +(훾 + ℓ)푇푗 −(훽 − ℓ)푇푘

15 훼푖 + (훽 − ℓ)푗 + (훾 + ℓ)푘 × −푇푘 = −(훽 − ℓ)푇푖 −훼푇푗

16 훼푖 + (훽 − ℓ)푗 + (훾 + ℓ)푘 × 푇푗 = −(훾 + ℓ)푇푖 +훼푇푘

푀 = 퐿푖 + 푀푗 + 푁푘

Page S-11 Fuel and Oxidizer Slosh Force and Moment Component

The slosh force, 퐹푖 , (evaluated by the Slosh Force Math Model) is represented as a pendulum whose pivot has body axes coordinates 훼, 훽,0 . Thus, the slosh moment (torque) is:

퐿푖 + 푀푗 + 푁푘 = 훼푖 + 훽푗 × 퐹푘 = 훽퐹푖 − 훼퐹푗 and the slosh body axes moment components are:

퐿 = 훽 퐹 푀 =−훼퐹

Stage Separation Force and Moment

Stage separation events depend on whether an abort with partial (푖 = 푃푃) or full (푖 = 퐹푃) tank pressure or a lunar lift-off (푖 = 퐿푂) is being performed. The stage separation force, 퐹푖 , measured from the time of ascent engine separation is represented by:

Figure S-3: Time Measured from Ascent Engine Ignition (adapted from Grumman Aerospace Engineering Corporation (GAEC), 1965, p.1701

where 퐹 is considered to be a linear function of 푡′ until 푡 =Δ푡 , a third order polynomial from Δ푡 ≤ 푡 ≤Δ푡 , and zero after 푡 =Δ푡 .

Stage separation moment perturbations are large and cannot be neglected. The moment arm, relating to the LM’s center of gravity, is time-dependent. For this reason, the moment perturba- tions are not represented by a constant arm times the stage separation force. The moment time transient, however, has a shape similar to the stage separation force profile.

Should future studies indicate a small moment arm variation with time, then stage separation torques could be computed using an average, constant moment arm times the stage separation force.

Page S-12 THE M-FRAME TO B-FRAME TRANSFORMATION

THE ELEMENTS OF THE TRANSFORMATION MATRIX

The M-frame to B-frame transformation transforms the M-frame components of a vector to B-frame components of the same vector. This is done by projecting each M-frame component onto the three B-frame axes using the cosines of the angles that the B-frame axes make with the M-frame axes. Since these angles specify the orientation (direction) of the B-frame axes with respect to the M-frame axes, they are called direction angles and their cosines are called direction cosines. Thus, in terms of these direction cosines, the M-frame to B-frame transformation is:

푉 푔 푔 푔 푉 푉 = 푔 푔 푔 푉 푉 푔 푔 푔 푉

where:

푔 is the cosine of the angle 푋 makes with 푋 푔 is the cosine of the angle 푋 makes with 푌 푔 is the cosine of the angle 푋 makes with 푍 푔 is the cosine of the angle 푌 makes with 푋 푔 is the cosine of the angle 푌 makes with 푌 푔 is the cosine of the angle 푌 makes with 푍 푔 is the cosine of the angle 푍 makes with 푋 푔 is the cosine of the angle 푍 makes with 푌 푔 is the cosine of the angle 푍 makes with 푍

THE TRANSFORMATION USING LM EULER ANGLES

The orientation of (푋, 푌, 푍) with respect to (푋, 푌, 푍) can also be specified by a specific, sequential, ordered rotation through three angles of (푋, 푌, 푍) with respect to (푋, 푌, 푍) starting with an initial alignment of (푋, 푌, 푍) with (푋, 푌, 푍) . The three angles are called Euler angles. The three specific rotations used by the LM Equations of Motion are:

1.) a first rotation through the angle 휃 about the 푌 axis. This rotation is called pilot pitch. 2.) a second rotation through the angle 휓 about the orientation the 푍 axis assumes as a result of the first rotation. This rotation is called pilot roll. 3.) a final third rotation through the angle 휙 about the orientation the 푋 axis assumes as a result of the first and second rotations. This rotation is called pilot yaw.

These rotations and their associated transformations are shown below:

Page S-13 푋

푋()

푉() cos 휃 0 − sin 휃 푉 푉() = 0 1 0 푉 푍 () 푉 sin 휃 0 cos 휃 푉 휃 ()

휃 푍

푋() 푋()

휓 푉() cos 휓 sin 휓 0 푉() 푉() = − sin 휓 cos 휓 0 푉() 푉() 0 0 1 푉() 푌() 휓

푌()

푌 () 휙

푌 휙 푉 1 0 0 푉() 푉 = 0 cos 휙 sin 휙 푉() 푉 0 − sin 휙 cos 휙 푉()

푍()

The 푋(), 푌(), 푍() to (푋, 푌, 푍) transformation is:

푉 1 0 0 cos 휓 sin 휓 0 푉() 푉 = 0 cos 휙 sin 휙 −sin 휓 cos 휓 0 푉() 푉 0 − sin 휙 cos 휙 0 0 1 푉() or,

Page S-14 푉 cos 휓 sin 휓 0 푉() 푉 = − cos 휙 sin 휓 cos 휙 cos 휓 sin 휙 푉() 푉 sin 휙 sin 휓 − sin 휙 cos 휓 cos 휙 푉()

Therefore, the (푋, 푌, 푍) to (푋, 푌, 푍) transformation is:

푉 cos 휓 sin 휓 0 cos 휃 0 − sin 휃 푉 푉 = −cos 휙 sin 휓 cos 휙 cos 휓 sin 휙 0 1 0 푉 푉 sin 휙 sin 휓 − sin 휙 cos 휓 cos 휙 sin 휃 0 cos 휃 푉 or,

푉 (cos 휓 cos 휃) (sin 휓) (−cos 휓 sin 휃) 푉 푉 = (−cos 휙 sin 휓 cos 휃 + sin 휙 sin 휃) (cos 휙 cos 휓) (cos 휙 sin 휓 sin 휃 + sin 휙 cos 휃) 푉 푉 (sin 휙 sin 휓 cos 휃 + cos 휙 sin 휃)(− sin 휙 cos 휓)(− sin 휙 sin 휓 sin 휃 + cos 휙 cos 휃) 푉

THE TRANSFORMATION USING A QUATERNION

The M-frame to B-frame transformation can also be derived from the similarity transformation:

(푉) 푉 − 푖푉 (푉) 푉 − 푖푉 = Η Η 푉 + 푖푉 (−푉) 푉 + 푖푉 (−푉) where:

(푒 + 푖푒 )(푒 + 푖푒 ) Η = (−푒 + 푖푒)(푒 − 푖푒) and the inverse of H is:

(푒 − 푖푒 )(−푒 + 푖푒 ) Η = (푒 − 푖푒) (푒 + 푖푒)

Η is a transformation matrix; and since a transformation matrix is a rotation, its determinant must equal one. Therefore:

|Η| = 푒 + 푒 + 푒 + 푒 = 1

(푒, 푒, 푒, 푒) is a quaternion (set of four) real numbers with the property that the sum of their squares must equal one. This property is called the quaternion identity.

Upon substitution, the similarity transformation becomes:

Page S-15 (푉) 푉 − 푖푉 (푒 + 푖푒 )(푒 + 푖푒 ) (푉) 푉 − 푖푉 (푒 − 푖푒 )(−푒 + 푖푒 ) = 푉 + 푖푉 (−푉) (−푒 + 푖푒)(푒 − 푖푒) 푉 + 푖푉 (−푉) (푒 − 푖푒) (푒 + 푖푒)

or, upon completion of the matrix product on the right:

(푉) 푉 − 푖푉 푒푙푒푚푒푛푡 1,1 푒푙푒푚푒푛푡 1,2 = 푉 + 푖푉 (−푉) 푒푙푒푚푒푛푡 2,1 푒푙푒푚푒푛푡 2,2

where:

푒푙푒푚푒푛푡 1,1 = (푒 + 푒 − 푒 − 푒)푉 + 2(푒 푒 + 푒 푒 )푉 + 2(푒 푒 − 푒 푒 )푉 = 푉

Being simply the negation of (푒푙푒푚푒푛푡 1,1), (푒푙푒푚푒푛푡 2,2) need not be evaluated; however, for completeness:

푒푙푒푚푒푛푡 2,2 = −(푒 + 푒 − 푒 − 푒)푉 − 2(푒 푒 + 푒 푒 )푉 − 2(푒 푒 − 푒 푒 )푉 = −푉

푒푙푒푚푒푛푡 1,2 = (푒 − 푒 − 푒 + 푒 )푉 + 2(푒푒 + 푒푒)푉 + 2(푒푒 − 푒푒)푉 +푖2(푒푒 − 푒푒)푉 + (푒 − 푒 − 푒 + 푒 )푉 − 2(푒푒 + 푒푒)푉 = 푉 − 푖푉

(푒푙푒푚푒푛푡 2,1) also need not be evaluated; for completeness, however:

푒푙푒푚푒푛푡 2,1 = (−푒 + 푒 + 푒 − 푒 )푉 + 2(푒푒 + 푒푒)푉 + 2(푒푒 − 푒푒)푉 +푖2(푒푒 − 푒푒)푉 + (푒 − 푒 + 푒 − 푒 )푉 + 2(푒푒 + 푒푒)푉 = 푉 + 푖푉

Upon equating like terms, the M-frame to B-frame transformation in terms of a quaternion of real numbers is:

푉 = (푒 − 푒 − 푒 + 푒 )푉 + 2(푒푒 + 푒푒)푉 + 2(푒푒 − 푒푒)푉 푉 = 2(푒푒 − 푒푒)푉 + (푒 − 푒 + 푒 − 푒 )푉 + 2(푒푒 + 푒푒)푉 푉 = 2(푒푒 + 푒푒)푉 + 2(푒푒 − 푒푒)푉 + (푒 + 푒 − 푒 − 푒 )푉 or, in matrix notation:

푉 (푒 − 푒 − 푒 + 푒 ) 2(푒푒 + 푒푒) 2(푒푒 − 푒푒) 푉 푉 = 2(푒푒 − 푒푒)(푒 − 푒 + 푒 − 푒 ) 2(푒푒 + 푒푒) 푉 푉 2(푒푒 + 푒푒) 2(푒푒 − 푒푒)(푒 + 푒 − 푒 − 푒 ) 푉

Page S-16 The Satisfaction of the Direction Cosine Identities

The elements of a transformation matrix must satisfy the direction cosine identities since they are direction cosines. The following examples show that they do. Consider first the identity: 푔 + 푔 + 푔 = 1 .

푔 + 푔 + 푔 = (cos 휓 cos 휃) + (sin 휓) + (− cos 휓 sin 휃) = cos 휓(cos 휃 + sin 휃) + sin 휓 = 1

Also, when the elements are expressed as functions of 푒, 푒, 푒, and 푒, this identity becomes:

푔 + 푔 + 푔 = [푒 − 푒 − 푒 + 푒 ] + [2(푒푒 + 푒푒)] + [2(푒푒 − 푒푒)]

= [푒 + 푒 + 푒 + 푒 − 2푒 푒 − 2푒 푒 + 2푒 푒 + 2푒 푒 − 2푒 푒 − 2푒 푒 ] +[4푒 푒 + 4(푒푒푒푒) + 4푒 푒 ] + [4푒 푒 − 4(푒푒푒푒) + 4푒 푒 ]

= 푒 + 푒 + 푒 + 푒 + 2푒 푒 + 2푒 푒 + 2푒 푒 + 2푒 푒 + 2푒 푒 + 2푒 푒

= (푒 + 푒 + 푒 + 푒 ) = 1 since 푒 + 푒 + 푒 + 푒 = 1

Consider next the identity: 푔푔 + 푔푔 + 푔푔 = 0 .

푔푔 + 푔푔 + 푔푔 = (cos 휓 cos 휃)(sin 휓) +(sin 휙 sin 휃 − cos 휙 sin 휓 cos 휃)(cos 휙 cos 휓) +(sin 휙 sin 휓 cos 휃 + cos 휙 sin 휃)(− sin 휙 cos 휓)

= sin 휓 cos 휓 cos 휃 + sin 휙 cos 휓 cos 휙 sin 휃 − cos 휙 sin 휓 cos 휓 cos 휃 − sin 휙 sin 휓 cos 휓 cos 휃 − sin 휙 cos 휙 cos 휓 sin 휃

= 0

Also, when the elements are expressed as functions of 푒, 푒, 푒, 푒, this identity becomes:

푔푔 + 푔푔 + 푔푔 = [푒 − 푒 − 푒 + 푒 ][2(푒푒 + 푒푒)] +[2(푒푒 − 푒푒)][푒 − 푒 + 푒 − 푒 ] +[2(푒푒 + 푒푒)][2(푒푒 − 푒푒)]

= 푒 [2(푒푒 + 푒푒) + 2(푒푒 − 푒푒) − 4푒푒] −푒 [2(푒푒 + 푒푒) + 2(푒푒 − 푒푒) − 4푒푒] −푒 [2(푒푒 + 푒푒) − 2(푒푒 − 푒푒) − 4푒푒] +푒 [2(푒푒 + 푒푒) − 2(푒푒 − 푒푒) − 4푒푒]

= 푒 [0] − 푒 [0] − 푒 [0] + 푒 [0] = 0

Page S-17 The Determinant of the Transformation Matrix

푔 = 푔(푔푔 − 푔푔) − 푔(푔푔 − 푔푔) + 푔(푔푔 − 푔푔)

Since

푔 = 푔푔 − 푔푔 −푔 = 푔푔 − 푔푔 푔 = 푔푔 − 푔푔 then 푔 = 푔 + 푔 + 푔 = 1

Also, when 푔 is represented in terms of Euler angles,

푔 = {(cos 휓 cos 휃)[(cos 휙 cos 휓)(− sin 휙 sin 휓 sin 휃 + cos 휙 cos 휃) −(cos 휙 sin 휓 sin 휃 + sin 휙 cos 휃)(− sin 휙 cos 휓)]} +{−(sin 휓)[(− cos 휙 sin 휓 cos 휃 + sin 휙 sin 휃)(− sin 휙 sin 휓 sin 휃 + cos 휙 cos 휃) −(cos 휙 sin 휓 sin 휃 + sin 휙 cos 휃)(sin 휙 sin 휓 cos 휃 + cos 휙 sin 휃)]} +{(− cos 휓 sin 휃)[(− cos 휙 sin 휓 cos 휃 + sin 휙 sin 휃)(− sin 휙 cos 휓) −(cos 휙 cos 휓)(sin 휙 sin 휓 cos 휃 + cos 휙 sin 휃)]}

= {cos 휃 cos 휓} + {sin 휓} + {sin 휃 cos 휓}

= cos 휓 (cos 휃 + sin 휃) + sin 휓

= cos 휓 + sin 휓 = 1

Of course, the same result is obtained when 푔 is represented in terms of a quaternion of real numbers whose members satisfy the identity: 푒 + 푒 + 푒 + 푒 = 1 because the determinant of a rotation matrix is equal to one as shown above.

THE CHOICE OF THE QUATERNION TRANSFORMATION

The LM Euler angles are much easier to relate to than direction cosines or a quaternion of real numbers. That is why the initial attitude of the LM is specified in terms of 휃, 휓, 휙 . Also, the integrals of their time rates of change do not have to be rectified, since the correctness of the transformation matrix that is produced through their use only depends on how well they satisfy the identity: (푠푖푛푒) + (푐표푠푖푛푒) = 1 . Of course, the difference will be very small and it does not accumulate. Unfortunately, their use does not provide an all-attitude simulation, because 휃̇ and 휙̇ increase without bound in the neighborhoods of 휓 = ±90° , and they are, of course, undefined when cos 휓 = 0 . This leaves the choice of the evaluation between the integration of the 푔̇ or the 푒̇ . However, because no integration algorithms are exact, the very small errors that result from their use accumulate. Therefore, in order that the transformation matrix that results from

Page S-18 their use satisfies the direction cosine identities, the integrals of the 푔̇ and 푒̇ must be rectified. If the evaluation of the transformation matrix is done by integrating the 푔̇, it has been seen that the rectification can be done by rectifying the results of six integrations and then solving for the other three 푔̇ by using the appropriate direction cosine identities. If the evaluation is done by integrating the 푒̇, the direction cosine identities will be satisfied if the integrals are rectified such that the quaternion identity is satisfied. Thus, the choice is between six integrations and six rectifications or four integrations and four rectifications. However, after the six 푔 are rectified, the other three 푔 must be found; and after the four 푒 are rectified, the 푔 must be solved for. Therefore, there does not appear to be a clear choice between the two methods. Grumman Aerospace Engineering Corporation (GAEC) chose the integration of the 푒̇ based on results obtained using both methods.

Page S-19 THE EVALUATION OF THE M-FRAME TO B-FRAME TRANSFORMATION MATRIX ELEMENTS

THE EVALUATION USING LM EULER ANGLE RATES

The LM’s Euler angles are specified by the following sequential rotations of the B-frame from an initial alignment with the M-frame:

 A first rotation through 휃 about the 푌 axis. This rotation is called pilot pitch.  A second sequential rotation through 휓 about the orientation the 푍 axis assumes as a result of the first rotation. This rotation is called pilot roll.  A third and final rotation through 휙 about the orientation the 푋 axis assumes as a result of the second rotation. This rotation is called pilot yaw.

These rotations and their associated transformations are:

푋()

푉() cos 휃 0 −sin 휃 푉 푉() = 푉 푍() 0 1 0 휃 푉() sin 휃 0 cos 휃 푉

휃 푍

푋 푋 () ()

휓 푉() cos 휓 sin 휓 0 푉() 푉() = −sin 휓 cos 휓 0 푉() 푉() 0 0 1 푉() 푌() 휓 푌() 푌

푌() 휙

푍 휙 () Page S-20

푍 푉 1 0 0 푉() 푉 = 0 cos 휙 sin 휙 푉() 푉 0 − sin 휙 cos 휙 푉()

The 푋(), 푌(), 푍() to (푋, 푌, 푍) transformation is obtained by combining the last two rotations:

푉 1 0 0 cos 휓 sin 휓 0 푉() 푉 = 0 cos 휙 sin 휙 −sin 휓 cos 휓 0 푉() 푉 0 − sin 휙 cos 휙 0 0 1 푉()

cos 휓 sin 휓 0 푉() = − cos 휙 sin 휓 cos 휙 cos 휓 sin 휙 푉() sin 휙 sin 휓 − sin 휙 cos 휓 cos 휙 푉()

And upon substitution of the (푋, 푌, 푍) to 푋(), 푌(), 푍() transformation, the (푋, 푌, 푍) to (푋, 푌, 푍) transformation is:

푉 cos 휓 sin 휓 0 cos 휃 0 − sin 휃 푉 푉 = −cos 휙 sin 휓 cos 휙 cos 휓 sin 휙 0 1 0 푉 푉 sin 휙 sin 휓 − sin 휙 cos 휓 cos 휙 sin 휃 0 cos 휃 푉

(cos 휓 cos 휃) (sin 휓) (−cos 휓 sin 휃) 푉 = (−cos휙sin휓cos휃 +sin휙sin휃) (cos 휙 cos 휓) (cos휙sin휓sin휃 +sin휙cos휃) 푉 (sin휙sin휓cos휃 +cos휙sin휃)(− sin 휙 cos 휓)(−sin휙sin휓sin휃 +cos휙cos휃) 푉

Therefore, 푔 = cos 휓 cos 휃 푔 = sin 휓 푔 = −cos 휓 sin 휃 푔 = −cos휙sin휓cos휃+sin휙sin휃 푔 = cos 휙 cos 휓 푔 = cos휙sin휓sin휃 +sin휙cos휃 푔 = sin휙sin휓cos휃 +cos휙sin휃 푔 = − sin 휙 cos 휓 푔 = −sin휙sin휓sin휃 +cos휙cos휃 휃, 휓, 휙 are obtained by integrating 휃̇, 휓̇ , 휙̇ :

Page S-21 휃 = 휃̇푑푡 + 휃 휓 = 휓̇푑푡 + 휓 휙 = 휙̇푑푡 + 휙

The equations for 휃̇, 휓̇ , 휙̇ are:

cos 휙 sin 휙 휃̇ = 푄 − 푅 cos 휓 cos 휓 휓̇ =푄sin휙+푅cos휙 휙̇ = 푃 + 푅 tan 휓 sin 휙 − 푄 tan 휓 cos 휙

̇ ̇ ̇ These equations are derived by first equating 휔 = 휃푗 + 휓푘() + 휙푖 to 휔 = 푃푖 + 푄푗 + 푅푘 where 휔 is the LM’s rotational velocity, and then solving for 휃̇, 휓̇ , 휙̇ .

̇ The B-frame components of 휃푗 are found using the M-frame to B-frame transformation:

̇ 휃 x sin 휓 x 0 휃̇ = x cos 휙 cos 휓 x 휃̇ x − sin 휙 cos 휓 x 0 휃̇

Thus, 휃̇ = (sin 휓)휃̇

휃̇ = (cos 휙 cos 휓)휃̇

휃̇ = (− sin 휙 cos 휓)휃̇

The B-frame components of 휓̇푘() are found using the 푋(), 푌(), 푍() to (푋, 푌, 푍) transformation:

̇ 휓 x x 0 0 휓̇ = x x sin 휙 0 x x cos 휙 휓̇ 휓̇

Thus, 휓̇ = 0

휓̇ = (sin 휙)휓̇

휓̇ = (cos 휙)휓̇

Therefore, the first expression for 휔 given above becomes:

Page S-22 ̇ ̇ ̇ ̇ ̇ ̇ 휔 = 휃 sin 휓 + 휙푖 + 휃 cos 휙 cos 휓 + 휓 sin 휙푗 + −휃 sin 휙 cos 휓 + 휓 cos 휙푘 and by equating like components in the two expressions for 휔 :

푃 = 휃̇ sin 휓 + 휙̇ 푄 = 휃̇ cos 휙 cos 휓 + 휓̇ sin 휙 푅 = −휃̇ sin 휙 cos 휓 + 휓̇ cos 휙

Since

푄sin휙+푅cos휙=휓̇(sin 휙 + cos 휙) the equation for 휓̇ is:

휓̇ =푄sin휙+푅cos휙

And since

푄cos휙−푅sin휙=휃̇ cos 휓 (cos 휙 + sin 휙) the equation for 휃̇ is:

cos 휙 sin 휙 휃̇ = 푄 − 푅 cos 휓 cos 휓 and substitution of the equation for 휃̇ into the equation for 푃 and then solving for 휙̇ gives:

휙̇ = 푃 + 푅 tan 휓 sin 휙 − 푄 tan 휓 cos 휙

Page S-23 THE EVALUATION USING THE MATRIX ELEMENT RATES

Since the 푔 are direction cosines, they must satisfy the direction cosine identities. If all nine of the 푔 are obtained through integration, the identities would not be satisfied due to the accumulation of the small inaccuracies associated with any integration algorithm. However, the direction cosine identities can be satisfied if six of the 푔 are integrated, then rectified, and the remaining 푔 are obtained using the direction cosine identities. Therefore, let the following unrectified 푔 be obtained by means of integration:

푔 = 푔̇푑푡 + (푔) 푔 = 푔̇푑푡 + (푔) 푔 = 푔̇푑푡 + (푔) 푔 = 푔̇푑푡 + (푔) 푔 = 푔̇푑푡 + (푔) 푔 = 푔̇푑푡 + (푔)

Then let these direction cosines be rectified by first evaluating the differences:

퐸 = (푔) + (푔) + (푔) − 1 퐸 = (푔) + (푔) + (푔) − 1 and the relationships:

푔 = 푔 ÷ 1 + 퐸 푔 = 푔 ÷ 1 + 퐸 푔 = 푔 ÷ 1 + 퐸 푔 = 푔 ÷ 1 + 퐸 푔 = 푔 ÷ 1 + 퐸 푔 = 푔 ÷ 1 + 퐸 and then solving for 푔, 푔, 푔 using the direction cosine identities:

푔 = 푔푔 − 푔푔 푔 = 푔푔 − 푔푔 푔 = 푔푔 − 푔푔

Page S-24 The equations for 푔̇,…, 푔̇ are available in the literature. For example, they are given on page 70 of Robinson’s paper “On the Use of Quaternions in Simulation of Rigid Body Motion”. He also derives them. They are:

푔̇ = 푔푅 − 푔푄 푔̇ = 푔푅 − 푔푄 푔̇ = 푔푅 − 푔푄 푔̇ = 푔푃 − 푔푅 푔̇ = 푔푃 − 푔푅 푔̇ = 푔푃 − 푔푅 푔̇ = 푔푄 − 푔푃 푔̇ = 푔푄 − 푔푃 푔̇ = 푔푄 − 푔푃

As expected, they are dependent on the LM’s angular velocity B-frame components 푃, 푄, 푅 .

The initial values of 푔,…, 푔 are provided by the equations for them in terms of 휃, 휓, 휙 which are given in the previous section: “The Evaluation Using LM Euler Angle Rates”.

The equations for the rectification of 푔, 푔, 푔 are obtained by letting:

( ) ( ) ( ) 푔 + 푔 + 푔 푔 + 푔 + 푔 = = 1 1 + 퐸

Then since,

(푔 ) + (푔 ) + (푔 ) (푔 ) (푔 ) (푔 ) = + + 1 + 퐸 1 + 퐸 1 + 퐸 1 + 퐸

( ) ( ) ( ) 푔 푔 푔 푔 + 푔 + 푔 = + + 1 + 퐸 1 + 퐸 1 + 퐸

This relationship is satisfied if:

푔 = 푔 ÷ 1 + 퐸 푔 = 푔 ÷ 1 + 퐸 푔 = 푔 ÷ 1 + 퐸

The equations for the rectification of 푔, 푔, 푔 are obtained in the same way.

Page S-25 THE EVALUATION USING THE QUATERNION RATES

It previously has been shown that the direction cosine identities using a quaternion will be satisfied if and only if (푒 + 푒 + 푒 + 푒 ) = 1 .

The equations for the 푔 in terms of the 푒 have been given previously (see “The Transformation Using a Quaternion” on page S-15):

푔 = 푒 − 푒 − 푒 + 푒 푔 = 2(푒푒 + 푒푒) 푔 = 2(푒푒 − 푒푒) 푔 = 2(푒푒 − 푒푒) 푔 = 푒 − 푒 + 푒 − 푒 푔 = 2(푒푒 + 푒푒) 푔 = 2(푒푒 + 푒푒) 푔 = 2(푒푒 − 푒푒) 푔 = 푒 + 푒 − 푒 − 푒

However, the 푒 must be evaluated by means of integration. Since the 푔 in terms of the 푒 will satisfy the direction cosine identities if and only if 푒 + 푒 + 푒 + 푒 = 1 , the values obtained by means of integration must be rectified. Thus,

푒 = 푒̇ 푑푡 + (푒) 푒 = 푒̇ 푑푡 + (푒) 푒 = 푒̇ 푑푡 + (푒) 푒 = 푒̇ 푑푡 + (푒) can be rectified using the equations:

푒 = 푒 ÷ 1 + 퐸 푒 = 푒 ÷ 1 + 퐸 푒 = 푒 ÷ 1 + 퐸 푒 = 푒 ÷ 1 + 퐸

where

퐸 = (푒) + (푒) + (푒) + (푒) − 1

Page S-26 Having obtained the 푒 , the M-frame to B-frame transformation matrix elements can then be found. They are: 푔 = 푒 − 푒 − 푒 + 푒 푔 = 2(푒푒 + 푒푒) 푔 = 2(푒푒 − 푒푒) 푔 = 2(푒푒 − 푒푒) 푔 = 푒 − 푒 + 푒 − 푒 푔 = 2(푒푒 + 푒푒) 푔 = 2(푒푒 + 푒푒) 푔 = 2(푒푒 − 푒푒) 푔 = 푒 + 푒 − 푒 − 푒

The equations for 푒̇ , 푒̇, 푒̇, 푒̇ are also available in the literature. They can be found on page 21 of Robinson’s paper “On the Use of Quaternions in Simulation of Rigid Body Motion”. He also derives them. They are: 푒̇ = (−푒 푃 − 푒 푄 − 푒 푅) 푒̇ = (−푒 푃 + 푒 푄 + 푒 푅) 푒̇ = ( 푒 푃 + 푒 푄 − 푒 푅) 푒̇ = ( 푒 푃 − 푒 푄 + 푒 푅)

The initial values of the 푒 are specified in terms of the relationships of the 푒 to 휃, 휓, 휙 . These relationships are given in the section: “The Relationship of the Quaternion to the LM Euler Angles” on page S-29.

The equations for the rectification of the 푒 are obtained by letting:

( ) ( ) ( ) ( ) 푒 + 푒 + 푒 + 푒 푒 + 푒 + 푒 + 푒 = = 1 1 + 퐸

Then since, (푒 ) + (푒 ) + (푒 ) + (푒 ) (푒 ) (푒 ) (푒 ) (푒 ) = + + + 1 + 퐸 1 + 퐸 1 + 퐸 1 + 퐸 1 + 퐸

( ) ( ) ( ) ( ) 푒 푒 푒 푒 푒 + 푒 + 푒 + 푒 = + + + 1 + 퐸 1 + 퐸 1 + 퐸 1 + 퐸

The identity 푒 + 푒 + 푒 + 푒 = 1 is then satisfied if:

푒 = 푒 ÷ 1 + 퐸 푒 = 푒 ÷ 1 + 퐸 푒 = 푒 ÷ 1 + 퐸 푒 = 푒 ÷ 1 + 퐸

Page S-27 THE EULER PARAMETERS

Robinson’s Technical Report 58-17 derives the transformation of vector components from an axes system which is considered to be fixed to one that is rotated. One of the ways he derives this transformation is through the use of Euler’s Theorem (pages 4-9). Euler’s Theorem states that any real rotation between axes systems can be expressed in terms of a single specified angle (say ) about an axis of rotation whose orientation is specified by the angles (say 훼, 훽, 훾 ) it makes with respect to either axes system. The result of the derivation is the transformation matrix:

(휉 − 휂 − 휏 + 휒) 2(휉휂 + 휏휒) 2(휉휏 − 휂휒) 2(휉휂 − 휏휒)(−휉 + 휂 − 휏 + 휒) 2(휂휏 + 휉휒) 2(휉휏 + 휂휒) 2(휂휏 − 휉휒)(−휉 − 휂 + 휏 + 휒)

where 휉, 휂, 휏, 휒 represent the Euler parameters:

휇 휉 = cos 훼 sin 2 휇 휂 = cos 훽 sin 2 휇 휏 = cos 훾 sin 2 휇 휒 = cos 2

This transformation matrix is, of course, the same as the previously given one in terms of the 푒 :

(푒 − 푒 − 푒 + 푒 ) 2(푒푒 + 푒푒) 2(푒푒 − 푒푒) 2(푒푒 − 푒푒)(푒 − 푒 + 푒 − 푒 ) 2(푒푒 + 푒푒) 2(푒푒 + 푒푒) 2(푒푒 − 푒푒)(푒 + 푒 − 푒 − 푒 )

Therefore,

휇 푒 = 휒 = cos 2 휇 푒 = 휏 = sin cos 훾 2 휇 푒 = 휂 = sin cos 훽 2 휇 푒 = 휉 = sin cos 훼 2

Both of these transformation matrices are rotations whose elements are direction cosines. In the LM Equations of Motion, they transform M-frame components of a vector into B-frame components of the same vector. Therefore,

푔 푔 푔 (휉 − 휂 − 휏 + 휒 ) 2(휉휂 + 휏휒) 2(휉휏 − 휂휒) 푔 푔 푔 = 2(휉휂 − 휏휒)(−휉 + 휂 − 휏 + 휒 ) 2(휂휏 + 휉휒) 푔 푔 푔 2(휉휏 + 휂휒) 2(휂휏 − 휉휒)(−휉 − 휂 + 휏 + 휒)

Page S-28 Comparison of like elements yields the following equations for 휒, 휉, 휂, 휏 in terms of the M-frame to B-frame direction cosines:

4휒 = 1 + 푔 + 푔 + 푔 4휉 = 1 + 푔 − 푔 − 푔 4휂 = 1 − 푔 + 푔 − 푔 4휏 = 1 − 푔 − 푔 + 푔 and, in order to determine the signs of 휉, 휂, 휏 :

4휒휂 = 푔 − 푔 4휒휏 = 푔 − 푔 4휒휉 = 푔 − 푔 where 휒 may be assumed to always be positive.

THE RELATIONSHIP OF THE QUATERNION TO THE LM EULER ANGLES

It has been found (for example, see pages 10-12 of Robinson’s technical report) that the following complex 2x2 matrix represents a 3x3 real transformation matrix:

(푒 + 푖푒 )(푒 + 푖푒 ) Η = (−푒 + 푖푒)(푒 − 푖푒)

When H represents the M-frame to B-frame transformation (rotation) matrix and Η,Η,Η represent the LM Euler angle rotations 휃, 휓, 휙 ,

Η = ΗΗΗ

Since the first LM Euler angle rotation is about the 푌 axis, 휇 = 휃, cos 훽 = 1, cos 훼 = cos 훾 = 0 , and:

휃 푒 = cos 2

푒 = 푒 = 0

휃 푒 = sin 2

Therefore, 휃 휃 cos sin Η = 2 2 휃 휃 − sin cos 2 2

Page S-29 Since the second rotation is about the displaced 푍 axis as a consequence of the first rotation, 휇 = 휓, cos 훾 = 1, cos 훼 = cos 훽 = 0 , and:

휓 푒 = cos 2

휓 푒 = sin 2

푒 = 푒 = 0

Therefore, 휓 휓 cos + 푖 sin 0 Η = 2 2 휓 휓 0 cos − 푖 sin 2 2

The third rotation takes place about the 푋 axis and 휇 = 휙, cos 훼 = 1, cos 훽 = cos 훾 = 0, 푒 = cos , 푒 = sin , and

휙 휙 cos 푖 sin Η = 2 2 휙 휙 푖 sin cos 2 2

Therefore:

Page S-30 휙 휙 휓 휓 휃 휃 (푒 + 푖푒 )(푒 + 푖푒 ) cos 푖 sin cos + 푖 sin 0 cos sin = 2 2 2 2 2 2 (−푒 + 푖푒 )(푒 − 푖푒 ) 휙 휙 휓 휓 휃 휃 푖 sin cos 0 cos − 푖 sin − sin cos 2 2 2 2 2 2

휙 휙 휓 휓 휃 휓 휓 휃 cos 푖 sin cos + 푖 sin cos cos + 푖 sin sin = 2 2 2 2 2 2 2 2 휙 휙 휓 휓 휃 휓 휓 휃 푖 sin cos cos − 푖 sin − sin cos − 푖 sin cos 2 2 2 2 2 2 2 2

휙 휓 휓 휃 휙 휓 휓 휃 휙 휓 휓 휙 휙 휓 휓 휃 cos cos + 푖 sin cos + 푖 sin cos − 푖 sin − sin cos cos + 푖 sin sin + 푖 sin cos − 푖 sin cos = 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 휙 휓 휓 휃 휙 휓 휓 휃 휙 휓 휓 휃 휙 휓 휓 휃 푖 sin cos + 푖 sin cos + cos cos − 푖 sin − sin 푖 sin cos + 푖 sin sin + cos cos − 푖 sin cos 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2

휙 휓 휃 휙 휓 휃 휙 휓 휃 휙 휓 휃 휙 휓 휙 휙 휓 휃 휙 휓 휃 휙 휓 휃 cos cos cos + 푖 cos sin cos − 푖 sin cos sin − sin sin sin cos cos sin + 푖 cos sin sin + 푖 sin cos cos + sin sin cos = 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 휙 휓 휃 휙 휓 휃 휙 휓 휃 휙 휓 휃 휙 휓 휃 휙 휓 휃 휙 휓 휃 휙 휓 휃 푖 sin cos cos − sin sin cos − cos cos sin + 푖 cos sin sin 푖 sin cos sin − sin sin sin + cos cos cos − 푖 cos sin cos 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2

휙 휓 휃 휙 휓 휃 휙 휓 휃 휙 휓 휃 휙 휓 휙 휙 휓 휃 휙 휓 휃 휙 휓 휃 cos cos cos − sin sin sin + 푖 cos sin cos − sin cos sin cos cos sin + sin sin cos + 푖 cos sin sin + sin cos cos = 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 휙 휓 휃 휙 휓 휃 휙 휓 휃 휙 휓 휃 휙 휓 휃 휙 휓 휃 휙 휓 휃 휙 휓 휃 − sin sin cos + cos cos sin + 푖 sin cos cos + cos sin sin cos cos cos − sin sin sin + 푖 sin cos sin − cos sin cos 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2

and by equating like terms:

휙 휓 휃 휙 휓 휃 푒 = cos cos cos − sin sin sin 2 2 2 2 2 2 휙 휓 휃 휙 휓 휃 푒 = cos sin cos − sin cos sin 2 2 2 2 2 2 휙 휓 휙 휙 휓 휃 푒 = cos cos sin + sin sin cos 2 2 2 2 2 2 휙 휓 휃 휙 휓 휃 푒 = cos sin sin + sin cos cos 2 2 2 2 2 2

Page S-31 The same relationships for Η,Η,Η can be obtained by equating:

(푒 − 푒 − 푒 + 푒 ) 2(푒푒 + 푒푒) 2(푒푒 − 푒푒) 2(푒푒 − 푒푒)(푒 − 푒 + 푒 − 푒 ) 2(푒푒 + 푒푒) 2(푒푒 + 푒푒) 2(푒푒 − 푒푒)(푒 + 푒 − 푒 − 푒 ) to:

(cos 휓 cos 휃) (sin 휓) (−cos 휓 sin 휃) (−cos 휙 sin 휓 cos 휃 − sin 휙 sin 휃)(cos 휙 cos 휓)(cos 휙 sin 휓 sin 휃 + sin 휙 cos 휃) (sin 휙 sin 휓 cos 휃 + cos 휙 sin 휃)(− sin 휙 cos 휓)(− sin 휙 sin 휓 sin 휃 + cos 휙 cos 휃)

During the first rotation through , 휓 = 휙 = 0 and by comparing like elements:

푒 − 푒 − 푒 + 푒 = cos 휃 2(푒푒 + 푒푒) = 0 2(푒푒 − 푒푒) = − sin 휃 2(푒푒 − 푒푒) = 0 푒 − 푒 + 푒 − 푒 = 1 2(푒푒 + 푒푒) = 0 2(푒푒 + 푒푒) = sin 휃 2(푒푒 − 푒푒) = 0 푒 + 푒 − 푒 − 푒 = cos 휃

These equations are satisfied if and only if 푒 = 푒 = 0 . Therefore, 푒 and 푒 can be obtained from:

푒 − 푒 = cos 휃 푒 + 푒 = 1

By adding these equations:

1 + cos 휃 휃 2푒 = 1 + cos 휃 or 푒 = = cos 2 2

By subtracting the first equation from the second equation:

1 − cos 휃 휃 2푒 = 1 − cos 휃 or 푒 = = sin 2 2

where = cos and = sin are half angle trigonometric relationships.

Page S-32 cos sin Thus, upon substitution into Η , Η = as before. − sin cos

The use of this same procedure for the second rotation results in the relationships:

푒 − 푒 − 푒 + 푒 = cos 휓 푒 + 푒 − 푒 − 푒 = 1

Since 휃 = 휙 = 0 for the second rotation, using the same reasoning as before 푒 = 푒 = 0 and the above equations reduce to:

푒 − 푒 = cos 휓 푒 + 푒 = 1

The addition of these equations gives:

1 + cos 휓 휓 2푒 = 1 + cos 휓 or 푒 = = cos 2 2

The subtraction of the first equation from the second equation gives:

1 − cos 휓 휓 2푒 = 1 − cos 휓 or 푒 = = sin 2 2

cos + 푖 sin 0 and upon substitution into Η , Η = as before. 0 cos − 푖 sin

Once again using this procedure for the third rotation results in the relationships:

푒 − 푒 − 푒 + 푒 = 1 푒 + 푒 − 푒 − 푒 = cos 휙 and since 푒 = 푒 = 0 :

푒 + 푒 = 1 푒 − 푒 = cos 휙

Page S-33 and by adding and subtracting these equations:

1 + cos 휙 휙 2푒 = 1 + cos 휙 or 푒 = = cos 2 2

1 − cos 휙 휙 2푒 = 1 − cos 휙 or 푒 = = sin 2 2

cos 푖 sin and upon substitution into Η , Η = as before. 푖 sin cos

Page S-34 THE EVALUATION OF THE LM EULER ANGLES

휃, 휓, and 휙 can be found from their sines and cosines which in turn are obtained by equating the like elements in the M-frame to B-frame transformation matrices:

(cos 휓 cos 휃) (sin 휓) (−cos 휓 sin 휃) 푔 푔 푔 (−cos 휙 sin 휓 cos 휃 + sin 휙 sin 휃)(cos 휙 cos 휓) (cos 휙 sin 휓 sin 휃 + sin 휙 cos 휃) = 푔 푔 푔 (sin 휙 sin 휓 cos 휃 + cos 휙 sin 휃)(− sin 휙 cos 휓)(− sin 휙 sin 휓 sin 휃 + cos 휙 cos 휃) 푔 푔 푔

Thus, sin 휓 = 푔 and because −90° ≤ 휓 ≤ +90° , cos 휓 = +1 − sin 휓 , sin 휃 = −푔 ÷ cos 휓 and cos 휃 = 푔 ÷ cos 휓 , sin 휙 = −푔 ÷ cos 휓 and cos 휙 = 푔 ÷ cos 휓 .

However, as 휓 approaches ±90° , cos 휓 approaches zero and the sines and cosines of 휓 and 휃 lose their definitions. In order to artificially maintain their definitions when cos 휓 ≤ 휖∗, where 휖∗ is a threshold where division by cos 휓 is no longer practicable, 휃 is frozen at its current value, and the sine and cosine of 휙 are evaluated using the relationships:

sin 휙 = 푔 sin 휃 + 푔 cos 휃 cos 휙 = 푔 sin 휃 + 푔 cos 휃

This technique ensures that the sum (휃 + 휙) will be correct to order 휖∗ when cos 휓 ≤ 휖∗ . This allows the sines and cosines to be evaluated at all relative angular displacements of the B-frame with respect to the M-frame. The sequence of evaluation is:

sin 휓 = 푔 cos 휓 = +1 − sin 휓

Then, provided cos 휓 ≥ 휖∗ :

sin 휃 = −푔 ÷ cos 휓 cos 휃 = 푔 ÷ cos 휓

When cos 휓 < 휖∗ , sin 휃 and cos 휃 are frozen the their current values and:

sin 휙 = 푔 sin 휃 + 푔 cos 휃 cos 휙 = 푔 sin 휃 + 푔 cos 휃

Having obtained the sines and cosines of 휃, 휓, and 휙 , the angles 휃, 휓, and 휙 are found by using an arcsine algorithm M, the sign of their cosines, and by observing that when the cosine of an angle is ≥ 0 , the angle lies between −90° and +90° ; and when it is < 0 , the angle lies between 90° and 270° . The graphical representation of the sine and cosine of an angle as a function of the value of an angle is:

Page S-35 Figure S-4: Graphical Representation of the Sine and Cosine of an Angle

Thus, if the arcsine algorithm yields values of an angle between −90° and +90° , when the cosine of the angle is positive the angle lies between −90° and +90° . When it is negative the angle lies between 90° and 270° . So, when the cosine of an angle is ≥ 0 , the output of the arcsine algorithm will be an angle between −90° and +90° . When the cosine is < 0, the output of the algorithm will be an angle between 90° and 270°, given by 180° minus the angle output of the arcsine algorithm.

Derivation of the equations used for sin 휙 and cos 휙 :

푔 sin 휃 = (−cos휙sin휓cos휃 +sin휙sin휃) sin 휃 푔 cos 휃 = (cos휙sin휓sin휃 +sin휙cos휃) cos 휃

푔 sin 휃 + 푔 cos 휃 = sin 휙 (sin 휃 + cos 휃) = sin 휙

푔 sin 휃 = (sin휙sin휓cos휃 +cos휙sin휃) sin 휃 푔 cos 휃 = (−sin휙sin휓sin휃 +cos휙cos휃) cos 휃

푔 sin 휃 + 푔 cos 휃 = cos 휙 (sin 휃 + cos 휃) = cos 휙

Page S-36 THE M-FRAME TO S-FRAME TRANSFORMATION

BACKGROUND INFORMATION

The Moon revolves around the Earth at 2160 miles/hour and rotates at the same speed. Thus, only one side faces the Earth. However, because the Moon’s orbit is elliptical (not exactly circular) the Moon’s orbital speed varies and because of gravitational perturbations an oscillation in the apparent aspect of the Moon as seen from the Earth allows approximately 59% of the Moon’s surface to be seen from the Earth. This oscillation is called lunar libration.

Celestial equator: the plane which is perpendicular to the axis of the Earth.

Ecliptic: the great circle formed by the intersection of the plane of the Earth’s orbit with the celestial sphere.

Equinoctial point: either of the two points in which the celestial equator and the ecliptic intersect each other.

Longitude: the arc of the ecliptic measured eastward from the vernal equinox to the foot of the great circle passing through the poles of the ecliptic and the point on the celestial sphere in question.

Vernal equinox: the time when the sun crosses the plane of the Earth’s equator into the northern hemisphere.

Node: either of the two points at which the orbit of a heavenly body cuts the plane of the ecliptic.

Meridian: a great circle passing through the poles and any given point on the surface of either the Earth or the Moon.

Obliquity of the ecliptic: the angle between the plane of the Earth’s orbit and that of the Earth’s equator, equal to about 23° 27΄.

M-frame: an axes system (푋, 푌, 푍) centered at the center of the Moon which is parallel to the inertial axes centered at the center of the Earth. The 푋 and 푌 axes lie in a plane which is parallel to the mean Earth equator of date, whose 푍 axis is parallel to the Earth’s mean spin vector, and whose 푋 axis points toward the mean equinox of date.

S-frame: the selenographic axes (푋, 푌, 푍) which are centered at the center of the Moon, but unlike the M-frame they rotate with the rotation of the Moon. The 푋 and 푌 axes lie in the plane of the Moon’s equator, with the 푋 axis directed toward the center of the Earth. The 푍 axis is out the lunar pole.

Page S-37 Figure S-5: The GAEC Derivation, part 1 of 2 (from Grumman Aerospace Engineering Corporation (GAEC), 1965, p.1723) THE GAEC DERIVATION Page S-38 Figure S-6: Relation between M-Frame and Selenographic Frame (S-frame) (from Grumman Aerospace Engineering Corporation (GAEC), 1965, p.1681)

Page S-39 Figure S-7: The GAEC Derivation, part 2 of 2 (from Grumman Aerospace Engineering Corporation (GAEC), 1965, pp.1724-25)

Page S-40 A MORE DETAILED DERIVATION

The M-frame (푋, 푌, 푍) is Moon-centered and parallel to an Earth-centered frame of reference (the E-frame (푋, 푌, 푍) ) whose 푋 axis points toward the mean equinox of date, whose 푋 and 푌 axes lie in the plane of the mean Earth equator of date, and whose 푍 axis is along the Earth’s mean spin vector of date. These relationships are shown in Figure S-8 below. Note that the rotations shown in Figure S-6 previously are not Earth-centered. However, there is no loss of generality since the M-frame is parallel to the E-frame.

Figure S-8: Inertial Earth (E-frame) and Moon (M-frame) Geometry (adapted from Grumman Aerospace Engineering Corporation (GAEC), 1965, pp.1676)

Page S-41

The projection of the Moon’s orbit onto the ecliptic plane (the plane of the Earth’s orbit) is shown below:

Earth Ω ☾

The Moon in orbit above the ecliptic plane

In Figure S-6, ☾ −Ω has been substituted for the angle −푋 makes with the mean ascending node of the lunar orbit. As explained by Grumman in their derivation, the angles are the same. Also in Figure S-6, 푋 is parallel to 푋 which lies in both the ecliptic plane and the Earth’s equatorial plane; 푌 is parallel to 푌 which lies in the Earth’s equatorial plane; and 푍 is parallel to 푍 which is perpendicular to the Earth’s equatorial plane. Figure S-6 further shows that five rotations are required to transform M-frame vector components into S-frame vector components before the lunar libration is taken into account. These rotations are shown with respect to the Earth’s center starting with an initial alignment with the E-frame. Let the rotating axes be called 푋, 푌, 푍 for Earth-centered S-frame.

The first rotation is about 푋 (which is directed toward the mean equinox of date) through the angle (휖) that the ecliptic plane makes with the Earth’s equatorial plane. The intersection of the two planes passes through the Earth’s center. The transformation which is associated with this rotation is:

푉 1 0 0 푉 푉 = 0 cos 휖 sin 휖푉 푌 푉 0 −sin 휖 cos 휖 푉 휖

휖 푌 where:

푍 is parallel to the ecliptic pole, 푋 is directed toward the mean equinox of date, and 푋 and 푌 lie in the ecliptic plane. Figure S-9: Projection of the Moon's Orbit onto the Ecliptic Plane

Page S-42

The second rotation is about 푍 through the angle (Ω) that the line to the mean ascending node of the lunar orbit makes with the line to the mean equinox of date. The associated transformation is:

Toward the mean equinox of date 푋 Ω

푋 푉 cosΩ sinΩ 0 푉 Toward the mean ascending Ω 푉 = −sinΩ cosΩ 0 푉 node of the lunar orbit 푉 0 0 1 푉

푌 푌

푋 lies at the intersection of the plane of the lunar equator and the ecliptic plane.

The third rotation is about −푋 through the angle (Ι) that the plane of the lunar equator makes with the ecliptic plane. They intersect at the mean ascending node of the lunar orbit. The associated transformation is:

푍 푍

Ι 푉 1 0 0 푉 푉 = 0 cosΙ −sinΙ푉 푌 푉 0 sinΙ cosΙ 푉 Ι

푍 is parallel to the line from the Moon’s center to the lunar pole and 푋 and 푌 lie in the extended plane of the lunar equator.

The fourth rotation is about 푍 through the angle the line from the Earth’s center to the Moon’s center makes with the mean ascending node of the lunar orbit. This angle lies in the extended plane of the lunar equator and, as explained in the GAEC derivation above, is equal to

Page S-43 ☾ −Ω, the angle the mean longitude of the Moon ☾ makes with the line to the mean ascending node of the lunar orbit which is measured in the ecliptic plane. The associated transformation is:

☾ − Ω

푌 푉 cos☾ −Ω sin☾ −Ω 0 푉 푉 푉 = −sin☾ −Ω cos☾ −Ω 0 푉 0 0 1 푉 ☾ − Ω

푋 푋

푋 points from the center of the Earth to the center of the Moon. 푋 is directed from the center of the Moon to the center of the Earth. Therefore, when 푋, 푌, 푍 is substituted for 푋, 푌, 푍 , the line from the Earth’s center to the Moon’s center must be pointed away from the center of the Moon. This requires a fifth rotation through 180° (휋). The transformation associated with this rotation is:

푉 −1 0 0 푉 푌 푌 푉 = 0 −1 0 푉 푉 0 0 1 푉

푋, 푌, 푍 are Earth-centered. 푋 lies along the extension of the line from the Moon’s center to the Earth’s center and points away from the Moon.

Upon substitution, the 푉, 푉, 푉 to 푉, 푉, 푉 transformation is:

Page S-44

푉 −1 0 0 cos ☾ −Ω sin ☾ −Ω 0 푉 푉 = 푉 0 −1 0 −sin ☾ −Ω cos ☾ −Ω 0 푉 0 0 1 푉 0 0 1

−cos ☾ −Ω −sin ☾ −Ω 0 푉 = 푉 sin ☾ −Ω −cos ☾ −Ω 0 푉 0 0 1

Upon further substitutions, the 푉, 푉, 푉 to 푉, 푉, 푉 transformation is:

푉 −cos ☾ −Ω −sin ☾ −Ω 0 1 0 0 푉 = sin ☾ −Ω −cos ☾ −Ω 0 0 cosΙ −sinΙ 푉 0 sinΙ cosΙ 0 0 1

cosΩ sinΩ 0 1 0 0 푉 × −sinΩ cosΩ 0 0 cos 휖 sin 휖푉 0 0 1 0 −sin 휖 cos 휖 푉

Figure S-6 shows the rotations associated with these transformations after 푋, 푌, 푍 has been substituted for 푋, 푌, 푍 . After this substitution has been made and taking the lunar libration into account by including the lunar libration matrix 퐿 , the M-frame to S-frame transformation is:

−cos −Ω −sin −Ω 0 푉 퐿 퐿 퐿 ☾ ☾ 1 0 0 푉 = 퐿 퐿 퐿 sin ☾ −Ω −cos ☾ −Ω 0 0 cosΙ −sinΙ 푉 퐿 퐿 퐿 0 sinΙ cosΙ 0 0 1

cosΩ sinΩ 0 1 0 0 푉 × −sinΩ cosΩ 0 0 cos 휖 sin 휖푉 0 0 1 0 −sin 휖 cos 휖 푉

The 퐿 and the angles ☾ , Ι, Ω, and ϵ are supplied by the ephemeris for the Earth-Moon system. The M-frame to S-frame transformation shown above is the same as that given in the GAEC derivation, where:

퐹 = (푥, 푦, 푧) 퐹 = (푥, 푦, 푧) 푎 = [푎][푎][푎][푎]푎

In the transformation shown above:

Page S-45 퐹 = 푉, 푉, 푉

퐹 = 푉, 푉, 푉 and, 푉 푉 푉 = 푎푉 푉 푉

When 푉, 푉, 푉 are (푥, 푦, 푧) and 푉, 푉, 푉 are (푥, 푦, 푧) :

푥 푎 푎 푎 푥 푦 = 푎 푎 푎푦 푧 푎 푎 푎 푧 and when 푃, 푃, 푃 are 푉, 푉, 푉 and 푃, 푃, 푃 are 푉, 푉, 푉 :

푃 푎 푎 푎 푃 푃 = 푎 푎 푎푃 푃 푎 푎 푎 푃

Page S-46

VECTOR ALGEBRA AND DIRECTION COSINES

VECTOR COMPONENTS

A vector is a directed line in space. It is represented by 푉. The magnitude of 푉 is 푉 and its direction is specified by a unit vector ℓ . The following figure shows that with respect to an orthogonal axes system 푋, 푌, 푍 :

푉 = 푉ℓ = (푉 cos 훼)푖 + (푉 cos 훽)푗 + (푉 cos 훾)푘 where: 훼, 훽, 훾 are the angles 푉 makes with 푋, 푌, 푍 ; 푖, 푗, 푘 are unit vectors along 푋, 푌, 푍 ; and 푉 cos 훼 , 푉 cos 훽 , 푉 cos 훾 are the components of 푉 .

Let the components of 푉 be represented by:

푉 = 푉 cos 훼 푉 = 푉 cos 훽 푉 = 푉 cos 훾 then:

푉 = 푉ℓ = 푉푖 + 푉푗 + 푉푘 and by the Pythagorean Theorem:

½ ½ ½ 푉 = 푉 + 푉 + 푉 = 푉 + 푉 + 푉

Also, since the magnitude of ℓ is 1, let 푉 =1 , then:

ℓ = cos 훼푖 + cos 훽푗 + cos 훾푘

Since 훼, 훽, 훾 specify the direction of 푉, they are called the direction angles of 푉 and cos 훼 , cos 훽 , cos 훾 are called the direction cosines of 푉 .

Page S-47 푋 푖 푉 푉 =푉 푖 +푉 푗 +푉 푘 훼 훾 푉푘 푍 푖

훽 푉

푉푘 푌

Figure S-10: Definition of the Vector 푉

VECTOR ALGEBRA

The sum and difference of two vectors is:

푉 ± 푉 = (푉 ± 푉)푖 + 푉 ± 푉푗 + (푉 ± 푉)푘

The dot product of two vectors is defined as:

푉 ⋅ 푉 = 푉푉 cos 휃

where 휃 is the angle 푉 makes with 푉 and the dot product of two unit vectors is defined as:

푖 ⋅ 푖 = 푗 ⋅ 푗 = 푘 ⋅ 푘 =1

푖 ⋅ 푗 = 푗 ⋅ 푖 = 푖 ⋅ 푘 = 푘 ⋅ 푖 = 푗 ⋅ 푘 = 푘 ⋅ 푗 =0

Therefore,

푉 ⋅ 푉 = 푉푖 + 푉푗 + 푉푘 ⋅ 푉푖 + 푉푗 + 푉푘 = 푉푉 + 푉푉 + 푉푉

The cross product of two vectors is defined as:

푉 × 푉 = 푉푉 sin 휃

where 휃 is the angle 푉 makes with 푉 and the cross product of two unit vectors is defined as:

Page S-48

푖 × 푖 = 푗 × 푗 = 푘 × 푘 =0 푖 × 푗 =−푗 × 푖 = 푘

푗 × 푘 =−푘 × 푗 = 푖 푘 × 푖 =−푖 × 푘 = 푗

Therefore,

푉 × 푉 = 푉푖 + 푉푗 + 푉푘 × 푉푖 + 푉푗 + 푉푘

= 푉푉 − 푉푉푖 + (푉푉 − 푉푉)푗 + 푉푉 − 푉푉푘

THE TRANSFORMATION OF VECTOR COMPONENTS

Let 푋, 푌, 푍 be an axes system which is rotated with respect to another axes system 푋, 푌, 푍 as shown in the following figure:

푉 푖 푉

푉푘

Figure S-11: (푋, 푌, 푍) rotated with respect to (푋, 푌, 푍)

Page S-49

By definition, then,

푉 = 푉푖 + 푉푗 + 푉푘 = 푉푖 + 푉푗 + 푉푘

푉 equals the projection of 푉, 푉, 푉 onto 푋 . Therefore,

푉 = 푉 cos∠푋, 푋 + 푉 cos∠푋, 푌 + 푉 cos∠푋, 푍

For convenience, let: 휉 = cos∠푋, 푋 휉 = cos∠푋, 푌 휉 = cos∠푋, 푍 then:

푉 = 휉푉 + 휉푉 + 휉푉

In a similar way,

푉 = 푉 cos∠푌, 푋 + 푉 cos∠푌, 푌 + 푉 cos∠푌, 푍

= 휉푉 + 휉푉 + 휉푉 where: 휉 = cos∠푌, 푋 휉 = cos∠푌, 푌 휉 = cos∠푌, 푍 and, 푉 = 푉 cos∠푍, 푋 + 푉 cos∠푍, 푌 + 푉 cos∠푍, 푍

= 휉푉 + 휉푉 + 휉푉 where: 휉 = cos∠푍, 푋 휉 = cos∠푍, 푌 휉 = cos∠푍, 푍

Thus, the direction cosines 휉 (푖, 푗 = 1,2,3) transform the 푋, 푌, 푍 components of 푉 into the

푋, 푌, 푍 components of 푉 . This transformation is represented by:

푉 휉 휉 휉 푉 푉 = 휉 휉 휉푉 푉 휉 휉 휉 푉 and by a similar process,

Page S-50

푉 휉 휉 휉 푉 푉 = 휉 휉 휉푉 푉 휉 휉 휉 푉

The direction cosine matrix 휉 and its transpose 휉 are called transformation matrices. UNIT VECTOR RELATIONSHIPS

Since,

푉푖 = 휉푉 푖 + 휉푉푗 + 휉푉푘

푉푗 = 휉푉푖 + 휉푉푗 + 휉푉푘

푉푘 = 휉푉푖 + 휉푉푗 + 휉푉푘 let 푉, 푉, 푉, 푉, 푉, 푉 represent magnitudes of the unit vectors. Then since the magnitude of a unit vector is equal to 1, 푉 = 푉 = 푉 = 푉 = 푉 = 푉 =1 , and:

푖 = 휉푖 + 휉푗 + 휉푘

푗 = 휉푖 + 휉푗 + 휉푘

푘 = 휉푖 + 휉푗 + 휉푘

Also, since,

푉푖 = 휉푉푖 + 휉푉푗 + 휉푉푘

푉푗 = 휉푉푖 + 휉푉푗 + 휉푉푘

푉푘 = 휉푉푖 + 휉푉푗 + 휉푉푘 by similar reasoning,

푖 = 휉푖 + 휉푗 + 휉푘

푗 = 휉푖 + 휉푗 + 휉푘

푘 = 휉푖 + 휉푗 + 휉푘

THE DIRECTION COSINE IDENTITIES

When 푋, 푌, 푍 and 푋, 푌, 푍 are right-handed, orthogonal axes systems, the dot and cross products of the unit vectors in the two axes systems produce 21 direction cosine identities.

Twelve of the 21 identities are produced by the dot products 푖 ⋅ 푖, 푗 ⋅ 푗, 푘 ⋅ 푘, 푖 ⋅ 푖,

푗 ⋅ 푗, 푘 ⋅ 푘, 푖 ⋅ 푗, 푖 ⋅ 푘, 푗 ⋅ 푘, 푖 ⋅ 푗, 푖 ⋅ 푘, and 푗 ⋅ 푘 . The nine other identities are produced by the cross products 푖 × 푗 = 푘, 푗 × 푘 = 푖, 푘 × 푖 = 푗 . Since,

Page S-51 푖 = 휉푖 + 휉푗 + 휉푘

푗 = 휉푖 + 휉푗 + 휉푘

푘 = 휉푖 + 휉푗 + 휉푘 푖 = 휉푖 + 휉푗 + 휉푘

푗 = 휉푖 + 휉푗 + 휉푘

푘 = 휉푖 + 휉푗 + 휉푘 the dot product results are:

Page S-52

푖 ⋅ 푖 = 휉푖 + 휉푗 + 휉푘 ⋅ 휉푖 + 휉푗 + 휉푘 = 휉 + 휉 + 휉 = 푖푖 cos∠푋, 푋 =1⋅1⋅1=1

푗 ⋅ 푗 = 휉푖 + 휉푗 + 휉푘 ⋅ 휉푖 + 휉푗 + 휉푘 = 휉 + 휉 + 휉 = 푗푗 cos∠푌, 푌 =1⋅1⋅1=1

푘 ⋅ 푘 = 휉푖 + 휉푗 + 휉푘 ⋅ 휉푖 + 휉푗 + 휉푘 = 휉 + 휉 + 휉 = 푘푘 cos∠푍, 푍 =1⋅1⋅1=1

푖 ⋅ 푖 = 휉푖 + 휉푗 + 휉푘 ⋅ 휉푖 + 휉푗 + 휉푘 = 휉 + 휉 + 휉 = 푖푖 cos∠푋, 푋 =1⋅1⋅1=1

푗 ⋅ 푗 = 휉푖 + 휉푗 + 휉푘 ⋅ 휉푖 + 휉푗 + 휉푘 = 휉 + 휉 + 휉 = 푗푗 cos∠푌, 푌 =1⋅1⋅1=1

푘 ⋅ 푘 = 휉푖 + 휉푗 + 휉푘 ⋅ 휉푖 + 휉푗 + 휉푘 = 휉 + 휉 + 휉 = 푘푘 cos∠푍, 푍 =1⋅1⋅1=1

푖 ⋅ 푗 = 휉푖 + 휉푗 + 휉푘 ⋅ 휉푖 + 휉푗 + 휉푘

= 휉휉 + 휉휉 + 휉휉 = 푖푗 cos∠푋, 푌 =1⋅1⋅0=0

푖 ⋅ 푘 = 휉푖 + 휉푗 + 휉푘 ⋅ 휉푖 + 휉푗 + 휉푘

= 휉휉 + 휉휉 + 휉휉 = 푖푘 cos∠푋, 푍 =1⋅1⋅0=0

푗 ⋅ 푘 = 휉푖 + 휉푗 + 휉푘 ⋅ 휉푖 + 휉푗 + 휉푘

= 휉휉 + 휉휉 + 휉휉 = 푗푘 cos∠푌, 푍 =1⋅1⋅0=0

푖 ⋅ 푗 = 휉푖 + 휉푗 + 휉푘 ⋅ 휉푖 + 휉푗 + 휉푘

= 휉휉 + 휉휉 + 휉휉 = 푖푗 cos∠푋, 푌 =1⋅1⋅0=0

푖 ⋅ 푘 = 휉푖 + 휉푗 + 휉푘 ⋅ 휉푖 + 휉푗 + 휉푘

= 휉휉 + 휉휉 + 휉휉 = 푖푘 cos∠푋, 푍 =1⋅1⋅0=0

푗 ⋅ 푘 = 휉푖 + 휉푗 + 휉푘 ⋅ 휉푖 + 휉푗 + 휉푘

= 휉휉 + 휉휉 + 휉휉 = 푖푘 cos∠푌, 푍 =1⋅1⋅0=0

Page S-53 The identities obtained by taking the cross products 푖 ×푗 =푘, 푗 ×푘 =푖, 푘 ×푖 =푗 are:

푖 ×푗 = 휉푖 +휉푗 +휉푘 × 휉푖 +휉푗 +휉푘 =휉푖 +휉푗 +휉푘 =푘 or, upon completion of the cross product:

( ) ( ) ( ) 푖 ×푗 = 휉휉 −휉휉 푖 + 휉휉 −휉휉 푗 + 휉휉 −휉휉 푘 and by equating like terms:

휉 =휉휉 −휉휉 휉 =휉휉 −휉휉 휉 =휉휉 −휉휉

푗 ×푘 = 휉푖 +휉푗 +휉푘 × 휉푖 +휉푗 +휉푘 =휉푖 +휉푗 +휉푘 =푖 or,

( ) ( ) ( ) 푗 ×푘 = 휉휉 −휉휉 푖 + 휉휉 −휉휉 푗 + 휉휉 −휉휉 푘 and by equating like terms:

휉 =휉휉 −휉휉 휉 =휉휉 −휉휉 휉 =휉휉 −휉휉

푘 ×푖 = 휉푖 +휉푗 +휉푘 × 휉푖 +휉푗 +휉푘 =휉푖 +휉푗 +휉푘 =푗 or,

( ) ( ) ( ) 푘 ×푖 = 휉휉 −휉휉 푖 + 휉휉 −휉휉 푗 + 휉휉 −휉휉 푘 and by equating like terms:

휉 =휉휉 −휉휉 휉 =휉휉 −휉휉 휉 =휉휉 −휉휉

Page S-54

For convenient reference, the 21 direction cosine identities are repeated below:

휉 + 휉 + 휉 =1 휉 + 휉 + 휉 =1 휉 + 휉 + 휉 =1

휉 + 휉 + 휉 =1 휉 + 휉 + 휉 =1 휉 + 휉 + 휉 =1

휉휉 + 휉휉 + 휉휉 =0 휉휉 + 휉휉 + 휉휉 =0 휉휉 + 휉휉 + 휉휉 =0

휉 휉 + 휉 휉 + 휉 휉 =0 휉휉 + 휉휉 + 휉휉 =0 휉휉 + 휉휉 + 휉휉 =0

휉 = 휉휉 − 휉휉 휉 = 휉휉 − 휉휉 휉 = 휉휉 − 휉휉

휉 = 휉휉 − 휉휉 휉 = 휉휉 − 휉휉 휉 = 휉휉 − 휉휉

휉 = 휉휉 − 휉휉 휉 = 휉휉 − 휉휉 휉 = 휉휉 − 휉휉

Some of the above identities are also obtained from the relationship: 푉 + 푉 + 푉 = 푉 + 푉 + 푉 . Thus,

휉푉 + 휉푉 + 휉푉 + 휉푉 + 휉푉 + 휉푉 + 휉푉 + 휉푉 + 휉푉 = 푉 + 푉 + 푉

휉푉 + 휉푉 + 휉푉 +2휉푉 휉푉 +2휉푉휉푉 +2휉푉휉푉 + 휉푉 + 휉푉 + 휉푉 +2휉푉휉푉 +2휉푉휉푉 +2휉푉휉푉 + 휉푉 + 휉푉 + 휉푉 +2휉푉휉푉 +2휉푉휉푉 +2휉푉휉푉 = 푉 + 푉 + 푉

Then in order for equality to result:

휉 + 휉 + 휉 = 1 휉휉 + 휉휉 + 휉휉 =0 휉 + 휉 + 휉 =1 휉휉 + 휉휉 + 휉휉 =0 휉 + 휉 + 휉 =1 휉휉 + 휉휉 + 휉휉 =0

Page S-55 THE M-FRAME TO B-FRAME TRANSFORMATION USING THE COEFFICIENTS OF A QUATERNION NUMBER

QUATERNION NUMBER ALGEBRA

A quaternion number 푞=푠+푖푎+푗푏+푘푐 is an extension of the complex number 푠+푖푎 where 푠,푎,푏,푐 are real numbers and 푖=푗=푘= √−1 . The products of 푖,푗,푘 are:

푖⋅푖=푗⋅푗=푘⋅푘=−1 and by definition:

푖⋅푗=−푗⋅푖=푘 푗⋅푘=−푘⋅푗=푖 푘⋅푖=−푖⋅푘=푗

The sum and difference of two quaternion numbers is:

푞 ±푞 = (푠 ±푠) +푖(푎 ±푎) +푗(푏 ±푏) +푘(푐 +푐)

The product of two quaternion numbers is:

푞푞 = (푠 +푖푎 +푗푏 +푘푐)(푠 +푖푎 +푗푏 +푘푐) =푠푠 − (푎푎 +푏푏 +푐푐) +푖(푏푐 −푐푏) +푗(푐푎 −푎푐) +푘(푎푏 −푏푎) and,

푞푞 =푠푠 − (푎푎 +푏푏 +푐푐) +푖(푏 푐 −푐 푏 ) +푗(푐푎 −푎푐) +푘(푎푏 −푏푎)

Thus, 푞푞 −푞푞 =2[푖(푏푐 −푐푏) +푗(푐푎 −푎푐) +푘(푎푏 −푏푎)]

The conjugate of 푞 is 푞 =푠− (푖푎+푗푏+푘푐) . Therefore,

1 푞 푞 푞푞 =푠 +푎 +푏 +푐 and 푞 = = = 푞 푞푞 푠 +푎 +푏 +푐

Page S-56

THE TRANSFORMATION

The transformation of 푉, 푉, 푉 to 푉, 푉, 푉 is given by:

[푠 − (푖푎 + 푗푏 + 푘푐)]휔 + 푖푉 + 푗푉 + 푘푉(푠 + 푖푎 + 푗푏 + 푘푐) 휔 + 푖푉 + 푗푉 + 푘푉 = (푠 + 푎 + 푏 + 푐) which upon completion of the product on the right-hand side results in the expression:

휔 + 푖푉 + 푗푉 + 푘푉 = {휔(푠 + 푎 + 푏 + 푐 ) +푖(푠 + 푎 − 푏 − 푐 )푉 +2(푎푏 + 푐푠)푉 +2(푎푐 − 푏푠)푉 +푗2(푎푏 − 푐푠)푉 + (푠 − 푎 + 푏 − 푐 )푉 +2(푎푠 + 푏푐)푉 +푘2(푎푐 + 푏푠)푉 +2(푏푐 − 푎푠)푉 + (푠 − 푎 − 푏 + 푐 )푉 ÷ (푠 + 푎 + 푏 + 푐)

Then, provided that 푠 + 푎 + 푏 + 푐 =1 , by comparison of like terms the M-frame to B-frame transformation is:

푉 (푠 + 푎 − 푏 − 푐 ) 2(푎푏 + 푐푠) 2(푎푐 − 푏푠) 푉 푉 = 2(푎푏 − 푐푠) (푠 − 푎 + 푏 − 푐 ) 2(푎푠 + 푏푐) 푉 푉 2(푎푐 + 푏푠) 2(푏푐 − 푎푠) (푠 − 푎 − 푏 + 푐 ) 푉

Thus, the quaternion (푒, 푒, 푒, 푒) is equal to the quaternion (푠, 푐, 푏, 푎) where 푠, 푎, 푏, 푐 are the coefficients of the quaternion number 푞 = 푠 + 푖푎 + 푗푏 + 푘푐 when 푠 + 푎 + 푏 + 푐 =1 .

Page S-57 REFERENCES

Bettwy, T.S. and Baker, K.L. (1967). LM/AGS Flight Equations Narrative Description. [pdf] TRW Report No. 05952-6076-T000, dated 25 January 1967. Redondo Beach, CA: TRW Systems Group. Available at: http://www.ctandi.org/s/1967-01-25-LM-AGS-Flight-Equations.pdf [Accessed 6 March 2020].

Goldstein, H. (1959). Classical Mechanics. Sixth Printing – June 1959. Reading, MA: Addison-Wesley Publishing Company, Inc.

Grumman Aircraft Engineering Corporation (1965). LEM Mission Simulator (LMS) Math Model: True Motion Equations. [pdf, part 1 of 3] Report No. LED-440-3, dated 8/1965. Bethpage, NY: Grumman Aircraft Engineering Corporation. Available at: http://www.ctandi.org/s/1965-08-LEM-Mission-Simulator-Math-Model-1-130-1-65.pdf [Accessed 6 March 2020].

National Aeronautics and Space Administration (1965). Project Apollo Coordinate System Standards. Document Number SE-008-001-1, dated June 1965. Washington, DC: NASA.

Robinson, A.C. (1958). On the Use of Quaternions in Simulation of Rigid-Body Motion. Wright Air Development Center (WADC) Technical Report No. 58-17, dated December 1958. Wright- Patterson Air Force Base, OH: United States Air Force.

Page S-58