Simple AGC: Difference between revisions

From Project Apollo - NASSP
Jump to navigation Jump to search
imported>Mark Grant
(→‎Program Alarms: - alarm table)
imported>Mark Grant
(→‎Verb, Noun and Program Summary: - program list: this isn't up-to-date)
Line 119: Line 119:


==Verb, Noun and Program Summary==
==Verb, Noun and Program Summary==
This section summarises the Verbs, Nouns and Programs used in this version of the AGC. Note that while many of these are identical or very similar to the real AGC, others are very different. Use the [[Virtual AGC]] documentation for flying with the Virtual AGC.


{|class="wikitable"
{|class="wikitable"
Line 170: Line 172:
|99||
|99||
Confirm burn
Confirm burn
|}
{|class="wikitable"
!width="100"|Program|| Action
|-
|00
||Idle
|-
|01
||Pre-launch IMU alignment
|-
|02
||Pre-launch setup
|-
|06
||Computer standby mode
|-
|11
||Launch control
|-
|15
||TLI burn
|-
|33
||Orbit altitude control
|-
|63
||LEM: descent autopilot setup
|-
|68
||LEM: landing confirmation
|}
|}


[[Category:Apollo Guidance Computer]]
[[Category:Apollo Guidance Computer]]

Revision as of 17:07, 25 November 2006

Project Apollo has its own implementation of the Apollo Guidance Computer (AGC) software in C++. Some of the real programs are simulated along with a number of programs which did not exist in the real AGC, but are useful in Orbiter.

Pre-Launch

Diagram of DSKY interface for reference, showing LM and CM lightsA15_DELCO

When you first start up your scenario the AGC will spend about thirty seconds running through its self-test program on the DSKY, just like a PC does. On a real Saturn V this would check all the computer hardware, but since we can pretty much guarantee that your PC is going to multiply and divide correctly if it's managing to run Windows, here it just does the final stage, and tests the display by outputting a selection of test patterns.

If you get bored, just hit 10x time acceleration briefly. Once the lights have turned off, the computer goes into standby mode with displays blanked and just the STDBY light lit. If you start the engines it will automatically start up as they ignite.

However, if you prefer to do things the 'proper' way, press the PROG key on the DSKY to start the computer. VERB 37 will flash on the display: this is the 'change program' verb: the computer is currently idling in program 00, but suggesting that you enter a new program to run. So press 'NOUN', then 0, then 1, then ENTER.

Note that whenever you enter data into the DSKY you will have to enter initial zeros in this way if the data would not otherwise require you to enter a digit in a specific column. If you attempt to enter too many digits, or attempt to ENTER a VERB/NOUN combination that isn't supported, the OPR ERR light will light up. Press RSET to reset the error indication and continue.

If you are entering data into the DSKY when the computer wishes to display information, the KBD REL light will light up. If you're finished with the keypad then press the KEY REL button and the computer will now be able to use the display; otherwise, typically, it will display the information it wants to show you after you finish entering the data you're typing in.

VERB 37 NOUN 01 will run the initial IMU alignment program: in Orbiter in merely lights the NO ATT light briefly and then changes automatically to program 02, in a real Saturn V this would align the IMU to the appropriate angles that have been entered into the computer and then switch to program 02.

Program 02 is the pre-launch setup program. You can use this to check the planned orbit from the scenario file, update the orbit and launch times, or simply ignore it and the computer will use the scenario values.

The program will start with a flashing VERB 06 NOUN 29. This shows the launch azimuth in hundredths of a degree on the top line of the display, and allows you to change it from the historically correct value if you choose.

To update the information on these lines you need to change the displayed values, then press PROG to enter them into the AGC. To update the first line, use VERB 21 ENTER, for the second VERB 22 ENTER , for the third VERB 23 ENTER. To update the first and second in sequence use VERB 24 ENTER, for all three use VERB 25 ENTER.

When you enter data the DSKY will blank the appropriate line. Press '+' or '-' to begin data entry (octal entry is not yet supported), then type in the digits, with preceding zeros when required. Once you type in all five digits, the value will be saved ready to be passed to the AGC. Note that if you make a mistake while entering the number, you can press CLR to clear the entry and try again. So, you can use VERB 21 ENTER to change the azimuth value, then press PROG to accept the value being displayed. Alternatively, if you're happy with the value, use VERB 33 ENTER to 'proceed without data': the computer will then use the displayed azimuth value for the launch.

Either way, the computer will respond with a flashing VERB 06 NOUN 44, displaying the desired apogee and perigee in tens of meters. Again, update them if desired, or use VERB 33 ENTER to continue.

The computer will respond with a flashing VERB 06 NOUN 33, displaying the time to liftoff: hours on the first line, minutes on the second line, and hundredths of a second on the third line.

If you wish to change your launch time, update the values on the display, then press PROG to load them into the computer. If you want to monitor the launch time, enter VERB 16 ENTER, which will switch to updating the countdown time roughly twice per second.

Launch

So you're ready to launch. When the countdown reaches zero the AGC will start the engines, automatically switch to program 11 and activate the autopilot. If for some reason this should fail, then you can press VERB 75 ENTER or VERB 37 NOUN 11 ENTER to start the program manually: of course unless there's a horrid bug, this isn't going to happen :).

The program will switch to VERB 16 NOUN 62: Verb 06 and 16 are two which are very useful to know: Verb 06 means 'display the information for this noun', and can be used to check the current value of various internal variables. Verb 16 is the same, except rather than show just the value at the time you press ENTER, it will update automatically roughly twice per second.

Different Nouns will display different information. Noun 62 will display three lines on the DKSY, the first is the velocity relative to Earth in meters per second, the second is the vertical velocity in meters per second, and the third is the altitude in kilometers.

To monitor the orbit information, either press VERB 82 ENTER or VERB 16 NOUN 44 ENTER (note that if either the Verb or Noun you wish to execute is already displayed, there's no need to type it in again: if, for example, the display was showing VERB 16 NOUN 62, you could just press NOUN 44 ENTER to switch). Noun 44 again displays three lines. The first is the apogee altitude in kilometers, the second the perigee altitude in kilometers, and the third is approximately the time in minutes and seconds to freefall to 300,000 feet if the engines were shut down: the latter is useful in planning aborts, as 300,000 feet is approximately the level where re-entry heating begins. If you haven't yet achieved a trajectory that will take you above 300,000 feet, or are moving too fast to return to that altitude, it will display 59:59.

Note that a real Apollo capsule wouldn't use SI units: instead, velocity would be measured in feet per second and altitudes in nautical miles. The code does have an option to switch to realistic units, but currently there's no way to enable that: it will be an option in the future for those who really want to do it the 'proper' way :).

If, at some point, you feel like flying manually, then enter VERB 46 ENTER. This will toggle the autopilot state each time you enter it.

Finally, when you reach orbit and the SIVB stage shuts down, the computer will disable the autopilot and prompt you to switch programs with a flashing VERB 37 again. You might as well enter NOUN 00 ENTER to switch to the idle program, to disable the computer for the time being.

TLI Burn

To perform the TLI burn, you need to run program 15. So, start with VERB 37 NOUN 15 ENTER to begin running that program.

Now use your favorite MFD to calculate the burn ejection time and delta-V. I've used the Transfer MFD, but this should work with TransX too.

The computer will respond with a flashing VERB 06 NOUN 33. This displays the time to ejection in hours (top line), minutes (middle line) and hundredths of seconds (bottom line). Skip time until the time to ejection in the MFD display is around 1300 seconds. Now enter VERB 22 ENTER to change the value of the minutes field. Press '+00020' to indicate twenty minutes, and wait. Watch the time to ejection count down and when it hits 1200 seconds, press PROG to update the time for the computer. You've now told the program when to make the TLI burn. The display will switch to VERB 06 NOUN 14. This is one line, the delta-V for the burn.

Press VERB 21 ENTER to update the delta V. Now press '+' and enter the value with appropriate leading zeros. For example, if your burn delta-V is going to be 3183 m/s, enter '+03183'. When you're done, press PROG.

The computer will perform some calculations and respond with a flashing VERB 06 NOUN 95. This shows the burn details. The top line is the time to engine ignition, the middle line the delta-V, and the bottom line the velocity for engine cutoff. The time to ignition will not be the value you just entered, as it allows for the burn duration and engine startup.

Now you can sit and wait, or skip time towards ignition. If you want a countdown, then press VERB 16 ENTER to monitor the burn values.

Along the way a few things will happen to keep you awake. About nine and a half minutes before ignition the UPLINK ACTY light will come on for a few seconds. About 1 minute and 45 seconds to ignition the display will blank briefly, then switch into countdown mode with VERB 16 NOUN 95.

About 1 minute and 30 seconds to ignition the computer will enable prograde mode, if it's not already enabled: it will then keep it active throughout the burn and turn it off at the end. At this point, if you forgot to set the RCS pitch and yaw switches for the SIVB you'll suddenly realise... luckily you have a few seconds to hit them and still be ready for the burn.

If you change your mind before ignition, then press VERB 34 ENTER to terminate the current program. If entered after ignition this will shut down the SIVB, but you will have used up your single restart. After the engines ignite, the display will change. Although it's still NOUN 95, it will now show an approximate countdown to engine shutoff in the top line, the remaining delta-V in the middle, and the cutoff velocity in the bottom line. If you want to monitor the state of your orbit, you can use VERB 16 NOUN 44 to display apogee, perigee and current altitude.

One thing you will notice is that the cutoff velocity in the NOUN 95 display will change during the burn. As the engine runs, you begin to climb away from Earth, and as a result you lose velocity. On a real Saturn V NASA would have calculated the cutoff velocity taking that loss into account, but the MFDs don't do so, therefore the computer performs the calculations in realtime as the engine runs.

When the engine cuts off, you should be within about 1 m/s of the correct velocity. If you're further out you can probably fine-tune with the SM RCS once you've seperated the LM from the SIVB.

The countdown on the DSKY will stop at zero, so press PROG. That will give you a flashing VERB 37 to remind you to change programs, at this point you might as well enter NOUN 00 ENTER to switch the AGC to idle, or NOUN 06 ENTER and then PROG to put it in standby mode.

Generic programs and data

Program 06 is the AGC standby program. Enter VERB 37 NOUN 06 ENTER to switch to program 06. It will then flash VERB 50 NOUN 25: this is a generic message from the computer telling you to perform a checklist action... the appropriate action will be displayed on the first line. In this case it is '00062', which means 'press the PROG key to put the AGC into standby'. Press that key and the displays will be blanked and the STDBY light come on. Press the PROG key again to bring the AGC out of standby.

Noun 38 shows the time since the AGC was booted. Noun 73 shows the altitude, velocity and angle of attack, the latter in hundredths of a degree.

Program Alarms

If an error occurs in a program, it will light the PROG light on the DSKY and raise a program alarm. In some cases this will abort the program that's running, in others it will continue but you should consider corrective action. If you don't care, then just press RSET to clear the light and the record of the alarms.

To display the program alarms, use VERB 05 NOUN 09. This shows three lines: the first is the first alarm to occur since pressing RSET was pressed, the second is the second alarm to occur since RSET was pressed, and the third is the most recent alarm. If more than three alarms occur after pressing RSET, any others are lost.


Program Alarm Meaning
603

Not enough time for orientation prior to burn

21521

Program 01 selected in orbit

Program Checksums

VERB 91 will display the program bank checksums. In NASSP this is absolutely useless (in fact the checksums are pseudo-random as I haven't found the real checksum numbers yet), but in a real Apollo this was an important tool for verifying that the correct programs were loaded into the AGC core memory. The first line is the checksum, the second line is the bank number and the third is more checksum: to be valid, the first checksum must be equal to the bank number or negative bank number (in octal), and the second checksum gives more information. To display more banks, use VERB 33 ENTER to cycle through them.

Displaying Erasable Memory

'Erasable Memory' was the AGC equivalent of modern RAM. The program was stored in fixed core memory, while data which might change (e.g. Current time, landing site location) was stored in erasable memory. Of course this meant that the astronauts needed a way to examine and change the memory.

To examine memory locations, use VERB 01 NOUN 02 ENTER. This will switch the R2 display to octal (base-8) and blank the R1 display, while flashing the verb and noun display to remind you that you need to do something. Enter a memory location in R1, and press PROG. The value of the erasable memory location will be displayed in R2, and the program will blank R1 again so you can enter a new memory location.

If, instead, you want to monitor a memory location as the data changes, use VERB 01 NOUN 02. As above, enter a memory address in R1 and press PROG. Rather than give you the option of entering another location, the verb and noun display will stop flashing and R2 will be continually updated with the contents of the memory location. Location (octal) 00025 is a good one to use, as it simulates the 10 millisecond timer on the real AGC.

Of course, since the memory is just simulated, this doesn't really help a huge amount. However, you can view various variables that control the AGC operation if you know how the program works, and will be able to change the program's operation by changing those variables.

To update an erasable memory location, use VERB 21 NOUN 02. Enter the address in R1 (in Octal) and the data in R2. Press PRO to update the erasable memory.

Verb, Noun and Program Summary

This section summarises the Verbs, Nouns and Programs used in this version of the AGC. Note that while many of these are identical or very similar to the real AGC, others are very different. Use the Virtual AGC documentation for flying with the Virtual AGC.

Verb Action
01

With noun 02, display contents of erasable memory location

03

Display R1 in octal

04

Display R1 & R2 in octal

05

Display R1, R2 and R3 in octal

06

Display data in decimal

11

With noun 02, monitor contents of erasable memory location

16

Monitor data in decimal

33

Proceed without data

34

Terminate current program

37

Run program

46

Select manual control during launch

69

Restart

75

Start launch control program

82

Display orbit information during launch

91

Display memory checksum

99

Confirm burn

Program Action
00 Idle
01 Pre-launch IMU alignment
02 Pre-launch setup
06 Computer standby mode
11 Launch control
15 TLI burn
33 Orbit altitude control
63 LEM: descent autopilot setup
68 LEM: landing confirmation