Software
The onboard guidance software used a Kalman filter to merge new data with past position measurements to produce an optimal position estimate for the spacecraft. The key information was a coordinate transformation between the IMU stable member and the two reference coordinate systems, one centered on Earth and one centered on the Moon. In the argot of the Apollo program this matrix was known as REFSMMAT (for "Reference to a Stable Member Matrix").
Read more about this topic: Apollo PGNCS