Contents of the STSORBIT.DOC file
Space Shuttle Orbit Simulation
May 06, 1989
by David H. Ransom, Jr.
Rancho Palos Verdes, CA
BBS: (213) 541-7299
Program STSORBIT Space Shuttle Orbit Simulation Page 1
Program STSORBIT is an orbital tracking and display program for use
during Space Shuttle missions or for simulating a mission. STSORBIT is free
for non-commercial use. Use it if you like it, discard it if you don't.
There are no warranties of any kind. If you wish to use STSORBIT
commercially, write for license information. For current information and
the most recent version of the program, call my bulletin board system (BBS)
at the number given on the title page. If the BBS has not answered by the
third ring, hang up, wait TWO MINUTES, then call back; the system has a
power controller and if the system is off, it takes that long for my old
(but reliable!) XT-compatible BBS computer to boot and do its housekeeping
Program STSORBIT is intended to display the approximate orbital
position and track on a global map during a typical NASA Space
Transportation System mission, better known as the Space Shuttle. When used
with an EGA or VGA video adapter, the display is in color; CGA systems can
only present "high resolution" graphics in monochrome. Unfortunately, NASA
does not publish or make available very precise information as to the
orbital parameters either before or during a "normal" mission; military
missions, of course, are almost completely blacked out. It is something of
a challenge, therefore, to devise a program which will at least come close
and which, as more or different information becomes available, will permit
the program's data to be updated "on the fly".
My thanks to Brian K. Jones and his program SUNMAP (also available on
my BBS), an excellent program in its own right, for the map coordinate data
file used in that program. SUNMAP served as a demonstration that a
reasonable world map display WAS possible, particularly on EGA and VGA
monitors, and encouraged me to start this STSORBIT project.
And thanks as well to all those individuals who have taken the time to
call me or leave me a message on the BBS with comments and suggestions.
While I haven't been able to implement every suggestion, many are now
NOTE: Version 8918 is a preliminary release of program
STSORBIT and only the minimum of testing has been performed in an
effort to "get it out there" in time for experimentation with the
launch of STS-30, the flight Atlantis and Magellan. The program
has been tested on systems equipped with color CGA, EGA, and VGA
monitors but no monochrome system was available. There are still
several known bugs, and a number of desired features are not yet
included. Even so, this version is a considerable step above the
Beta Version 8916. Comments and suggestions are invited.
David H. Ransom, Jr.
7130 Avenida Altisima
Rancho Palos Verdes, CA 90274
Program STSORBIT Space Shuttle Orbit Simulation Page 2
As with most of the programs which I have written recently that are
intended for public distribution and which include the full source code,
STSORBIT is written using Microsoft's QuickBASIC, Version 4.50. While not
necessarily the most efficient language that might have been used, it is
the best known computer language, the single language available to almost
all programmers regardless of experience or computer environment, and is
relatively inexpensive. Many of the SUB and FUNCTION procedures in STSORBIT
have been lifted more or less intact from my program ASTROCLK.
The initial premise of STSORBIT was to attempt to duplicate the wall
map in NASA's Mission Control Center in Houston. I have seen several other
programs which attempt to do that same task, but each fell short of my
objectives for one reason or another. It may be, of course, that others
will judge this effort lacking as well. One problem is that of size and
resolution: the wall map at Mission Control Center is some twenty feet wide
with an impressive pixel resolution, very different from the typical
personal computer and the size and resolution of its monitor. While the
wall map shows almost the entire globe in a cylindrical projection,
STSORBIT uses a cylindrical projection but restricts the vertical display
to the area between latitudes +80 degrees and -80 degrees in order to
achieve reasonable proportions and vertical resolution while at the same
time showing recognizable land features.
As a consequence of the basic inaccuracies relative to the orbital
parameters of a Space Shuttle mission while it is in progress, I have not
tried to be especially precise or painstaking with respect to the
mathematics. Additionally, mathematical complexity must be held to a
reasonable minimum if older computers not equipped with a math coprocessor
are to be able to maintain the presentation in real time. The higher
resolution and color graphics available with more advanced displays such as
the EGA and VGA greatly enhance the program, but my Zenith Z-183 laptop
emulates the older CGA graphics display in (blue) monochrome. Therefore, in
order to use my own program on all of my computers, STSORBIT maintains
compatibility with all three display standards.
A typical Space Shuttle orbit is nearly, but almost never exactly,
circular with an altitude of approximately one hundred thirty nautical
miles plus or minus thirty nautical miles and an inclination of from about
28 degrees through about 57 degrees. Occasional missions, especially
military missions, fly at higher altitudes and/or inclinations and often
use more elliptical orbits. Little of this information is known to very
good accuracy (if at all) by the casual listener. Requests to NASA Public
Affairs Office for more, better, and more timely orbital information have
been greeted with a prompt and polite response but they offer little hope
for any change in the policy regarding publicly released information during
the course of a mission.
Initially, therefore, the interested would-be mission observer may
have only the time of launch to initialize a tracking program. Given the
geographical coordinates of the Kennedy Space Center, assuming a circular
orbit, and using the typical altitude and inclination of a Space Shuttle
orbit, the data should be sufficient to give at least a rough idea of the
Shuttle's position for the first several orbits. After that, additional
information is required if the position is going to be very close.
Fortunately, Mission Control Center does occasionally announce the
orbital time, which is usually in the neighborhood of ninety minutes for an
Program STSORBIT Space Shuttle Orbit Simulation Page 3
orbit at an altitude of about one hundred miles, and if a television viewer
has access to NASA Select Television on Satcom F1R, Transponder 13, he will
periodically see a view of Mission Control Center's huge wall map on which
the current position of the Space Shuttle is always displayed. Using this
display, the careful viewer can make a visual estimate of the longitude of
the ascending or descending node, the point at which the orbit crosses the
Earth's equator; a VCR can be particularly handy in this situation since
the camera may not stay on the map for extended periods! By noting the
crossing time during the live broadcast and then using a "freeze frame"
technique to hold the image, the longitude can be estimated to an accuracy
of a few degrees. The same technique can be used, of course, to estimate
the position at any point in an orbit any time the map is "on camera". If
you are sufficiently patient and just a little lucky, the orbital time, the
time from one point in an orbit to the same point in the succeeding orbit,
can also be measured. The ascending and descending nodes are both the most
convenient mathematically and the easiest to estimate, but other points may
be used to derive an orbital time from a partial orbit. The resulting data,
orbital time and the position at a specific time, may then be entered into
STSORBIT to update the orbital position calculations. Not exactly high-tech
data acquisition, but it will have to suffice for now.
Given all of the uncertainties, I have so far not felt it necessary or
worthwhile to try to hone the mathematics of program STSORBIT beyond that
required to give an approximate position in real time. The more
enterprising reader is invited to do so, and I would appreciate feedback
should anyone make significant improvements to the program. In calculating
the current orbital longitude, for example, the program assumes a circular
orbit with an orbital inclination of zero degrees. For orbits with low
inclinations, as is typical for launches from Kennedy Space Center, these
errors are not particularly significant and are probably overshadowed by
the fundamental uncertainties in orbital parameters and by the limitations
imposed by display resolution. Orbits with higher inclinations, as would be
the case if near-polar launches from Vandenburg AFB in California are ever
initiated, would have much larger periodic errors which would be both
noticeable and objectionable. Should such launches ever seem likely, and
absent someone else doing it in the interim, I may refine the orbital
Particularly with the relatively low resolution (640x200) of a CGA
monitor, the display errors alone are significant; using an EGA or VGA
monitor improves the vertical resolution by about a factor of two (640x350
or 640x480, respectively), but does nothing to improve the horizontal
resolution. Software for the HGC (Hercules Graphics Card) has been included
but is untested; HGC users will note that of the 720 horizontal pixels
available, only the left 640 pixels are used in the present code. Higher
resolution monitors are available (at a price!) but are not in general use
and so are not suitable for a program such as STSORBIT which is intended
for public distribution.
STSORBIT displays a portion of the Earth using a cylindrical
projection of the surface area almost from one pole to the other; a small
area near each pole is omitted. Orbits may be plotted with an inclination
up to 60 degrees and are completely displayed. The map shows most of the
Earth's land boundaries and continental areas and major oceans are easily
recognizable. At any time, the display shows the Space Shuttle as a small
symbol, the projected orbit for approximately the next three orbits, and
the orbit track for the past orbit. When used with an EGA or VGA color
monitor, the coastal outlines are in cyan, the equator and longitude grid
Program STSORBIT Space Shuttle Orbit Simulation Page 4
are in blue, the Space Shuttle is in white, the projected orbit is in
green, and the orbit track is in red. On EGA and CGA monitors, the two TDRS
satellites are shown as a dot inside a small circle in yellow. CGA and
monochrome monitors, of course, display everything in a single color.
To start program STSORBIT, enter the following command:
STSORBIT (any color monitor, CGA/EGA/VGA)
STSORBIT /M (any monochrome monitor)
HGC USERS NOTE: Run the program MSHERC prior to
running STSORBIT. This Microsoft program works
with QuickBASIC 4.5 to enable use of the Hercules
Graphics Card. HGC OPERATION IS UNTESTED!
The program checks for the presence of a VGA or EGA and will execute in
color if one is found UNLESS the /M command line option is used to force
monochrome operation. In cases where a monochrome monitor is connected to
an adapter which simulates color with gray scale, the /M command line
option may be omitted but the various portions of the display may or may
not be visible. The /M command is not required for HGC and CGA graphics
operation, which is always monochrome. Naturally, the operation of the
program is enhanced by the use of a color monitor. The vertical resolution
is also adjusted depending upon the type of adapter which has been
detected. The program checks for the presence of a math coprocessor and
will use it if found.
STSORBIT first reads in the map coordinates from file STSORBIT.DAT,
which must be in the current drive and directory. These coordinates are
converted to screen coordinates for the type of monitor detected and stored
internally so that they need only be read once. For slower processors and
for systems without a math coprocessor, this may take several minutes;
there are over 8,200 sets of coordinates to process for the world map. By
processing the map data as it is loaded, the time to subsequently display
the map is much reduced.
The program then presents its Main Menu which allows the user to
select between a demonstration and manual data entry, as well as several
Space Shuttle Orbit Simulation
Current time: 13:12:29
Current date: 05/05/1989
D Demonstration of the STSORBIT (10X real time)
E Enter orbital information for STS launch
G Toggle map GRID. [Grid is now OFF]
R Resume previously saved STS mission
N Show most recent ascending and descending nodes [OFF]
A Adjust orbit longitude and orbit times
Program STSORBIT Space Shuttle Orbit Simulation Page 5
S DOS Shell (Version 3.x ONLY)
ESC Quit Program STSORBIT
Select the function desired:
Press the key corresponding to the function desired. The demonstration
and resuming previously saved mission proceed without further operator
intervention. The G command turns the GRID flag ON or OFF; this command is
only available for EGA and VGA monitors. If the flag is OFF, only the
equator and the meridians at 90 degree intervals are drawn. If the flag is
on, a more complete map grid is drawn with longitude every 30 degrees and
latitude every 10 degrees. The equator and prime meridian are highlighted
in bright blue and all other grid lines are in normal blue.
If you press ESC to quit the program and have manually entered orbital
data, STSORBIT will save all required mission data in file STSORBIT prior
to terminating. This will be the data available with the R command the next
time you execute the program. The demonstration data will not be saved,
preserving any previously saved mission data.
If you press E to request manual data entry, you will be prompted for
the required information. The file STSORBIT.NOT gives suggested data for
the launch of mission STS-30, Atlantis and Magellan, on May 4, 1989. As
information on subsequent missions becomes available, it will be posted on
my bulletin board system in the Astronomy and Science area, File Area #5,
or in the BULLETINS.
Enter mission title:
Enter the title of the mission, such as "STS-30 ATLANTIS" without the
quotation marks. If you press RETURN, the title "STS Mission Simulation"
will be used.
Enter single orbit time:
Enter the time in minutes if known; if not known, press RETURN to use 90
Enter orbit inclination:
Enter the inclination of the orbit in degrees; a decimal fraction is
allowed. For example, STS-30 is planned to have an inclination of 28.85
degrees. Press RETURN to default to 28.00 degrees.
Enter Launch Date (MM/DD/YYYY):
Enter the date in the format shown. The full four digit year is required
and be sure to use the SLASH "/" rather than the MINUS "-" as the
separator; STSORBIT's internal date algorithms will interpret the minus
sign as just that and some rather strange dates can result! You may also
use relative dates: -1 will use the prior day, +2 will use two days hence,
and so forth. Press RETURN to use today's date.
Enter Launch Time (H:M:S):
Enter the time in the format shown using 24-hour notation and local time.
Program STSORBIT Space Shuttle Orbit Simulation Page 6
One or two digit numbers may be used as required. [The comma is also
acceptable as a separator in place of the colon.] You may omit seconds or
minutes and seconds if desired. For example, an entry of "16" will be
entered as 16:00:00 or 4:00 PM. Press RETURN for "launch" ASAP, as soon as
possible; depending upon the system, this will be in from 30 to 60 seconds
from the current time.
Normal or fast time (N,f):
If the "launch" has not yet occured, this prompt will allow you to select
normal time (x1), x10, or x60 fast time for the display. Press RETURN to
select normal time. If you change your mind during the display, use the F
command to toggle the time (see below).
When the orbital parameters change in mid-mission, use the A command
to adjust the orbital period, orbital longitude, and time along orbital
track. This technique allows the "launch time" to remain correct, which in
turn assures that Mission Elapsed Time is correct, while adjusting the
orbital parameters so that the position is displayed correctly in later
orbits. In order to make these adjustments, the current orbital period is
required, along with the longitude and time of one or more equator
crossings (obtained from the NASA Television wall map). NASA is not too
good about making sure that the map is on the screen when the Shuttle makes
an equator crossing (Northbound is Ascending Node, Southbound is Descending
Node); they have a distressing tendency to cut away just before the
crossing. With sufficient patience, however, the data can be interpolated
from the television screen. In the case of STS-30, the orbital time at
Orbit 34 changed to 90.85 minutes and the longitude of the descending node
was approximately -36 degrees, crossing at 2/2:18:00 MET.
To make the adjustment, enter the original orbital data using the E
command or restore prior data using the R command. The plot will appear on
the screen. Observe the longitude of the node of interest and calculate the
difference from the desired longitude. Now press ESC to return to the Main
Menu, then press A to enter the adjusted data and enter the new orbital
time and the desired longitude adjustment. Leave the time adjustment set to
0 and view the plot to see that the orbit crosses the equator at the
correct longitude. Using the P key, pause the "catch up" plot as the
shuttle symbol approaches the equator to note the time of crossing.
Pressing the P key twice in rapid succession will advance the symbol one
minute along the track. Note the time and calculate the time difference,
then press ESC and A to return to the adjust menu where the time adjustment
may be entered. Press RETURN to keep correct items unchanged. The process
may be repeated several times until the plot correctly shows the orbit.
File STSORBIT.NOT gives the original data and the adjustments at Orbit 34
The N command enables the display of the most recent data for the
ascending and descending nodes (equator crossings). The data appears in the
lower left of the map area. During "catch up", the data is calculated every
60 seconds. During normal operation, data is calculated every second. This
information may be useful in adjusting orbital data with the A command.
If a system function is desired at the Main Menu, press S to execute
QuickBASIC's DOS SHELL function. This will return you to a DOS prompt. When
the Shell is executed, STSORBIT remains in memory and the map data will not
be re-read when you return. Enter "EXIT" (without the quotation marks) at
the DOS prompt when you wish to return to STSORBIT. CAUTION: The QuickBASIC
SHELL function is only reliable for versions of DOS of 3.0 or higher!
Program STSORBIT Space Shuttle Orbit Simulation Page 7
Systems with less than 640K memory may fail to execute the shell and
applications requiring large amounts of memory may also fail.
When you have finished with STSORBIT, press ESC at the Main Menu to
return to DOS. The map data is lost and will be re-read when you next use
Orbital calculations are performed every ten seconds in real time and
every second in "fast time", and the position of the Space Shuttle symbol
is updated at that frequency. The predicted orbit and past orbit track
markers are updated every sixty seconds, primarily to avoid "cluttering"
the display with too many dots scattered around. When the program is first
started, the first three predicted orbits are traced, the program counts
down to launch time, then the Space Shuttle appears. As the Space Shuttle
moves, the orbit track will be left behind until a full orbit is shown.
From that point on, approximately four orbits will be shown, three
predicted and one past; these orbits are relative to the current position
of the Space Shuttle and will constantly change with it.
The program may be operated in real time or in "fast time", which is
sixty or ten times normal time, after the launch. Orbital parameters may be
manually entered for the desired launch or a pre-programmed demonstration
may be run to permit the user to become familiar with the program and its
display. The lower section of the screen displays current data about the
mission as it progresses.
Once the orbital display is in progress, a number of keys are active:
ESC Return to Main Menu (abort this simulation)
P Pause, only the local date and time are undated. The plot is
frozen at the current position.
F Toggle FAST mode from x1 to x10 to x60 to x1, etc.
R Resynchronize MET with Local Time. Resets plot to real time.
NOTE: Resynchronization should only be performed when the
simulated time and local times are reasonably close to each
other. The plot may otherwise have some extraneous pixels
left around! This feature has not been extensively tested.
The Pause command is active in the normal as well as the "catch up" modes.
The Fast and Resynchronize commands are only active during the normal
plotting mode. The simulated time, taking into account any fast time that
may have been in effect up to that point, is shown at the lower left of the
screen. For reference, the launch time and the actual local time (as
determined by the computer's internal DOS clock) are also displayed. The
MET (Mission Elapsed Time) display at the lower right of the screen shows
the current elapsed time in the mission and will include an additional
message, "(x10)" or "(x60)", when fast time is in effect.
If the launch has already occured (you have entered a date and time
that is in the past), the program goes back approximately two hours then
"catches up" and plots the position of the Space Shuttle as it does so. The
program plots a point for each minute during that time, so it can take a
few minutes to get up to real time. Once the plot reaches the current time,
it will slow to real time and resume normal plotting. Using this technique,
Program STSORBIT Space Shuttle Orbit Simulation Page 8
you may re-plot the orbit after receiving improved orbital information or
rewume a plot after an interruption.
The program has undergone multiple revisions during the first days of
the STS-30 Atlantis/Magellan mission. At one point, I was releasing new
versions every couple of hours! Lacking any equations or data for the first
minutes of a typical mission, the first tries were largely guesswork and
needed to be refined considerably. After all of that, comparison of
STSORBIT's plot (using the data in file STSORBIT.NOT) with the NASA wall
map data (as seen on NASA Select Television, Satcom F1R, Transponder 13)
and interpolation of that data shows good agreement through about the first
ten orbits. However, after orbital manouvers, such as occur with the launch
of a satellite or spacecraft, the initial data is much less accurate.
Unfortunately, the NASA wall map is not always on the screen and orbital
information has been difficult to confirm during mission day 2.
Program STSORBIT Space Shuttle Orbit Simulation Page 9
STSORBIT REVISION HISTORY
Each released version of STSORBIT uses a four digit revision code
such as 8916. The first two digits indicate the year and the second two
digits indicate the week of the year. In some cases, an additional letter
suffix is added to distinguish changes occuring within the same week. A
partial week at the beginning or end of the year is counted as a full week.
Using this method, a year will typically have 53 weeks although it is
possible to have 54 weeks in a leap year (1972 is an example). The current
year-week revision code is shown on the Julian Date display, Display Mode
7, in my program ASTROCLK.
This file records the revision history of program STSORBIT through all
of the minor twists and turns that usually accompany the evolution of such
a program. It illustrates the tortuous process of maintaining and refining
a program as ideas and problems are reported from every quarter. The early
versions have been rushed to meet the STS-30 launch schedule, probably too
much so. These notes may also be helpful to users who are upgrading from
one version to another to find out what has changed.
David H. Ransom, Jr.
8919 5/06/89 -Added A command to allow orbital parameters to be
adjusted following orbital manouvers. Adjust data
added to file STSORBIT.INI; delete any old
STSORBIT.INI prior to running version 8919.
-Corrected problem in demo that caused shuttle
symbol not to appear. Changed default speed in
demo to normal.
-Added N command to display most recent ascending
and descending node data.
8918F 5/05/89 -For EGA/VGA added G command to enable or disable
additional grid lines: longitude every 30 degrees
and latitude every 10 degrees. Not available in
HGC/CGA screen modes. The equator and meridians
every 90 degrees are always drawn.
-Added R command to restore previously saved
mission data. Does not save demo data. Data is
automatically saved in ASCII file STSORBIT.INI.
8918E 5/04/89 -Further refined orbital trajectory during the
initial 8 minutes of flight based upon real time
data interpolated from NASA television. Fixed
orbital longitude error so launch is shown as
starting at KSC (rather than the East coast of
Florida as in V8918D!). Still a little crude but
the subsequent orbits check out pretty well.
-During "catch up", the P (for PAUSE) command is
now implemented. Press any key to resume.
-Fixed various minor bugs in display titles.
8918D 5/04/89 -Revised orbit calculations for first 8 minutes of
Program STSORBIT Space Shuttle Orbit Simulation Page 10
flight to compensate for climb to orbit. The
revised timing taken directly from initial orbits
of STS-30 on Mission Control Center's wall map.
-Added TDRE (-172) and TDRW (-42) TDRS satellites
on EGA and VGA displays in yellow.
-Added orbital time to data display.
8918C 5/03/89 -Revised "catch up" logic to begin two hours prior
to current time instead of beginning at launch
time. (Slower computers took FOREVER to get back
to real time!)
8918B 5/03/89 -Added screen mode 3 for Hercules Graphics Cards.
This mode is untested at this point!
8918A 5/02/89 -Corrected screen prompt and text for date inputs.
Dates are input as MM/DD/YYYY (not dd/mm/yyyy!).
Thanks to Bob Krohn for reporting this problem.
8918 5/01/89 -Added dynamic FAST TIME toggle during execution.
Press "F" to toggle from x1 to x10 to x60.
-Added PAUSE during execution. Press "P" to pause,
then any key to resume execution.
-Orbital data input routines improved and text
-Changed data in lower left of screen to add the
orbit inclination and simulated time. Thanks to
Bob Krohn for these suggestions.
8917A 4/30/89 -Shifted map longitudes 90 degrees left so United
States would be approximately centered.
-Added launch trajectory calculations for orbital
inclinations greater than the latitude of KSC, and
latitude adjustments after launch for orbital
inclinations less than the latitude of KSC.
(Thanks to Paul Traufler for comments; the orbital
math still needs work but ...)
-Restructured pixel arrays for better speed.
-Corrected longitude and latitude of KSC.
-Changed shuttle symbol from white to bright white
for better contrast on EGA/VGA.
8917 4/28/89 -MAJOR UPGRADE
-Adds world map and file STSORBIT.DAT. Several
colors changed to improve contrast on my monitors.
8916A 4/27/89 -Fixes many small and a few major bugs in the
initial 8916 release. There were enough bugs that
I suspect I shouldn't have released the BETA
VERSION at all ...
-Added launch date for manual data entry to permit
plotting launches which have already occured.
-Added logic to handle day crossovers.
8916 4/24/89 -Initial BETA VERSION Release.