Live data from Hacker News

Original Apollo 11 Guidance Computer source code for command and lunar modules

github.com

41–50 of 66 posts

Re: Original Apollo 11 Guidance Computer source code for command and lunar modules

#41
post #30

This is such an interesting peek into the engineering of these sort of systems with very constrained resources at the time. Like any random file you open contains little pragmatic design decisions like this https://github.com/chrislgarry/Apollo-11/blob/master/Comanch... # THE POSITION OF THE MOON IS STORED IN THE COMPUTER IN THE FORM OF # A NINTH DEGREE POLYNOMIAL APPROXIMATION WHICH IS VALID OVER A 15 # DAY INTERVAL…

Given the constant launch delays how could they justify hard coding a 15 day window like this?

The coefficients are stored in writable memory as input data. Only the structure and degree of the polynomial are hard-coded in the program. So if the launch is delayed you just change the data.

Of course, the justification is that compute and memory were at an extreme premium on the spacecraft. Accurately predicting the position of the moon at arbitrary times requires more complicated calculations. You can dramatically optimize the calculation by fitting a polynomial approximation which is valid for the length of the mission. And there's no reason to waste resources fitting that polynomial in space when it could be done on the ground, using much more powerful machines.

The AGC is what tends to get the press. It's easy to forget that the Apollo program relied on a cutting-edge distributed hardware and software stack, most of which was in Mission Control at the Real Time Computing Center.

Re: Original Apollo 11 Guidance Computer source code for command and lunar modules

#42
https://github.com/chrislgarry/Apollo-11/blob/master/Comanch...

I feel like "BEWARE"... is, given the context, what we would now likely call "load-bearing"

  COMPTGO  EXTEND             # USED TO COMPUTE TTOGO
           QXCH     PHSPRDT6  # ** GROUP 6 TEMPORARY USED .. BEWARE **

(edit: formatting)

Re: Original Apollo 11 Guidance Computer source code for command and lunar modules

#43

For an terrific AGC deep dive, I can’t recommend Marc’s restoration videos enough. The work they did was incredible: https://youtube.com/playlist?list=PL-_93BVApb59FWrLZfdlisi_x...

This remains to be my go-to example for how YouTube can be a remarkably effective and valuable platform for the kind of enthusiast whose interests have exceeded the bounds of typical documentaries and media produced for the general public.

It’s sadly getting more difficult to surface these kinds of examples, as we’re seeing a lot of lowest common denominators and slop-py channels run by people who only want to be YouTube content mills, rather than people who have expertise to share and who learned to leverage YouTube as a means to those ends.

Re: Original Apollo 11 Guidance Computer source code for command and lunar modules

#46
post #38

I think I read somewhere around here the code could be run today on something as low powered as the chip that runs the USB charger for an iphone So yeah I'd like to see that lol

Ostensibly the ability to run the old lunar navigation code explains where many of these chargers disappeared to.

Re: Original Apollo 11 Guidance Computer source code for command and lunar modules

#47

For an terrific AGC deep dive, I can’t recommend Marc’s restoration videos enough. The work they did was incredible: https://youtube.com/playlist?list=PL-_93BVApb59FWrLZfdlisi_x...

Not sure in which video (pretty sure it was one of Marc's videos) it was mentioned, but what I found particularly interesting is that they restored the source code by just cherry picking patches documented elsewhere until the output matched the documented checksums...

Re: Original Apollo 11 Guidance Computer source code for command and lunar modules

#48
post #30

This is such an interesting peek into the engineering of these sort of systems with very constrained resources at the time. Like any random file you open contains little pragmatic design decisions like this https://github.com/chrislgarry/Apollo-11/blob/master/Comanch... # THE POSITION OF THE MOON IS STORED IN THE COMPUTER IN THE FORM OF # A NINTH DEGREE POLYNOMIAL APPROXIMATION WHICH IS VALID OVER A 15 # DAY INTERVAL…

The Apollo program set a requirement for a fourteen day mission from the beginning. None of the missions lasted that long; the longest was Apollo 17 at 12 and a half days.

The Space Shuttle flight software used an interpolating polynomial for the solar ephemeris, with coefficients that were valid 10+ years (I've forgotten the exact number). The solar position was an input to the atmosphere model used to compute on-orbit drag, which itself was itself an interpolating function for data generated by a model with higher fidelity. I could go on. The pattern of using interpolation formulas to save memory and CPU cycles was (is) a common one.

People would be surprised by the amount of data required for on-board guidance and navigation software. Some of it is non-mission specific, but much of it must be generated for each mission. During the Shuttle era, these parameters were called I-Loads (for Initialization, of course) and were a separate memory load from the flight software itself.

Re: Original Apollo 11 Guidance Computer source code for command and lunar modules

#50
post #33

the code that landed humans on the moon has 72k stars on github and your startup's monorepo still can't pass CI on the first try

Not the same goals, risks, monetary budget, time budget. If your goal was to absolutely prevent any errors and you would go great lengths to do it, you would. Just look at any safety critical systems: medical, transportation. There has been some incidents, but some systems do work really well that are developed today.

> monetary budget

I’ve never attempted to calculate it, but I’ve always felt that the money lost from major incidents must outweigh the additional engineering time spent doing things right. Of course, that assumes that the engineering skill exists, and that the deliberate choice is being made to push out sub-optimal code in favor of velocity (which is then negated by the incidents anyway).

Post reply on HN