Berkeley CSUA MOTD:Entry 53173
Berkeley CSUA MOTD
 
WIKI | FAQ | Tech FAQ
http://csua.com/feed/
2025/05/25 [General] UID:1000 Activity:popular
5/25    

2009/7/21-24 [Computer/SW/Compilers, Computer/SW/OS/OsX] UID:53173 Activity:kinda low
7/21    http://lambda-the-ultimate.org/node/3522
        Read the Apollo 11 code comment. Bugless? Yeah right.
        \_ Who claimed that that code was bugless?
           \_ if it was bugless then astronauts wouldn't be necessary
              \_ They're not necessary except to do research. We don't need
                 them to fly anything.
                 \_ "Houston, we've had a problem"
                    \_ Wouldn't have been an issue at all if the astronauts
                       weren't up there to begin with. The O2 was for them.
Cache (3884 bytes)
lambda-the-ultimate.org/node/3522
blog post announces that some of the source code for the Apollo 11 spacecraft has been put online. On this day 40 years ago, Neil Armstrong and Buzz Aldrin became the first humans to walk on the Moon. This was quite an achievement for mankind and a key milestone in world history. To commemorate this event the Command Module code (Comanche054) and Lunar Module code (Luminary099) have been transcribed from scanned images to run on yaAGC (an open source AGC emulator) by the Virtual AGC and AGS project. Since we LTUers spend a lot of time talking about the highest of the high level languages it's illuminating to see how much was done with so little. The source also shows that flying to the moon is really not that different from the kind of programming most programmers do every day. interview with one of the developers He mentions that the software was written in a higher level language called MAC (MIT Algebraic Compiler) and then hand compiled down to the assembly code that we can see now on google code. It would be really cool if the MAC code was available too since that seems to be where most of the actual development of the system happened. Allan told me about a fascinating series of events that could have easily prevented the first moon landing and might have caused disaster. Allan was the principal designer of the LM's descent guidance program which steered the LM by gimballing and throttling the descent engine. Whenever the computer commanded the engine to increase or decrease thrust, the engine (and LM) reacted after a short time lag. Allan's descent program needed a routine to accurately estimate the new thrust level, which could be accomplished by reading the "delta-V" (change in velocity) measured by the LM's accelerometers. He wrote a short routine that took into consideration, ie, compensated for, the engine's lag time, which TRW's "interface control document", full of useful information for the programmers, said was 03 seconds. It took 03 seconds for the LM's descent engine to achieve whatever thrust level the computer might request. The final version of the thrust routine, which was put into the LM, was written by Allan's friend Don Eyles. Eyles was sufficiently enthusiastic about the programming challenge that he found a way of writing it which required compensating for only 02 of the 03 seconds. The IBM 360 simulator showed Eyles' program worked beautifully. His routine was aboard Apollos 11 and 12 which landed successfully. However, telemetry transmitted during the landings later showed something to be very wrong. The engines were surging up and down in thrust level, and were barley stable. A guy at Johnson Space Center called Allan and informed him that the LM's engine was not a 03-second-lag engine afterall. It had been improved some time before Apollo 11's launch such as to lower the lag time to only 0075 seconds. Correction of this item in the interface control document had simply been overlooked. Once this discrepency was discovered, the IBM 360 simulator was reprogrammed to properly simulate the actual, faster engine. Running on the simulator, Don Eyle's thrust program, with the 02-second compensation, exhibited the surging that had occured on the real flights. But here's the most interesting fact: the simulator also showed that had Allan Klumpp chose to "correct" Don Eyles' program by compensating for the full 03 seconds that was printed in the document, the LM would have been unstable and Apollo 11 would never have been able to land. By pure luck, Don Eyles was creative enough to write the thrust routine in a way that kept the LM just inside the stability enveloppe and allowed successful landings! I guess before you have a stack-discipline for recursion, using continuations is an obvious thing to do... Then again, you can argue whether, in the absence of a stack, they're really subroutines...