The Apollo Guidance and Navigation System was a combination of optical sensors, gyroscopes, a digital computer, and other devices, which managed the guidance and navigation of the Apollo Command, Service, and Lunar modules during the journey from Earth orbit to the Moon and back.