Before simulating a spacecraft, we need to establish certain conventions that serve as an absolute reference for our position and attitude. To this end, I’m planning to borrow the coordinate system used by the Apollo Spacecraft.

Using this model, we can describe spacecraft motion and maneuvers as either translation along a particular axis or rotation about one or more axes.

**Roll**is described as rotation about the X axis.**Pitch**is described as rotation about the Y axis.**Yaw**is described as rotation about the Z axis.

Spacecraft attitude, then, can be described by giving three angular measurements that describe the current degree of roll, pitch, and yaw. Likewise, we can describe rotation or tumbling of the spacecraft as a series of vectors that describe the rate at which the spacecraft is revolving about each axis.

Translation of the spacecraft along a particular axis describes how the overall mass of the spacecraft is moving – regardless of attitude. In the initial boost phase following launch, the principle motion of the spacecraft is “upward” – describing positive translation along the X axis. Likewise, the force of gravity is found acting in opposition to thrust along the X-axis. Wind can act upon either the Y or Z axis and cause the craft to deviate off course.

Shortly after liftoff, the spacecraft performs a roll maneuver to align the spacecraft on it’s heading relative to the Earth’s equator. Likewise a pitch maneuver marks the beginning of a gravity turn that allows the spacecraft to move in a particular direction as well as “up” away from the surface of the Earth. These initial maneuvers will determine the ballistic (and hopefully) orbital trajectory the spacecraft takes.

In order to describe the spacecraft’s absolute position and movement away from its point of origin, we need to measure its movement along each of the axes and maintain a record of its velocity along each axes. We also need to estimate the current mass of the spacecraft to determine the properties of thrust and acceleration. Obviously, the mass of the spacecraft is constantly changing as fuel and oxidizer are expended. Likewise, the overall thrust of the craft is changing due to changes in atmospheric pressure and expansion of the gasses at various altitude.

Overall, our first task in simulating the flight of a spacecraft involves the *integration* of these and other parameters to describe the motion of the spacecraft. Wherever possible, the mathematics will be simplified so that the Apple II Plus can calculate these values in real-time (or at least approximate them in real-time.)