home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast2.iso / astrnomy / sfs101.zip / SFS.RO < prev    next >
Text File  |  1991-10-21  |  75KB  |  1,946 lines

  1. ..    \"===================================================
  2. ..    \"
  3. ..    \"    sfs.ro
  4. ..    \"
  5. ..    \"    documentation for Space Flight Simulator
  6. ..    \"    copyright (c) 1991, Ted A. Campbell
  7. ..    \"
  8. ..    \"
  9. ..    \"    NOTE: this documentation is in a format com-
  10. ..    \"    patible with the "ro" text formatter. The file
  11. ..    \"    sfs.doc is an ASCII output version of this file
  12. ..    \"    with no formatting marks. 
  13. ..    \"
  14. ..    \"    To print this file to an ANSI terminal, use:
  15. ..    \"
  16. ..    \"        ro -Tansi.tab sfs.ro | more
  17. ..    \"    
  18. ..    \"    To send it with no underline or bold to a
  19. ..    \"    printer, use:
  20. ..    \"
  21. ..    \"        ro -Tnull.tab sfs.ro >prn
  22. ..    \"
  23. ..    \"    For further details on ro usage and formatting,
  24. ..    \"    see the ro documentation.
  25. ..    \"
  26. ..    \"===================================================
  27. .so tmac.m
  28. ..    \"===================================================
  29. ..    \"    String "V" -- current version number
  30. .ds V "1.01"
  31. ..    \"===================================================
  32. ..    \"    String "Y" -- copyright year
  33. .ds Y "1991"
  34. ..    \"===================================================
  35. ..    \"    Page Headers and Footers
  36. .PF "''''"
  37. ..    \"===================================================
  38. .sp 12
  39. .ce
  40. Bywater Software
  41. .sp 2
  42. .ce
  43. SPACE FLIGHT SIMULATOR
  44. .sp 5
  45. .ce
  46. Version \*V
  47. .sp 2
  48. .ce
  49. Copyright (c) \*Y,
  50. .ce
  51. Ted A. Campbell
  52. .sp 4
  53. .ce
  54. Bywater Software
  55. .ce
  56. P. O. Box 4023
  57. .ce
  58. Duke Station
  59. .ce
  60. Durham, NC  27706
  61. .sp 2
  62. .ce
  63. email: tcamp@teer3.acpub.duke.edu
  64. .SK
  65. .PF "''Page  #''"
  66. .sp 4
  67. .ce
  68. CONTENTS
  69. .sp 4
  70. .nf
  71. .ne 6
  72. 0. Quick Start Information ..................................
  73.  
  74. .ne 6
  75. 1. Introduction .............................................
  76.  
  77.    1.1 Description ..........................................
  78.    1.2 Copyright and Distribution Information ...............
  79.    1.3 Hardware Requirements ................................
  80.    1.4 Unpacking SFS ........................................
  81.    1.5 Starting SFS .........................................
  82.    1.6 Exiting SFS ..........................................
  83.    1.7 Running the Default SFS Program ......................
  84.  
  85. .ne 6
  86. 2. Developing Orbital Simulations ...........................
  87.  
  88.    2.1 Selecting a SFS Program File .........................
  89.        2.1.1 Using Bywater UI Menus .........................
  90.    2.2 The Main Modeling Menu ...............................
  91.        2.2.1 Set Program Title ..............................
  92.            2.2.1.1 Using Bywater UI Dialogue Boxes ..........
  93.        2.2.2 Set Current Orbit ..............................
  94.            2.2.2.1 Mass of the Orbital Focus ................
  95.            2.2.2.2 Radius of the Orbital Focus ..............
  96.            2.2.2.3 Sidereal Period of the Orbital Focus .....
  97.            2.2.2.4 Semiminor Axis of the Orbit ..............
  98.            2.2.2.5 Eccentricity of the Orbit ................
  99.            2.2.2.6 Orbital Period ...........................
  100. .ne 6
  101.        2.2.3 Set Orbital Parameters .........................
  102.            2.2.3.1 Set Orbital Focus ........................
  103.            2.2.3.2 Set Orbit/Spacecraft Name ................
  104.            2.2.3.3 Set Surface Datafile .....................
  105.            2.2.3.4 Set Orbital Periapsis ....................
  106.            2.2.3.5 Set Orbital Apoapsis .....................
  107.            2.2.3.6 Set Orbital Inclination ..................
  108.            2.2.3.7 Set Argument of the Periapsis ............
  109.            2.2.3.8 Set Longitude of the Ascending Node ......
  110.            2.2.3.9 Exit from Orbital Parameters Menu ........
  111.        2.2.4 Set Insertion Parameter ........................
  112. .ne 6
  113.        2.2.5 Set System Parameters ..........................
  114.            2.2.5.1 Set Time Factor ..........................
  115.            2.2.5.2 Set Screen Update Interval ...............
  116.            2.2.5.3 Set Trig Precision Level .................
  117.            2.2.5.4 Exit from System Parameters Menu .........
  118.        2.2.6 View Current Orbit .............................
  119.        2.2.7 Exit from Main Modeling Menu ...................
  120.  
  121. .ne 6
  122. 3. Advanced Control of the Simulation Module ................
  123.  
  124. .ne 6
  125.    3.1 Simulation Module Information Panels .................
  126. .ne 6
  127.    3.2 Simulation Module Displays ...........................
  128.        3.2.1 The Visual Simulation ..........................
  129.        3.2.2 The Ground Track Display .......................
  130.        3.2.3 The Distant Perspective Display ................
  131. .ne 6
  132.    3.3 The Escape Menu ......................................
  133.        3.3.1 Changing the Display ...........................
  134.        3.3.2 Changing System Parameters .....................
  135.        3.3.3 Exits from the Simulation Module ...............
  136. .ne 6
  137.    3.4 Simulation Module Toggles ............................
  138.  
  139. .ne 6
  140. 4. Compiling SFS ............................................
  141.  
  142. .ne 6
  143.    4.1 File and Directory Hierarchies .......................
  144. .ne 6
  145.    4.2 Using Script Files to Build SFS ......................
  146. .ne 6
  147.    4.3 Include Files ........................................
  148. .ne 6
  149.    4.4 Implementing the Input/Output System and the UI ......
  150.        4.3.1 Implementing the Graphics (gr) System ..........
  151.        4.3.2 Implementing the Keyboard (kb) System ..........
  152.        4.3.3 Implementing the Directory (dr) System .........
  153.        4.3.4 Building the User Interface (ui) ...............
  154. .ne 6
  155.    4.5 Compiling the Space Flight Simulator .................
  156.  
  157. .ne 6
  158. 5. SFS Data File Formats ....................................
  159.  
  160. .ne 6
  161.    5.1 SFS Program Files (*.sfs) ............................
  162.    5.2 Focal Data Files (*.fd) ..............................
  163.    5.3 Spherical Projection Data Files (*.spd) ..............
  164.  
  165. .ne 6
  166. 6. The MAP Utility ..........................................
  167.  
  168. .ne 6
  169.    6.1 Change Position ......................................
  170.    6.2 Enter Title or Comments ..............................
  171.    6.3 Begin Sequence .......................................
  172.    6.4 Set Default Attitude .................................
  173.    6.5 Exit .................................................
  174.  
  175. 7. Communications ...........................................
  176.  
  177. .fi
  178. .PH "''''"
  179. .PF "''Page  #''"
  180. .SK
  181. .sp 4
  182. .ce
  183. QUICK START INFORMATION
  184. .sp
  185. .TA
  186. .TZ
  187. .BA
  188. If you have the executable \fIPC version\fR of the Space Flight
  189. Simulator and want a quick start, copy all the files (possibly
  190. from two 5.25" diskettes) into one directory. Change to this
  191. directory, and enter "sfs" to run the program. If you are using
  192. Hercules (tm) graphics, you must run the program "msherc" before
  193. running "sfs." The program is menu-driven, and should largely be
  194. self-explanatory from this point.
  195. .P
  196. If you are planning to install the Space Flight Simulator on a
  197. \fIUnix\fR or other system, the program will have to be compiled
  198. (and possibly implemented for your system). Implementations
  199. currently exist for Unix based systems using the X Windows
  200. system, and for the AT&T Unix PC (tm). Turn to chapter four for
  201. further information on compiling the software.
  202. .BZ
  203. .TA
  204. .TZ
  205. .SK
  206. .PH "''''"
  207. .PF "''Page  #''"
  208. .sp 4
  209. .ce
  210. Chapter 1
  211. .sp
  212. .ce
  213. INTRODUCTION
  214. .PH "'SFS \*V'Chapter 1'Page #'"
  215. .sp 3
  216. .TA
  217. .na
  218. .ne 5
  219. .ce
  220. 1.1 \fBDescription\fR
  221. .P
  222. The development of microcomputers has been directly related to
  223. the progress of the U.S. and Soviet space programs. Not only did
  224. the space programs demand increasing miniaturization of computer
  225. hardware and software, thus preparing the way for the
  226. development of microcomputers, but they also began to develop
  227. software techniques for spacecraft tracking and eventually
  228. visualization. It is not surprising, then, that computers and
  229. space technology are closely associated in the minds of many
  230. people. 
  231. .P
  232. The Space Flight Simulator by Bywater Software offers a means of
  233. simulating orbital flight, and since all space flight is, one
  234. way or another, orbital flight, it can appropriately be called a
  235. "space flight simulator." The fact of the matter is, however,
  236. that orbital flight involves a fair degree of mathematics, and
  237. once an orbit has been selected space flight does not at all
  238. involve the kind of instantaneous (and personal) "piloting" that
  239. makes atmospheric craft (airplanes, jets, helicopters) exciting.
  240. Orbital Flight, that is, can be dull by comparison.
  241. .P
  242. Bywater's Space Flight Simulator can keep track of a number of
  243. orbital spacecraft (simultaneously) in its current version, and
  244. offers three visual representations of orbital flight: a ground
  245. track map (of all orbits around a particular orbital focus, such
  246. as the earth or the moon), a "visual simulation" showing the
  247. orbital focus as it might appear from the space craft, and a
  248. "distant perspective" that shows all orbits around a particular
  249. focus.
  250. .TZ
  251. .BA
  252. \fIRoom for Improvement\fR. The Space Flight Simulator does not
  253. yet have the capability of calculating and executing transfer
  254. orbits, or transfers from one orbital focus to another (e.g.,
  255. from the earth to the moon). These are areas for future
  256. development of the program. 
  257. .BZ
  258. .TA
  259. .P
  260. The Space Flight Simulator has two principal parts: a modeling
  261. module (including the main program menu) that allows the
  262. development of particular orbital models, and a simulation
  263. module that attempts to display the orbits selected in real
  264. time. The program begins by displaying a main menu that allows
  265. the user to select a previously written SFS program file, alter
  266. a SFS program file, proceed to orbital simulation, or exit the
  267. program. This document attempts to explain the various options
  268. available to the SFS user. 
  269. .sp 2
  270. .ne 5
  271. .PF "''''"
  272. .ce
  273. 1.2 \fBCopyright and Distribution Information\fR
  274. .P
  275. The Space Flight Simulator is distributed under the following
  276. agreement: 
  277. .TZ
  278. .BA
  279. .P
  280. All U.S. and international copyrights are claimed by the author.
  281. The author grants permission to use this code and software based
  282. on it under the following conditions: 
  283. .P
  284. (a) in general, the code and software based upon it may be used
  285. by individuals and by non-profit organizations;
  286. .P
  287. (b) it may also be utilized by governmental agencies in any
  288. country, with the exception of military agencies;
  289. .P
  290. (c) the code and/or software based upon it may not be sold for a
  291. profit without an explicit and specific permission from the
  292. author, except that a minimal fee may be charged for media on
  293. which it is copied, and for copying and handling;
  294. .P
  295. (d) the code must be distributed in the form in which it has
  296. been released by the author;
  297. .P
  298. and (e) the code and software based upon it may not be used for
  299. illegal activities.
  300. .BZ
  301. .TA
  302. .P
  303. This answers roughly to what some call a "freeware" agreement.
  304. One can use the program as one wishes for non-profit, peaceful,
  305. and legal purposes, one can copy it freely and give it to
  306. whomever one pleases, and the author expects no compensation for
  307. these uses. Users are not allowed to sell the program, to use it
  308. for military uses, or to use it for illegal activities. I am not
  309. naive, actually, but I do not consent for my program to be used
  310. for these purposes.
  311. .sp 2
  312. .ne 5
  313. .ce
  314. 1.3 \fBHardware Requirements\fR
  315. .P
  316. CPU and Coprocessor (MSDOS version):  SFS version \*V will run
  317. under MSDOS or PCDOS on any of the 8088 and upwardly-compatible
  318. CPUs.  Speed of the processor is critical in this program. The
  319. presence of a math coprocessor will be automatically detected by
  320. the program, and will also greatly enhance the performance of
  321. the program. 
  322. .P
  323. Graphics (MSDOS version):  SFS version \*V is configured to work
  324. with Hercules (tm), EGA, or VGA graphics, and must support at
  325. least two pages of memory.  Because CGA does not allow multiple
  326. pages of video memory, it cannot be used. The program
  327. automatically detects these graphics systems, except the
  328. Hercules-type cards.  For systems with Hercules-compatible
  329. graphics, run the program "msherc.com" first.
  330. .TZ
  331. .BA
  332. What about CGA graphics? Actually, SFS will try to run on these
  333. systems, but the result will not be very attractive, for two
  334. reasons: (a) the fonts are too coarse to be read easily and will
  335. probably overwrite each other, and (b) the lack of paged memory
  336. will mean that the system will write all over the existing
  337. screen in simulation mode, very sloppy.
  338. .BZ
  339. .TA
  340. .sp 2
  341. .ne 5
  342. .ce
  343. 1.4 \fBUnpacking SFS\fR
  344. .P
  345. Before using the Space Flight Simulator it is necessary to copy
  346. all the binary and data files to a single directory, preferably
  347. on a hard disk drive.  SFS is distributed in two different
  348. forms: (a) executable binaries (with supporting data files) for
  349. the IBM PC and compatible computers, and (b) C source code (also
  350. with supporting data files) to be compiled on Unix computer
  351. systems, at this point supporting the X windows system and the
  352. AT&T Unix PC "tam" interface library. 
  353. .P
  354. The PC (binary) version may be archived utilizing one of a
  355. number of different archiving systems. Documentation for the
  356. archiving system should explain how to extract the files. Also,
  357. note that the PC binary version will not fit on a single 5.25"
  358. floppy diskette, so that binaries and data from 5.25" diskettes
  359. will have to be copied to a single directory on a hard disk
  360. drive (or possibly to a single 720k or larger diskette).
  361. .TZ
  362. .BA
  363. Does the Space Flight Simulator require a hard disk drive? SFS
  364. will run, in fact, on a single 720k diskette (thus, on a 720k
  365. 3.5" drive, or possible a 1.2 megabyte 5.25" diskette), but the
  366. PC versions require the reading of the disk drive every time a
  367. font must be changed. This can be extremely time consuming, and
  368. is why the use of a hard disk drive is recommended.
  369. .BZ
  370. .TA
  371. .P
  372. The source code for SFS will be supplied in the form of Unix
  373. "sh" archives. File headers and tails should be removed, then
  374. the files should be executed with "sh" to extract the individual
  375. source code files and data files. See chapter 4 below on
  376. compiling SFS.
  377. .sp 2
  378. .ne 5
  379. .ce
  380. 1.5 \fBStarting SFS\fR
  381. .P
  382. To run SFS version \*V on most computers (including
  383. PC-compatible computers with EGA and VGA graphics), simply type
  384. .nf
  385.     sfs<RET>
  386. .fi
  387. (<RET> denotes a carriage return).  To run the program on a
  388. PC-compatible computer with Hercules graphics, first run the
  389. program "msherc." The following commands will run the program
  390. with Hercules graphics:
  391. .ls 1
  392. .nf
  393.  
  394.     msherc<RET>
  395.     sfs<RET>
  396.  
  397. .ls 2
  398. .fi
  399. The sfs program will load the menu and modeling module
  400. (sfsm.app). It will then display the SFS logo (which will remain
  401. on the screen for a few seconds), after which it will show the
  402. main sfs menu.
  403. .TZ
  404. .BA
  405. \fINote for Advanced Users\fR:  The name of an SFS program file
  406. (see below) can be specified on the SFS command line.  For
  407. instance,
  408. .nf
  409.     sfs moon.sfs
  410. .fi
  411. will start the program using "moon.sfs" for its initial program
  412. data.
  413. .BZ
  414. .TA
  415. .sp 2
  416. .ne 5
  417. .ce
  418. 1.6 \fBExiting SFS\fR
  419. .P
  420. From the main SFS menu a number of different options may be
  421. selected. The SFS main menu is one of a number of menus that
  422. work similarly (they all employ the Bywater Grpahical User
  423. Interface). The up and down arrow keys can be used to select
  424. items, then <ENTER> or <RETURN> will execute a selected item.
  425. With a mouse, click once on an item to select it, then click a
  426. second time to execute it. There may be unseen menu items above
  427. or below the current position; to expose these use the window
  428. sliders or arrows with the mouse. (See 2.1.1 below for more
  429. information on Bywater UI menus.)
  430. .P
  431. The last item on the SFS main menu is an the exit from the
  432. program. Select and execute this item to return to the operating
  433. system. 
  434. .sp 2
  435. .ne 5
  436. .ce
  437. 1.7 \fBRunning the Default SFS Program\fR
  438. .P
  439. To run the default SFS program (a view of the earth from an
  440. orbiting spacecraft), enter the SFS program described above
  441. (with no command line argument; just "sfs"). From the main SFS
  442. menu, select and execute the "Visual Simulation" item. This will
  443. begin running the default program. 
  444. .P
  445. The screen will go entirely blank for a while. Don't panic: SFS
  446. is a fairly large program, and had to be divided into a few
  447. smaller pieces. The sfs (under MSDOS, "sfs.exe") program itself
  448. is very small and only loads the two main programs: 
  449. .ls 1
  450. .nf
  451.  
  452.       sfsm.app (which contains the main menu 
  453.                and the modeling module), and
  454.  
  455.       sfsx.app (which contains the simulation module).
  456.  
  457. .fi
  458. .ls 2
  459. When the screen goes blank, sfsm.app has relinquished control to
  460. sfs (sfs.exe), which is loading sfsx.app. In a moment or two the
  461. simulation module will appear on screen. 
  462. .P
  463. After the simulation module shows the program logo, it reads in
  464. maps and data about the object(s) to be orbited. Then it has to
  465. make some initial calculations. After a while (depending greatly
  466. on the speed of a computer, and whether it has a math
  467. coprocessor), two windows will open on the screen. A simulation
  468. of the orbital focus (probably the earth) as seen from the
  469. spacecraft will appear in the top window, and a ground track map
  470. will appear in the bottom window. After a while (again,
  471. depending on the speed of the computer at performing
  472. trigonometric calculations), the visual simulation will appear
  473. in the upper window and will change as the spacecraft continues
  474. on its path (as indicated in the lower window).
  475. .P
  476. To exit from the simulation module, either press <ESCAPE> or
  477. click the mouse once on the top bar of the screen. This will
  478. bring up the simulation module escape menu in the middle of the
  479. screen, and it is used just like the main SFS menu described
  480. above (and in 2.1.1 below). The last item on the main simulation
  481. menu will allow a return to the main SFS menu. If this option is
  482. chosen, the screen will again go blank (while sfs loads
  483. sfsm.app). The program can then be exited altogether by choosing
  484. the last (exit) item from the main SFS menu. Alternatively, the
  485. next to last item on the main simulation menu is a short cut to
  486. exit from SFS altogether (i.e., without reloading the main menu
  487. and modeling module, sfsm.app).
  488. .TZ
  489. .PH "''''"
  490. .SK
  491. .sp 4
  492. .ce
  493. Chapter 2
  494. .sp
  495. .ls 1
  496. .ce
  497. DEVELOPING ORBITAL SIMULATIONS:
  498. .ce
  499. THE MAIN MENU AND MODELING MODULE (sfsm.app)
  500. .ls 2
  501. .PH "'SFS \*V'Chapter 2'Page #'"
  502. .PF "''Page  #''"
  503. .sp 2
  504. .TA
  505. .na
  506. .ne 5
  507. .P
  508. The main menu and modeling module are contained within the
  509. executable file "sfsm.app" which is first loaded by "sfs"
  510. ("sfs.exe" in the PC version). The main menu allows users to set
  511. an appropriate SFS program file, to go to the modeling menu, to
  512. run the simulation, or to exit from the program. The modeling
  513. module allows users to develop and customize their own SFS
  514. programs. We begin with a discussion of the menu items available
  515. from the main menu. 
  516. .sp 2
  517. .ne 5
  518. .ce
  519. 2.1 \fBSelecting a SFS Program File\fR
  520. .P
  521. The first item on the main menu allows users to select a SFS
  522. program file. These files have the extension "*.sfs". A number
  523. are supplied with the program, and users can develop their own
  524. simulations using the modeling menu (see below). When a user
  525. selects this option from the main menu, she is provided with a
  526. menu listing all SFS program files found in the current
  527. directory. The user selects (see below) the file wanted, and
  528. will then return to the main menu.
  529. .sp 2
  530. .ne 5
  531. 2.1.1 Utilizing Bywater User Interface Menus
  532. .P
  533. Since both the main menu and the program selection menu utilize
  534. the Bywater User Interface menu system, a word is needed at this
  535. point on the use of this menuing system. The Bywater User
  536. Interface menu presents the user with a list of menu items to be
  537. selected. The menu can be controlled either by a pointer device
  538. (such as a mouse or track ball) or by the computer's arrow keys.
  539. Using the \fIarrow keys\fR, the UP and DOWN keys will move
  540. through the various menu items, highlighting the current item.
  541. Use the RETURN or ENTER key to select a particular item. If
  542. there are items below the bottom item (moving down) or above the
  543. top item (moving up), the menu items will be scrolled as the
  544. keys move above or below the currenly shown items. Using a
  545. \fIpointer device\fR (mouse or track ball), place the cursor on
  546. the item to be selected and click once (down and up on the
  547. pointer device button). Once an item has selected, the user can
  548. either select a different item by pointing and clicking, or
  549. choose the selected item by clicking on it a second time. 
  550. .PF "''''"
  551. .P
  552. The pointer device is not capable of scrolling up and down
  553. simply by pointing at menu items. For this reason, some of the
  554. menus will have scroll bars and arrows that the pointer device
  555. can use. Pressing an arrow area (up, down, left, or right,
  556. although left and right are irrelevant to the Spavce Flight
  557. Simulator, since it only uses vertical menus) will cause the
  558. menu items to be scrolled in that direction. Alternatively, one
  559. can press the pointer button on the "elevator" in the scroll
  560. bar, then release the button at a higher or lower position in
  561. the scroll bar. This will cause the screen to scroll in the
  562. appropriate direction. Using the scroll bars, a user can scroll
  563. instantly from the top to the bottom (and vice versa) of a menu
  564. list very quickly.
  565. .sp 2
  566. .ne 5
  567. .ce
  568. 2.2 \fBThe Orbital Modeling Menu\fR
  569. .P
  570. The orbital modeling menu allows users to develop and customize
  571. their own SFS programs. A number of orbital parameters can be
  572. set, and certain aesthetic features can be controlled. 
  573. .sp 2
  574. .ne 5
  575. 2.2.1 Set Program Title
  576. .P
  577. The first option from the modeling menu allows the user to set a
  578. title for the program one is developing. After selecting this
  579. item, the user is presented with a dialogue box (see 2.2.1.1
  580. below) for entering the title. Although there is theoretically
  581. no limit to the length of the title, none of the SFS programs
  582. can display more than a few words of titles, so users are
  583. advised to make their titles rather short. 
  584. .P
  585. To begin a new SFS program, a user simply starts with an old
  586. one, and then alters the parameters for the new program. When a
  587. user exits from the orbital modeling menu, she can specify a new
  588. filename under which the program can be stored.
  589. .sp 2
  590. .ne 5
  591. 2.2.1.1 Using Bywater User Interface Dialogue Boxes
  592. .P
  593. Dialogue Boxes will be encountered at several points in the
  594. Space Flight Simulator. A dialogue box will prompt the user for
  595. a text string. Enter the string from the keyboard, concluding it
  596. with a RETURN or ENTER. Although it is possible to write beyond
  597. the bounds of the dialogue box, the area written over beyond the
  598. bounds of the box will not be restored when the dialogue box is
  599. completed. The user can use the BACKSPACE key to correct errors
  600. if they are made in a dialogue box session.
  601. .sp 2
  602. .ne 5
  603. 2.2.2 Set Current Orbit
  604. .P
  605. The Space Flight Simulator can simulate a number of orbits
  606. (around multiple orbital foci) concurrently. Orbital parameters
  607. have to be set for one orbit at a time; consequently the user
  608. must select which orbit she wishes to work on, and the "set
  609. current orbit" item (the second item in the orbital modeling
  610. menu) allows this. After selecting this menu item, the user is
  611. presented with a dialogue box and is prompted for an orbit
  612. number. Enter the number, then the program will return to the
  613. orbital modeling menu. 
  614. .P
  615. When a new program is initialized, only one orbit (number 1) is
  616. available. If a user selects a different orbit than those
  617. available, the new orbit is initialized with a set of default
  618. orbital parameters before returning to the orbital modeling
  619. menu. The user is not required to enter new orbits in sequence,
  620. so that one could conceivably have a simulation with three
  621. orbits with numbers 1, 5, and 9, but it makes conceptual sense
  622. to proceed in sequence. 
  623. .TZ
  624. .BA
  625. \fIRoom for Improvement\fR. At this point, there is no display
  626. showing how many orbits have already been initialized in a given
  627. program, and there is no provision from deleting an orbit from a
  628. program. Both of these matters may be addressed by looking
  629. directly at the program file (*.sfs) with an ASCII text editor
  630. (see the file format information in 5.1 below).
  631. .BZ
  632. .TA
  633. The Space Flight Simulator displays (in the lower right-hand
  634. corner of the orbital modeling screen a list of information
  635. concerning the selected orbit. Although it appears in the form
  636. of a Bywater UI menu, it is read-only information, and is
  637. updated whenever new orbital data is entered. The information in
  638. this display is as follows.
  639. .sp 2
  640. .ne 5
  641. 2.2.2.1 Mass of the Orbital Focus
  642. .P
  643. The mass of the orbital focus (the object around which this
  644. orbit is focused) is given in grams, as read from the focal data
  645. file (see 5.2 below).
  646. .sp 2
  647. .ne 5
  648. 2.2.2.2 Radius of the Orbital Focus
  649. .P
  650. The (average) radius of the orbital focus is given in
  651. kilometers, as read from the focal data file (see 5.2 below).
  652. .sp 2
  653. .ne 5
  654. 2.2.2.3 Sidereal Period of the Orbital Focus
  655. .P
  656. The sidereal period of the orbital focus (the period in which it
  657. completes one revolution in relation to the stellar background)
  658. is given in seconds, as read from the focal data file (see 5.2
  659. below).
  660. .sp 2
  661. .ne 5
  662. 2.2.2.4 Semiminor Axis of the Orbit
  663. .P
  664. The "semiminor axis" of an orbit is one of the six classical
  665. orbital elements and represents a distance (in kilometers) of
  666. one half of the smallest diameter of the orbit. It is calculated
  667. on the basis of orbital parameters entered in the orbital
  668. parameters menu.
  669. .sp 2
  670. .ne 5
  671. 2.2.2.5 Eccentricity of the Orbit
  672. .P
  673. The "eccentricity" of an orbit is one of the six classical
  674. orbital elements and represents the ratio between the semiminor
  675. and semimajor axes of the orbit. An eccentricity of "0" denotes
  676. a perfectly circular orbit, whereas a higher eccentricity (1.0
  677. is the maximum) denotes a greater difference between semiminor
  678. and semimajor axes. The eccentricity is calculated on the basis
  679. of orbital parameters entered in the orbital parameters menu.
  680. .sp 2
  681. .ne 5
  682. 2.2.2.6 Orbital Period
  683. .P
  684. The period of an orbit is one of the six classical orbital
  685. elements and represents the time (in seconds) to complete one
  686. revolution around the orbital focus. The orbital period is
  687. calculated on the basis of orbital parameters entered in the
  688. orbital parameters menu.
  689. .sp 2
  690. .ne 5
  691. 2.2.3 Set Orbital Parameters
  692. .P
  693. [Discussion now returns to the orbital modeling menu.] The third
  694. option in the orbital modeling menu is the "set orbital
  695. parameters" item. After selecting this item, the orbital
  696. modeling menu itself will be deactivated, and an orbital
  697. parameters menu will be activated in the top right-hand corner
  698. of the screen. This menu allows the user to set specific
  699. parameters for the currently selected orbit.
  700. .sp 2
  701. .ne 5
  702. 2.2.3.1 Set Orbital Focus
  703. .P
  704. The orbital focus is the object around which a satellite orbits.
  705. The Space Flight Simulator is supplied with a number of files
  706. (with extention "*.fd") that give focal data for astronomical
  707. objects (see section 5.2 below for a description of focal data
  708. files). After selecting this item from the orbital parameters
  709. menu, the user is presented with a Bywater UI menu showing all
  710. the focal data files in the current directory. One of these must
  711. be selected.
  712. .TZ
  713. .BA
  714. \fIRoom for Improvement\fR. The Space Flight Simulator does not
  715. offer in this revision a facility for creating new focal data
  716. files. The user can create these directly by using an ASCII text
  717. editor (see 5.2 below for information on the file format).
  718. .BZ
  719. .TA
  720. .sp 2
  721. .ne 5
  722. 2.2.3.2 Set Name of Orbit/Spacecraft
  723. .P
  724. The user can enter a name for the spacecraft (or a particular
  725. orbit) which will appear on some of the simulation screens.
  726. After selecting this item, the user is presented with a Bywater
  727. UI dialogue box (see above), in which the name should be
  728. entered. Again, there is a limit to the number of words that the
  729. programs can be displayed, so a short title is to be preferred.
  730. .sp 2
  731. .ne 5
  732. 2.2.3.3 Set Surface Datafile
  733. .P
  734. It is possible to utilize different surface datafiles (extension
  735. "*.spd", for "spherical projection data"), even for the same
  736. orbital focus. The earth ("earth.spd") is the only object for
  737. which significant surface data is available at this time. The
  738. file "null.spd" is a null which can be used in other cases. In
  739. these cases, only the latitude-longitude grid will be shown.
  740. After selecting this item, the user will be presented with a
  741. Bywater UI menu, from which a surface data file can be selected.
  742. .TZ
  743. .BA
  744. \fIAdvanced Use\fR. The Space Flight Simulator has a special
  745. program (the map utility) which allows users to enter their own
  746. spherical projection data and thus create spherical projection
  747. data files (e.g., to show maps of planets, etc.). The map
  748. utility is not supplied with the executable versions of SFS, and
  749. will be released separately. See Chapter 5.3 below for further
  750. information on the SPD file format, and Chapter 6 below for further
  751. information on the MAP utility.
  752. .BZ
  753. .TA
  754. .sp 2
  755. .ne 5
  756. 2.2.3.4 Set Orbital Periapsis
  757. .nf
  758.     Default:  0.1 x the radius of the focus
  759. .fi
  760. The "periapsis" (also referred to by the specific term "perigee"
  761. for terrestrial orbits) is the lowest point in an orbit. Any
  762. positive number of kilometers lower than or equal to the
  763. apoapsis can be specified for the periapsis, although
  764. terrestrial orbits below about 250 kilometers begin to run into
  765. serious problems with atmospheric drag. (SFS does not account
  766. for atmospheric drag.)
  767. .sp 2
  768. .nf
  769. 2.2.3.5 Set Orbital Apoapsis
  770. .nf
  771.     Default:  4 x the radius of the focus
  772. .fi
  773. The "apoapsis" (also referred to by the specific term "apogee"
  774. for terrestrial orbits) is the highest point in an orbit. Any
  775. positive number of kilometers greater than or equal to the
  776. periapsis can be specified.  An orbit having an equal apoapsis
  777. and periapsis will be perfectly circular; all other orbits will
  778. be elliptical.  The greater the difference between the two, the
  779. greater will be the "eccentricity" of the orbital ellipse.
  780. .P
  781. It may be helpful to remember, as a rule of thumb in setting
  782. terrestrial orbital altitudes, that the altitude of the moon is
  783. 378,014 kilometers, and this can serve as a practical limit for
  784. terrestrial orbits, since relatively small spacecraft or
  785. satellites beyond this range would be controlled more by the
  786. gravitational effect of the sun than by the earth.
  787. .sp 2
  788. .ne 5
  789. 2.2.3.6 Set Orbital Inclination
  790. .nf
  791.     Default:  25 degrees
  792. .fi
  793. The "inclination" of an orbit is the amount that the orbit is
  794. inclined or "tilted" away from the equator of the orbital focus.
  795. The inclination must be specified in degrees between 0 and 180.
  796. An orbit having an inclination of 0 is "equatorial," that is,
  797. it follows the equator of the orbital focus.  An orbit with an
  798. inclination of 90 degrees is "polar," that is, it will go over
  799. the north and south poles of the orbital focus every orbit.
  800. .sp 2
  801. .ne 5
  802. 2.2.3.7 Set Argument of the Periapsis
  803. .nf
  804.     Default:  0 degrees
  805. .fi
  806. The next two orbital parameters are somewhat more difficult to
  807. understand, but can be mastered by experimenting with different
  808. settings.
  809. .P
  810. The "argument of the periapsis" is the point in the orbit where
  811. periapsis occurs, measured in degrees (0-360) from the point of
  812. the "ascending node," which is the point in the orbit where the
  813. ground track crosses the equator, moving in a northward
  814. direction.
  815. .P
  816. For a non-equatorial orbit, the argument of the periapsis will
  817. have the following general effects:
  818. .TZ
  819. .BA
  820. \fI0\fR Periapsis will occur at the point over the equator where
  821. the spacecraft crosses it heading northward, and apoapsis will
  822. occur at the point over the equator where the spacecraft crosses
  823. it heading southward (0 is the default setting).
  824. .P
  825. \fI90\fR Periapsis will occur at the northernmost point in the
  826. orbit, and apoapsis will occur at the southernmost point.
  827. .P
  828. \fI180\fR Periapsis will occur at the point over the equator
  829. where the spacecraft crosses it heading southward, and apoapsis
  830. will occur at the point over the equator where the spacecraft
  831. crosses it heading northward.
  832. .P
  833. \fI270\fR Periapsis will occur at the southernmost point in the
  834. orbit, and apoapsis will occur at the northernmost point.
  835. .BZ
  836. .TA
  837. .sp 2
  838. .ne 5
  839. 2.2.3.8 Set Longitude of the Ascending Node
  840. .nf
  841.     Default:  0 degrees longitude
  842. .fi
  843. .P
  844. The "longtude of the ascending node" is the point on the focal
  845. equator at which ascending node occurs.  For SFS, the longitude
  846. of the ascending node is specified in degrees (-180 to 180),
  847. with west negative and east positive.
  848. .P
  849. The longitude of the ascending node changes each orbit, so what
  850. is set here is the longitude for the first orbit.
  851. .P
  852. SFS calculates orbits beginning at periapsis; consequently,
  853. either the argument of the periapsis or the longitude of the
  854. ascending node (or the insertion parameter -- see below) can be
  855. altered to change what portion of the focus will be displayed
  856. when the program begins.
  857. .TZ
  858. .BA
  859. \fIExamples\fR:  (a)  The default settings have the argument of
  860. the periapsis at 0 degrees (periapsis over the equator), and the
  861. longitude of the ascending node at 0 degrees. For a terrestrial
  862. orbit (the default), this means that the orbit will begin at
  863. latitude 0, longitude 0, which is just off the coast of West
  864. Africa.  The orbital direction will be northeastward, so one
  865. will first see the African continent, the Mediterranean Sea, and
  866. Europe beyond them. 
  867. .P
  868. (b) By retaining all the default settings except the longitude
  869. of the ascending node, and by setting it to -120 degrees, the
  870. orbit will begin at periapsis over the equator, latitude 0 and
  871. longitude -120, which is just off of the western coast of
  872. Central American.  Since, again, the orbital direction is
  873. northeastward, one will first see Mexico and North America in
  874. the visual display.
  875. .BZ
  876. .TA
  877. .sp 2
  878. .ne 5
  879. 2.2.3.9 Exit from Orbital Parameters Menu
  880. .P
  881. The last item in the orbital parameters menu allows the user to
  882. return to the orbital modeling menu. The orbital parameters menu
  883. will be deactivated, and the orbital modeling menu reactivated.
  884. .sp 2
  885. .ne 5
  886. 2.2.4 Set Insertion Parameter
  887. .P
  888. .nf
  889.     Default:  0 seconds
  890. .fi
  891. .P
  892. The "point of insertion" is the moment in the first orbit when
  893. the orbit begins. Imagine a rocket or spaceplane delivering a
  894. spacecraft to a certain altitude where the spacecraft would take
  895. up the orbital track -- this would be the point of insertion. 
  896. The moment of insertion is specified in seconds from periapsis,
  897. and is limited by the orbital period (which is given on this
  898. screen).
  899. .TZ
  900. .BA
  901. \fIExample\fR:  If one wants to begin by seeing the orbital
  902. focus from apoapsis, one should specify the insertion moment as
  903. one half of the orbital period.  If the period is 60000 seconds,
  904. one should set the moment of insertion to 30000 seconds and the
  905. program will effect insertion at apoapsis.
  906. .BZ
  907. .TA
  908. .sp 2
  909. .ne 5
  910. 2.2.5 Set System Parameters
  911. .P
  912. .P
  913. The system parameters menu allows a user to set three parameters
  914. controlling the manner in which calculations are made and the
  915. screen is updated.  Note that one can also change the system
  916. parameters later, while the program is running, but it is best
  917. to specify system parameters from the beginning.
  918. .sp 2
  919. .ne 5
  920. 2.2.5.1 Set Time Factor
  921. .P
  922. .nf
  923.     Default:  1 x real time
  924. .fi
  925. .P
  926. The "time factor" is the ratio of flight time to real time. If
  927. the time factor is set to one (the default), the program will
  928. try to run in real time).  If the time factor is set to two, the
  929. program will calculate two flight seconds for every real second,
  930. and so forth.  Increasing the time factor allows users to speed
  931. up the orbital progress.
  932. .sp 2
  933. .ne 5
  934. 2.2.5.2 Set Screen Update Interval
  935. .P
  936. .nf
  937.     Default:  15 seconds
  938. .fi
  939. .P
  940. The "screen update interval" denotes the number of real-time
  941. seconds between each update of the screen.  Users need to find
  942. out, by experimentation, what the best update interval is for
  943. their computer systems.  The default 15 second rate works
  944. nominally on a computer with a 10 mhz 8088 CPU and no math
  945. coprocessor.  An 80286 machine with a math coprocessor can
  946. easily make a 5 second update interval.  A Unix workstation such
  947. as the DecStation 2100 (tm) can make a 2 second rate, thus allowing
  948. an extremely smooth animated effect. Slower computers may not be
  949. able to keep up with the 15 second update interval rate.
  950. .sp 2
  951. .ne 5
  952. 2.2.5.3 Set Trig Precision Level
  953. .P
  954. .nf
  955.     Default:  1 (fast)
  956. .fi
  957. .P
  958. The "trig precision level" specifies the level of accuracy at
  959. which trigonometric functions are calculated by the program. 
  960. Trig functions take up most of the processing time for the
  961. program, so by default SFS utilizes a look-up table for
  962. calculating trig functions.  By specifying "2 (precise),"
  963. however, one can force the program to perform much more accurate
  964. (and much slower) trig calculations.  The look-up tables work
  965. acceptably well, so we would recommend setting the trig
  966. precision level to 2 only if a math coprocessor is present.
  967. .sp 2
  968. .ne 5
  969. 2.2.5.4 Exit from System Parameters Menu
  970. .P
  971. The last item in the system parameters menu returns the user to
  972. the orbital modeling menu.
  973. .sp 2
  974. .ne 5
  975. 2.2.6 View Current Orbit
  976. .P
  977. [Discussion now returns to items in the orbital modeling menu.]
  978. The "View Current Orbit" item, next to last in the orbital
  979. modeling menu, allows the user to see a simulation of the
  980. orbital focus with orbits around it. This display is equivalent
  981. to the "distant perspective" display in the simulation module
  982. (see 3.2.3 below). When this item is selected, SFS has first to
  983. calculate the parameters for the display, then the display is
  984. drawn in the background memory, and finally it is blitted to the
  985. screen. NOTE that the display window for the "View Current
  986. Orbit" display (the window at the bottom left) is normally
  987. blanked, and will be blanked again after any parameters are
  988. changed (because the display would no longer be appropriate).
  989. .sp 2
  990. .ne 5
  991. 2.2.7 Exit from Orbital Modeling Menu
  992. .P
  993. The last item in the orbital modeling menu returns the user to
  994. the main SFS menu. When exiting, the user is asked whether she
  995. wishes to save the parameters entered (or altered). The user
  996. must answer "Yes" to the prompt to save the work done, and then
  997. she is prompted for a filename. By simply pressing RETURN, the
  998. current filename will be used. However, if a user has begun with
  999. a previously existing SFS program and altered it, the user may
  1000. wish to enter a new filename at this point. Remember to end the
  1001. filename with ".sfs", or the item of the main menu which selects
  1002. SFS program files will not recognize the filename as a program
  1003. file.
  1004. .TZ
  1005. .PH "''''"
  1006. .SK
  1007. .sp 4
  1008. .ce
  1009. Chapter 3
  1010. .sp
  1011. .ce
  1012. ADVANCED CONTROL OF THE SIMULATION MODULE
  1013. .PH "'SFS \*V'Chapter 3'Page #'"
  1014. .PF "''Page  #''"
  1015. .sp 2
  1016. .TA
  1017. .na
  1018. .ne 5
  1019. .P
  1020. Although chapter one gave an indication of how a simple SFS
  1021. program could be viewed using the simulation module, there is a
  1022. range of controls available to the user of the simulation
  1023. module. This chapter explains the use of these controls. It is
  1024. important to remember, however, that once the simulation module
  1025. is entered the basic parameters for the orbit are set, and one
  1026. must exit to the modeling module to change basic parameters.
  1027. .sp 2
  1028. .ne 5
  1029. .ce
  1030. 3.1 \fBSimulation Module Information Panels\fR
  1031. .P
  1032. The simulation module constantly updates a number of information
  1033. panels in the display. At the very top of the display, on the
  1034. left-hand half of the top window bar, is the program name and
  1035. version. The right-hand half of the top bar is a message area
  1036. where the user may look for a clue as to available options. 
  1037. .P
  1038. On the left-hand side of the display are three information
  1039. panels, one on top of each other. The top panel gives the title
  1040. and description of the SFS that is currently being executed. The
  1041. middle panel gives timing information as the simulation
  1042. progresses. The top item in the timing display panel is the
  1043. simulated time expressed as Coordinated Universal Time (UTC).
  1044. The second item is local time, but this will differ from UTC
  1045. only if one has set the "TZ" environment variable to indicate
  1046. your timezone's difference from Coordinated Universal Time. 
  1047. .TZ
  1048. .BA
  1049. \fISetting the "TZ" Environmental Variable\fR.  If you want the
  1050. system to set UTC correctly based on your internal clock, you
  1051. need to set the environmental variable TZ before running the
  1052. program.  A sample command, which might be included in your
  1053. ".profile", ".login", or "autoexec.bat" file would be:
  1054. .nf
  1055.  
  1056.     set TZ=EST5EDT
  1057.  
  1058. .fi
  1059. which would set the system for the Eastern time zone of the U.S.
  1060. Other North American settings would be:
  1061. .nf
  1062.  
  1063.     set TZ=CST6CDT
  1064.     set TZ=MST7MDT
  1065.     set TZ=PST8PDT
  1066.  
  1067. .fi
  1068. for Central, Mountain, and Pacific time zones, respectively.
  1069. (Note that for some Unix systems, the command "set" is
  1070. unnecessary. Unix users will have to learn how to set
  1071. environmental variables on their respective systems.)
  1072. .BZ
  1073. .TA
  1074. The next two lines after the simulated time lines give Mission
  1075. Elapsed Time (MET) expressed as hours, minutes, and seconds, and
  1076. as days. The lowest of the three information panels at the left
  1077. is a status panel that will be updated frequently, informing the
  1078. user what SFS is currently doing.
  1079. .sp 2
  1080. .ne 5
  1081. .PF "''''"
  1082. .ce
  1083. 3.2 \fBSimulation Module Displays\fR
  1084. .P
  1085. The simulation module offers three different types of displays
  1086. which can be selected by the user through the simulation module
  1087. escape menu (see 3.3 below). When tracking multiple orbits, the
  1088. user may even choose to view two displays of the same type, but
  1089. with different orbital foci or orbits. (For example, if tracking
  1090. two terrestrial satellites concurrently, visual simulation
  1091. displays for each satellite could be displayed in the upper and
  1092. lower display windows.) The three display types are described in
  1093. this section.
  1094. .sp 2
  1095. .ne 5
  1096. 3.2.1 The Visual Simulation
  1097. .P
  1098. The visual simulation offers the user a simulation of how the
  1099. orbital focus would appear from the spacecraft. For an orbital
  1100. focus for which there is relatively complete surface information
  1101. (such as the earth), the display will show a considerable amount
  1102. of detail. For other orbital foci for which there is not surface
  1103. data (such as Pluto) or for which surface data is irrelevant
  1104. (such as the Sun), a simple latitude-longitude grid for the
  1105. focus will be shown. The focus will be seen to grow larger in
  1106. the display as the spacecraft approaches periapsis, and will
  1107. seem to grow smaller as the spacecraft approaches apoapsis. The
  1108. visual simulation screen represents about thirty degrees of arc
  1109. in horizontal length. The simulation module constantly
  1110. calculates the forward track of the spacecraft, and on the basis
  1111. of these calculations it tries to keep the point on the horizon
  1112. in focus towards which the spacecraft is currently headed. For
  1113. this reason, the orbital focus will often appear to rotate while
  1114. a simulation is in progress. 
  1115. .P
  1116. At the bottom of each visual simulation display there is a
  1117. status line indicating the latitude and longitude of the current
  1118. "subsatellite point," that is, the point on the surface of the
  1119. orbital focus immediately below the spacecraft. The status line
  1120. also shows the current altitude of the spacecraft (in
  1121. kilometers) over the surface of the orbital focus. 
  1122. .sp 2
  1123. .ne 5
  1124. 3.2.2 The Ground Track Display
  1125. .P
  1126. The ground track display shows a flat surface map of the orbital
  1127. focus on which the orbital track is superimposed. If there are
  1128. multiple orbits and color is supported, the orbital tracks will
  1129. appear in (up to six) different colors. One portion of each
  1130. orbital track will appear solid -- this is the portion of the
  1131. track that the spacecraft has already traversed. Another portion
  1132. appears in a dotted line of the same color, and represents the
  1133. forward track for one orbit, i.e., the path over the surface of
  1134. the orbital focus that the spacecraft will follow on its next
  1135. orbit. 
  1136. .TZ
  1137. .BA
  1138. \fINote\fR. The track of an orbit will not always stretch around
  1139. the orbital focus. At higher earth orbits, for instance, the
  1140. track will almost appear to stand still, due to the rotation of
  1141. the earth under the spacecraft. Similar effects should be
  1142. expected for other orbital foci.
  1143. .BZ
  1144. .TA
  1145. It is important to note that whereas the visual simulation
  1146. applies to a specific orbit, the grund track (and distant
  1147. perspective) display applies to all orbits around a specific
  1148. orbital focus. (For example, a SFS program showing three earth
  1149. orbits would display all three orbits on the one earth ground
  1150. track map.)
  1151. .sp 2
  1152. .ne 5
  1153. 3.2.1 The Distant Perspective Display
  1154. .P
  1155. The distant perspective display offers a perspective on an
  1156. orbital focus and all orbits associated with it from a
  1157. hypothetical position approximately ten times the apoapsis of
  1158. the highest orbit. Like the ground track display, the simulation
  1159. module will try to show multiple orbits in different colors, and
  1160. will display both the portion of the track that has been
  1161. traversed in solid color, and the untraversed (forward) track in
  1162. dotted color. Like the ground track display, the distant
  1163. perspective display shows all orbits around a specific orbital
  1164. focus.
  1165. .sp 2
  1166. .ne 5
  1167. .ce
  1168. 3.3 \fBThe Escape Menu\fR
  1169. .P
  1170. A number of options in the simulation module are made available
  1171. through the escape menu. The escape menu can be accessed in two
  1172. ways. Using the keyboard, pressing the ESCAPE key will bring up
  1173. the escape menu. Using the pointer device (mouse), pointing the
  1174. cursor to the top window bar and clicking (down and up) will
  1175. bring up the escape menu. The user will recognize the simulation
  1176. module escape menu as a standard Bywater UI menu (see 2.1.1
  1177. above). 
  1178. .sp 2
  1179. .ne 5
  1180. 3.3.1 Changing the Display
  1181. .P
  1182. The first three items in the escape menu allow the user to
  1183. change the available displays. Although each of these items
  1184. specifies a different display window, they each work the same.
  1185. The three display windows are areas on the screen where displays
  1186. can be shown, and they are not to be confused with the three
  1187. display types. (That is, any of the three display windows can
  1188. hold any of the three display types.) The three display windows
  1189. are: (a) the top window, (b) the bottom window, and (c) the
  1190. "zoom" window. Whenever the zoom window is specified, it takes
  1191. the place of the top and bottom windows and is activated.
  1192. Conversely, whenever a user selects either the top or bottom
  1193. window, both bottom and top windows are activated and the zoom
  1194. window is deactivated. The advantage of using the bottom and top
  1195. windows is that two displays can be viewed concurrently (by
  1196. default, the visual simulation for orbit 1 in the top window,
  1197. and the ground track for the focus of orbit 1 in the lower
  1198. window). The advantage of the zoom window is that a larger
  1199. screen area can be devoted to a single display. 
  1200. .P
  1201. When any of the first three escape menu items is selected, the
  1202. user is offered a number of options. There will be at least
  1203. three: the visual simulation for orbit 1, the ground track for
  1204. the focus of orbit 1, and the distant perspective for the focus
  1205. of orbit 1. But the visual simulation for each active orbit will
  1206. also be offered, as well as ground track displays and distant
  1207. perspective displays for all orbital foci. The user selects one
  1208. of these items to fill the window she chose from the escape
  1209. menu. The display will return immediately to its previous
  1210. contents, but the next time the display is updated the newly
  1211. selected display window and type will be activated. 
  1212. .sp 2
  1213. .ne 5
  1214. 3.3.2 Changing System Parameters
  1215. .P
  1216. The fourth item in the escape menu allows the user to change
  1217. certain system parameters while the simulation module is active.
  1218. The system parameters are the same as those described in section
  1219. 2.2.5 above, but they are entered here temporarily and will not
  1220. become part of the program under execution. This is useful when,
  1221. for example, a user executes a SFS program on a machine which is
  1222. considerably slower or faster than the producer of the SFS
  1223. program anticipated, in which case the user can more or less
  1224. immediately shift the speed of simulation or the speed at which
  1225. the simulation module tries to update the screen. Note that it
  1226. may take a few screen updates before the new parameters go into
  1227. effect. To change system parameters permanently for a SFS
  1228. program file, use the systems parameters option from the orbital
  1229. modeling module. 
  1230. .sp 2
  1231. .ne 5
  1232. 3.3.3 Exits from the Simulation Module
  1233. .P
  1234. Two exits are provided from the simulation module as the fifth
  1235. and sixth entries in the escape module. The fifth (next to last)
  1236. entry allows the user to escape completely from SFS. The sixth
  1237. and last escape menu option allows the user to return to the
  1238. main SFS menu. 
  1239. .sp 2
  1240. .ne 5
  1241. .ce
  1242. 3.4 \fBSimulation Module Toggles\fR
  1243. .P
  1244. In addition to pressing ESCAPE to get the escape menu, a user
  1245. may press four keys ("G", "S", "O", or "C") that serve as
  1246. toggles for the visual simulation displays. The status of each
  1247. of these keys is shown at the top right hand corner of the
  1248. visual simulation display: reverse video means that the item is
  1249. activated, and normal video for the letter indicates that the
  1250. item is currently inactive. The four letters stand for the
  1251. following:
  1252. .nf
  1253. .fl
  1254. .ne 8
  1255. .ls 1
  1256.     G - Grid
  1257.     S - Surface features
  1258.     O - Orb
  1259.     C - Crosshairs
  1260.  
  1261. .ls 2
  1262. .fi
  1263. The "grid" element refers to the latitude-longitude grid shown
  1264. in the visual display. The "Surface features" are such features
  1265. as landmass boundaries, craters, mountains, gas bands, and the
  1266. like. The "Orb" denotes the circle which represents the extent
  1267. of the orbital focus. "Crosshairs" denotes a crosshair display
  1268. which shows increments of ten degrees of arc in the display. By
  1269. default, all elements are activated except the crosshair
  1270. element. (The crosshair element can confuse users of monochrome
  1271. systems). By pressing one of these four letters while the
  1272. simulation module is running, the element will be switched on or
  1273. off. The display itself will be updated with (or without) the
  1274. newly toggled elements the next time the screen is updated. 
  1275. .TZ
  1276. .BA
  1277. \fIExample\fR. If the user wants to see a somewhat more realistic
  1278. representation of the earth from space, she might toggle off the
  1279. grid display element, leaving only the earth's orb filled in with
  1280. surface features. 
  1281. .P
  1282. \fIRoom for Improvement\fR. SFS currently supports element
  1283. toggles for the visual simulation alone. future versions may
  1284. implement this for the ground track or distant perspective
  1285. displays. 
  1286. .BZ
  1287. .TA
  1288. .PH "''''"
  1289. .SK
  1290. .sp 4
  1291. .ce
  1292. Chapter 4
  1293. .sp
  1294. .ce
  1295. COMPILING THE SPACE FLIGHT SIMULATOR
  1296. .PH "'SFS \*V'Chapter 4'Page #'"
  1297. .PF "''Page  #''"
  1298. .sp 3
  1299. .TA
  1300. .na
  1301. .ne 5
  1302. .P
  1303. The source code for the Space Flight Simulator, version \*V,
  1304. will be released at the same time as PC-compatible binaries.
  1305. Users of Unix based systems will have to compile the entire set
  1306. of programs -- no small task. Implementations of the program
  1307. exist for the IBM PC and compatibles utilizing Microsoft QuickC
  1308. (tm) compiler, for the AT&T Unix PC (tm) utilizing the native
  1309. TAM graphics system, and for X Windows version 11. Users of
  1310. other systems than these will face the substantial task of
  1311. implementing the graphics, keyboard, and directory routines
  1312. necessary to build the Space Flight Simulator on their machines.
  1313. Also, there are some built-in facilities for converting the SFS
  1314. software to utilize other languages than English. In some cases,
  1315. users may want to implement the software utilizing different
  1316. languages.
  1317. .P
  1318. In general, the procedure for implementing the software will
  1319. fall into two general stages. (a) In the first place, the user
  1320. must build the implementations of the Bywater specifications for
  1321. graphics output and mouse input (gr), keyboard input (kb), and
  1322. directory reading (dr), and then combine these to produce the
  1323. Bywater User Interface (ui). The object files produced in these
  1324. steps are then transferred (copied) to the Space Flight
  1325. Simulator file hierarchy. (b) The second stage is the building
  1326. of the SFS programs themselves. This may involve editing some of
  1327. the makefiles for particular implementations, and then copying
  1328. produced binary files to the SFS "bin" subdirectory where they
  1329. can be executed. In what follows, some more detailed
  1330. explanations of these processes are given.
  1331. .sp 2
  1332. .ne 5
  1333. .ce
  1334. 4.1 \fBFile and Directory Hierarchies\fR
  1335. .P
  1336. The development of the SFS software presupposes the existence of
  1337. a specific file hierarchy, which must be related
  1338. as described. In the
  1339. tables that follow, the slash ("/") is used as the directory
  1340. delimiter, but on MSDOS systems the delimiter will be the
  1341. backslash ("\\"). Although the name of the directory from 
  1342. which all the following subdirectories will grow can be
  1343. whatever one wishes, the hierarchy should contain the
  1344. following subdirectories: 
  1345. .TZ
  1346. .BA
  1347. .nf
  1348. .ne 9
  1349. \fIGeneral\fR:
  1350.  
  1351.     ./include    directory for include files
  1352.     ./lib        directory for completed object files
  1353.  
  1354. .ne 9
  1355. \fIThe Input/Output and UI Hierarchy\fR:
  1356.  
  1357.     ./io
  1358.     ./io/bw    Bywater error-handling subsystem
  1359.     ./io/gr    Graphics subsystem
  1360.     ./io/kb    Keyboard subsystem
  1361.     ./io/dr    Directory subsystem
  1362.     ./io/ui    User interface system
  1363.     ./io/tw Text Window subsystem (not used by SFS)
  1364.  
  1365. .ne 9
  1366. \fIThe SFS Hierarchy\fR:
  1367.  
  1368.     ./sfs
  1369.     ./sfs/sfs    SFS program code
  1370.     ./sfs/as    Astronomical subsystem
  1371.     ./sfs/map    Map utility
  1372.     ./sfs/bin    Datafiles and binary (executable) files
  1373. .fi
  1374. .BZ
  1375. .TA
  1376. Depending upon how a user receives the source code, she may have
  1377. to create these file hierarchies before moving the source code
  1378. into them.
  1379. .PF "''''"
  1380. .sp 2
  1381. .ne 5
  1382. .ce
  1383. 4.2 \fBUsing Script Files to Build SFS\fR
  1384. .P
  1385. There are a few script files designed to make compilation of
  1386. SFS easier on some systems; all are included in the "./io/ui"
  1387. and "./sfs/sfs"
  1388. subdirectories. The "./io/ui" subdirectory has two scripts
  1389. that will allow the user to build the input/output and user
  1390. interface systems. The file "buildlib.bat" will build the
  1391. input/output system and user interface on a PC-compatible
  1392. microcomputer, utilizing the Microsoft QuickC compiler. 
  1393. The file "buildlib.sh" will allow users to build the input/output
  1394. system and user interface on three Unix systems: the X windows
  1395. system, the AT&T Unix PC utilizing the TAM interface, and the
  1396. AT&T Unix PC utilizing the MGR interface.  The Unix script
  1397. ("buildlib.sh" should be run from the "./io/ui" sudbirectory
  1398. as "sh buildlib.sh".  The user will be prompted for a number
  1399. corresponding to the version you wish to
  1400. build, and from there is all is well the script will carry
  1401. through the building of the program. Both od the scripts 
  1402. ("buildlib.bat" for MSDOS and "Buildlib.sh" for Unix) will
  1403. copy all appropriate header files and object libraries to
  1404. their appropriate storage directories ("./include" for header
  1405. files and "./lib" for object libraries).
  1406. .P
  1407. The file "buildsfs.bat" will build SFS on a
  1408. PC-compatible microcomputer on which the SFS code is properly
  1409. loaded, and on which Microsoft QuickC has been installed. The
  1410. script file "buildsfs.sh" will allow you to build the program
  1411. on three Unix platforms: the X Windows system, the AT&T Unix
  1412. PC using the TAM interface, and the AT&T Unix PC using the MGR
  1413. user interface. This latter (Unix) script should be run from
  1414. the "./sfs/sfs" directory as "sh buildsfs.sh". You will be
  1415. prompted for a number corresponding to the version you wish to
  1416. build, and from there is all is well the script will carry
  1417. through the building of the program.
  1418. .sp 2
  1419. .ne 5
  1420. .ce
  1421. 4.3 \fBInclude Files\fR
  1422. .P
  1423. There are a number of include files for the input/output system
  1424. and the user interface that need to be available in the standard
  1425. include file directory. These are the following:
  1426. .TZ
  1427. .BA
  1428. .ne 9
  1429. \fIInclude Files\fR:
  1430.  
  1431.     ./io/bw/bw.h    Bywater error-handling header
  1432.     ./io/gr/gr.h    Graphics header
  1433.     ./io/kb/kb.h    Keyboard header
  1434.     ./io/dr/dr.h    Directory header
  1435.     ./io/ui/ui.h    User interface header
  1436.     ./io/tw/tw.h    Text Windows header (not used in SFS)
  1437.  
  1438. .BZ
  1439. .TA
  1440. These files should be copied to the SFS hierarchy's include
  1441. file directory in a user's system, i.e., "./include". The supplied
  1442. "buildlib" scripts (see above) will automatically copy the include
  1443. files to the appropriate directory.
  1444. .P
  1445. Programmers may note that the "bw.h" file does not stand for a
  1446. subsystem, but simply contains a few overhead lines for a
  1447. standard set of Bywater error-handling routines and data sets.
  1448. These allow us to generate error messages in low-level graphics
  1449. and input/output functions, which may be handled by applications
  1450. programs in a variety of ways.
  1451. .sp 2
  1452. .ne 5
  1453. .ls 1
  1454. .ce
  1455. 4.4 \fBImplementing the Input/Output System\fR
  1456. .ce
  1457. \fBand the User Interface\fR
  1458. .ls 2
  1459. .P
  1460. Note to PC implementers: in order to implement the Space Flight
  1461. Simulator, you must use the LARGE memory model for compiling
  1462. all modules of the program. If you are interested in using the
  1463. User Interface or other libraries for other purposes, you may
  1464. be able to compile with other memory models.
  1465. .P
  1466. For each of the input/output subsystems, there will be a
  1467. specification file giving information on how specific functions
  1468. should perform. These are as follows:
  1469. .TZ
  1470. .BA
  1471. .ne 9
  1472. \fISpecification Files\fR:
  1473.  
  1474.     ./io/gr/gr_spec.c    Graphics specification
  1475.     ./io/kb/kb_spec.c    Keyboard specification
  1476.     ./io/dr/dr_spec.c    Directory specification
  1477.  
  1478. .BZ
  1479. .TA
  1480. Existing implementations of the standards are in files labeled,
  1481. e.g., "kb_ibmpc.c" for the PC compatible implementation of the
  1482. keyboard standards, "gr_tam.c" for the implementation of the
  1483. graphics standards under the AT&T Unix PC's TAM system, and
  1484. "dr_unix.c" for a generic Unix implementation of the directory
  1485. standards.
  1486. .P
  1487. Since the specification files include the bare shells of
  1488. functions which must be implemented, programmers who want to
  1489. develop new implementations of the standards are encouraged to
  1490. copy the specification file to a new filename, and then to fill
  1491. in the function shells as appropriate. In each case there will
  1492. be a test program (for example, "gr_test.c") with a makefile to
  1493. test the standards. (Note that if you develop a newly named
  1494. implementation, the makefile[s] will have to be changed to
  1495. reflect the new names.) A suggested order for implementation is:
  1496. directory subsystem, keyboard subsystem, and graphics subsystem.
  1497. The graphics subsystem test program requires an implementation
  1498. of the keyboard subsystem. However, there are many cases (such
  1499. as the implementation under X Windows) where the graphics and
  1500. keyboard subsystems must be developed in tandem.
  1501. .sp 2
  1502. .ne 5
  1503. 4.4.1 Implementing the Graphics (gr) System 
  1504. .P
  1505. The graphics subsystem also includes pointer device (mouse)
  1506. routines, since these are usually intimately connected with
  1507. computer graphics systems. The graphics subsystem will be,
  1508. almost unquestionably, the most difficult to implement, and
  1509. requires that you know how to draw pixels, lines, rectangles
  1510. (filled in various ways), circles, and the like both to the
  1511. computer screen and to memory buffers which can be copied
  1512. (blitted) back and forth (from screen to memory and vice versa).
  1513. The graphics system must also be able to address text lines to
  1514. pixel-specific locations on the screen. Note that there are some
  1515. default routines (file "gr_def.c") for lines, rectangles, and
  1516. circles which can be built from a single pixel routines. These
  1517. may, however, be extremely slow. Use the file "gr_test.c" with
  1518. its associated makefile to test the graphics subsystem.
  1519. .sp 2
  1520. .ne 5
  1521. 4.4.2 Implementing the Keyboard (kb) System
  1522. .P
  1523. The keyboard system may be rather more straightforward, but
  1524. should allow two critical abilities: (a) it needs to implement a
  1525. keyboard scan routine which will tell if a key has been pressed
  1526. \fIwithout\fR waiting for a key to be pressed, and (b) it should
  1527. return certain eight-bit codes (defined in "kb.h") for arrow
  1528. keys, function keys, and the like. Use the "kb_test.c" file with
  1529. its associated makefile to test the keyboard subsystem, or (if
  1530. developed in tandem with the graphics subsystem), use
  1531. "gr_test.c" to test both the keyboard and graphics subsystems
  1532. together.
  1533. .TZ
  1534. .BA
  1535. \fINote to Old-Timers\fR. Remember CP/M? CP/M had the keyboard
  1536. scan routine built into its operating system. Unix offers nothing
  1537. quite so straightforward. 
  1538. .BZ
  1539. .TA
  1540. .sp 2
  1541. .ne 5
  1542. 4.4.3 Implementing the Directory (dr) System 
  1543. .P
  1544. The directory subsystem implements two simple subroutines (also
  1545. present to the CP/M operating system, but lacking from more
  1546. sophisticated machines): one gives the first file that matches
  1547. an ambiguous specification (like "*.c"), the other returns the
  1548. next file that matches that specification. Either routine may
  1549. return BW_ERROR, indicating that there are no files (or no more
  1550. files) matching the specification. Use the "dr_test.c" program
  1551. and its associated makefile to test the directory subsystem. The
  1552. existing implementation of the directory subsystem for Unix
  1553. machines simply breaks out to a shell, calls "ls -1c
  1554. [specifier]", and reads the files from a temporary file
  1555. containing the filenames. Clumsy, but it works.
  1556. .sp 2
  1557. .ne 5
  1558. 4.4.4 Building the User Interface
  1559. .P
  1560. Once the graphics, keyboard, and directory subsystems have been
  1561. implemented, the user may proceed to build the Bywater User
  1562. Interface, using "ui_test.c" and its associated makefile.
  1563. Remember that specific filenames in the makefile may have to be
  1564. changed if a programmer has developed new implementations. The
  1565. "ui_test" program should illustrate all of the basic abilities
  1566. of the Bywater User Interface. Once the implementation is
  1567. completed, copy or move all the object files (except
  1568. "ui_test.o[bj]) to the library subdirectory (./sfs/lib) of the
  1569. SFS file hierarchy, where they will be used in building the
  1570. Space Flight Simulator itself.
  1571. .sp 2
  1572. .ne 5
  1573. .ce
  1574. 4.5 \fBCompiling the Space Flight Simulator\fR
  1575. .P
  1576. Once the User Interface has been implemented, the hard work is
  1577. over. The Space Flight Simulator code is built from the
  1578. ./sfs/sfs subdirectory of the SFS file hierarchy. (It will also
  1579. compile some files from the ./sfs/as directory, but normally one
  1580. does not have to switch to that directory.) Makefile systems
  1581. vary, and thus there are currently two forms of makefile for the
  1582. SFS program building process. 
  1583. .P
  1584. For \fIPC compatible computers using Microsoft QuickC\fR, there
  1585. are separate makefiles for sfs (the program loader), sfsm (the
  1586. main menu and orbital modeling module), and sfsx (the simulation
  1587. module). Each of these must be built separately from the
  1588. "./sfs/sfs" subdirectory. \fIImportant notes\fR: When using
  1589. Microsoft QuickC, it is important that the global SPAWN should
  1590. be defined in the file "sfs.c". Moreover, once the files have
  1591. been built, they will exist in the ./sfs/sfs subdirectory as
  1592. "sfs.exe", "sfsm.exe", and "sfsx.exe". The file "sfs.exe" should
  1593. be copied as is to the ./sfs/bin subdirectory. The file
  1594. "sfsm.exe" should be copied to the ./sfs/bin subdirectory as
  1595. "sfsm.app". Similarly, the file "sfsx.exe" should be copied to
  1596. the ./sfs/bin subdirectory as "sfsx.app". 
  1597. .TZ
  1598. .BA
  1599. \fIQuery: Why the name changes\fR? The files "sfsm" and "sfsx"
  1600. must be loaded from the program loader ("sfs") and the system
  1601. cpuld crash if they are not. For this reason, we have elected to
  1602. change the name of their binary files to "*.app" so as to
  1603. prevent them from being executed from the command line. It is
  1604. for this reason that it is important that the global "SPAWN"
  1605. should be defined in "sfs.h": this instructs the compiler to use
  1606. the spawn() routine which can execute the "*.app" files.
  1607. .BZ
  1608. .TA
  1609. .P
  1610. For \fIUnix\fR based computers, there will be a single makefile
  1611. for the SFS system. You
  1612. will have to edit the makefile if you want to include the
  1613. correct object filenames for your graphics, keyboard, and
  1614. directory subsystem files. Three makefiles supplied are
  1615. "makefile.x" for X Windows systems, "makefile.tam" for the
  1616. AT&T Unix PC using the TAM interface, and "makefile.mgr" for
  1617. the AT&T Unix PC using the MGR implementation. It is suggested
  1618. that you copy or move one of these
  1619. files to "makefile" (with no extension) to build the programs.
  1620. For new Unix or other implementations, you may have to do more
  1621. extensive editing to the makefiles. The Unix makefiles should
  1622. handle moving the binaries to the ./sfs/bin subdirectory. The
  1623. X implementations have been tested only on DECstation 2100 and 3100
  1624. workstations, and may not prove adequate on other X platforms.
  1625. .PH "''''"
  1626. .SK
  1627. .sp 4
  1628. .ce
  1629. Chapter 5
  1630. .sp
  1631. .ce
  1632. SFS DATA FILE FORMATS
  1633. .PH "'SFS \*V'Chapter 5'Page #'"
  1634. .PF "''Page  #''"
  1635. .sp 3
  1636. .TA
  1637. .na
  1638. .ne 5
  1639. .P
  1640. The Space Flight Simulator uses a number of data files which are
  1641. accessible to users as ASCII text files. Users may wish to alter
  1642. these files for use with SFS, or may find other applications for
  1643. the data. The data formats are described in the following
  1644. paragraphs. Users should note that in all SFS data files, lines
  1645. beginning with a semicolon (";") are discarded, and thus can be
  1646. used to enter comments into a data file. 
  1647. .sp 2
  1648. .ne 5
  1649. 5.1 SFS Program Files (*.sfs)
  1650. .P
  1651. Space Flight Simulator program files have the extension "*.sfs"
  1652. and give data describing particular orbits. These files can be
  1653. developed using the orbital modeling module. Each SFS program
  1654. file has a header of one line which contains the program title
  1655. (can be more than one word). From this point, the program file
  1656. is an interpreted language, in which any of the following
  1657. keywords may appear:
  1658. .TZ
  1659. .BA
  1660. .nf
  1661. .ne 6
  1662. The following apply to the program in general, and require
  1663. a single integer (i) following the keyword. They should appear
  1664. only once in a program file:
  1665.  
  1666. .ne 6
  1667. tfactor     i  time factor in multiples of real time
  1668. update      i  screen update interval in seconds
  1669. trig        i  trig precision level (1 = fast, 2 = accurate)
  1670. insertion   i  insertion point in seconds
  1671.  
  1672. .ne 6
  1673. The following apply to a specific orbit, and require both
  1674. an integral orbit number (o) and another argument which may
  1675. be a string (s), or a double-precision number (d). They may
  1676. appear once for each orbit in a program:
  1677.  
  1678. .ne 11
  1679. name        o  s  name of spacecraft/orbit
  1680. focus       o  s  name of focal data file for this orbit
  1681. periapsis   o  d  periapsis in kilometers above the surface
  1682. apoapsis    o  d  apoapsis in kilometers above the surface
  1683. inclination o  d  inclination in degrees
  1684. argper      o  d  argument of the perigee in degrees
  1685. lonan       o  d  longitude of the ascending node in degrees
  1686. orb         o  s  spherical data file for orb
  1687. grid        o  s  spherical data file for lat-lon grid
  1688. surface     o  s  spherical data file for surface features
  1689.  
  1690. .fi
  1691. .BZ
  1692. .TA
  1693. Users might study examples of SFS program files before
  1694. attempting to alter them. Only the items "grid" and "orb" cannot
  1695. be specified from the orbital modeling module (and altering them
  1696. can have grotesque results). For this reason, users are
  1697. cautioned to use the modeling module, where more precautions are
  1698. available.
  1699. .sp 2
  1700. .ne 5
  1701. 5.2 Focal Data Files (*.fd)
  1702. .P
  1703. Focal data files have the extension "*.fd" and describe a
  1704. particular orbital focus. They are rather more straightforward,
  1705. and have the following structure (elements must appear in this
  1706. order):
  1707. .TZ
  1708. .BA
  1709. .nf
  1710. .ne 4
  1711. \fIElements in a Focal Data File\fR: 
  1712.  
  1713. .ne 6
  1714. the name of the orbital focus (a single word)
  1715. an adjective describing the focus (a single word)
  1716. the diameter of the focus in kilometers
  1717. the mass of the focus (earth = 1.0)
  1718. the sidereal period of the focus in seconds
  1719.  
  1720. .ne 4
  1721. \fIAn Example ("earth.fd")\fR:
  1722.  
  1723. .ne 6
  1724. Earth
  1725. terrestrial
  1726. 6378
  1727. 1.0
  1728. 86164
  1729.  
  1730. .fi
  1731. .BZ
  1732. .TA
  1733. .PF "''''"
  1734. Again, users are advised to study existing focal data files
  1735. before creating new ones. 
  1736. .sp 2
  1737. .ne 5
  1738. 5.3 Spherical Projection Data Files (*.spd)
  1739. .P
  1740. Spherical projection data (SPD) files have the extension "*.spd"
  1741. and describe points in three-dimensional space by latitude,
  1742. longitude, and altitude. The spherical projection data format is
  1743. derived distantly from the binary format employed by the Micro
  1744. World Database (tm). The Space Flight Simulator uses spherical
  1745. projection data files to describe surface features of orbital
  1746. foci (for example, the earth's landmasses in "earth.spd"). Each
  1747. line in a SPD file describes a single point, and consists of the
  1748. following elements:
  1749. .sp
  1750. .nf
  1751.     code    latitude    longitude    altitude
  1752. .fi
  1753. The code is either a number above 1000 indicating the beginning
  1754. of a new line, or a number below 1000 indicating the continuation
  1755. of a line. 
  1756. .TZ
  1757. .BA
  1758. \fIAn Example\fR: The following is a simple spherical data file
  1759. ("meridian.spd") that draws a central meridian on the surface of
  1760. a planet:
  1761.  
  1762. .ne 6
  1763. .nf
  1764. ;    meridian.spd
  1765. ;
  1766. ;    display single central meridian
  1767. ;
  1768. ;
  1769. 1001    -90.0    0.0    6000.0
  1770. 5    -80.0    0.0    6000.0
  1771. 5    -70.0    0.0    6000.0
  1772. 5    -60.0    0.0    6000.0
  1773. 5    -50.0    0.0    6000.0
  1774. 5    -40.0    0.0    6000.0
  1775. 5    -30.0    0.0    6000.0
  1776. 5    -20.0    0.0    6000.0
  1777. 5    -10.0    0.0    6000.0
  1778. 5    0.0    0.0    6000.0
  1779. 5    10.0    0.0    6000.0
  1780. 5    20.0    0.0    6000.0
  1781. 5    30.0    0.0    6000.0
  1782. 5    40.0    0.0    6000.0
  1783. 5    50.0    0.0    6000.0
  1784. 5    60.0    0.0    6000.0
  1785. 5    70.0    0.0    6000.0
  1786. 5    80.0    0.0    6000.0
  1787. 5    90.0    0.0    6000.0
  1788.  
  1789. .ne 6
  1790. .fi
  1791. \fIRoom for Improvement\fR: At present all codes for beginning a
  1792. new line are set to 1001 and all codes for continuing a line are
  1793. set to 5. Future versions of the software might develop a more
  1794. elaborate set of codes above 1000 which could indicate, e.g.,
  1795. gas forms (for describing gas giants such as Jupiter), landmass
  1796. delimiters, craters, mountains, rifts, and the like. Then the
  1797. program might assign various colors to different features. Also,
  1798. the SFS programs currently ignore the altitude, presuming that
  1799. all points are on the surface (thus, the altitude of each point
  1800. is set equal to the focal radius). Future versions might
  1801. recognize altitudes, thus enabling the display of irregular
  1802. orbital foci. Also, future versions of SPD files might allow a
  1803. comment or title at the end of a point, so that titles could be
  1804. shown on a focal surface.
  1805. .BZ
  1806. .TA
  1807. .PH "''''"
  1808. .SK
  1809. .sp 4
  1810. .ce
  1811. Chapter 6
  1812. .sp
  1813. .ce
  1814. The MAP Utility
  1815. .sp 2
  1816. .PH "'SFS \*V'Chapter 6'Page #'"
  1817. .PF "''Page  #''"
  1818. .P
  1819. The MAP utility (source code and binaries are distributed
  1820. separately from the PC version of the SFS software) allows users
  1821. to enter spherical projection data points by pointing and
  1822. clicking the pointer device within a latitude-longitude grid.
  1823. The MAP utility thus requires the use of a pointer (mouse) device.
  1824. .P
  1825. The MAP utility is entered from the command line with an
  1826. optional argument specifying the SPD datafile to be worked on.
  1827. Thus the command line,
  1828. .nf
  1829.     map earth.spd
  1830. .fi
  1831. would enter the MAP utility and begin work on the file "earth.spd".
  1832. The filename "test.spd" is used as a default if no argument is
  1833. specified on the command line. Once the MAP utility has been
  1834. entered, the working file cannot be changed. 
  1835. .P
  1836. The MAP utility utilizes the same user interface as the Space
  1837. Flight Simulator, and has a main menu that is accessible by pressing
  1838. the ESCAPE key or by clicking the pointer device on the top
  1839. (title) bar.  The following are the options available in the main
  1840. MAP menu.
  1841. .sp 2
  1842. .ne 5
  1843. 6.1 Change Position
  1844. .P
  1845. This option from the main menu allows the user to focus on a
  1846. particular position of the latitude-longitude grid, or to look at
  1847. the entire latitude-longitude grid.  By pressing the arrow keys,
  1848. a dark outline of the selected area can be moved around.  By
  1849. pressing the RETURN or ENTER key, the currently selected area is
  1850. chosen, and the screen will be redrawn accordingly.
  1851. .sp 2
  1852. .ne 5
  1853. 6.2 Enter Title or Comments
  1854. .P
  1855. The Space Flight Simulator's Spherical Projection Data (SPD)
  1856. format allows for embedded title and comment lines.  This option
  1857. from the main MAP utility menu allows the user to enter a line of
  1858. text that will be embedded in the working data file as a title or
  1859. comment. Since comment lines will not be entered at run time,
  1860. they are used solely for making sense of an SPD data file when it
  1861. is read by a text editor, and users are encouraged to document and
  1862. comment their SPD files as elaborately as possible.
  1863. .sp 2
  1864. .ne 5
  1865. 6.3 Begin Sequence
  1866. .P
  1867. This is where the serious work of the MAP utility is done. This
  1868. option from the main MAP utility menu allows users to enter a
  1869. sequence of points on the latitude-longitude grid, which are
  1870. recorded in the working data file.  After selecting this item,
  1871. the user points the pointer device at specific points on the
  1872. grid, and presses and releases the left button to mark the point.
  1873. At the next point entered, a line will be drawn from the previous
  1874. point to the new point, and so on.  The sequence is ended by
  1875. clicking in the "QUIT" label in the top (title) bar. 
  1876. .P
  1877. By pressing in the "BACKUP" label in the top (title) bar, the
  1878. user can erase the most recently added point. The user should be
  1879. careful, then, to check each point as it is entered, and BACKUP
  1880. if it has not been positioned correctly. 
  1881. .P
  1882. Users of the MAP utility should remember that all of the points
  1883. in a sequence will be joined by direct lines. For this reason,
  1884. the user should only enter points in a particular sequence that
  1885. will be tied together. It is recommended that complex figures be
  1886. broken up into smaller units, even when unbroken sequences of
  1887. lines are desired (begin a new sequence at the last point of the
  1888. old one to carry through the appearance of unbrokenness).
  1889. .sp 2
  1890. .ne 5
  1891. 6.4 Set Default Attitude
  1892. .P
  1893. Although the present version of the Space Flight Simulator takes
  1894. all surface points to be at the (average) radius of an orbital
  1895. focus, the SPD specification allows an altitude for the point to
  1896. be entered.  This will eventually allow SFS to develop more
  1897. elaborate three-dimensional simulations.  Typically, the altitude
  1898. is simply set to the radius of the rbital focus.  This option
  1899. from the main MAP utility menu allows the user to specify a
  1900. default altitude that will be used for all subsequent points
  1901. entered. 
  1902. .sp 2
  1903. .ne 5
  1904. 6.5 Exit
  1905. .P
  1906. This item allows the user to exit from the MAP utility. The
  1907. current working data file is saved with all changes that have
  1908. been entered.
  1909. .BZ
  1910. .TA
  1911. .PH "''''"
  1912. .SK
  1913. .sp 4
  1914. .ce
  1915. Chapter 7
  1916. .sp
  1917. .ce
  1918. COMMUNICATIONS
  1919. .sp 3
  1920. .ls 1
  1921. .nf
  1922. Bywater Software
  1923. P. O. Box 4023
  1924. Duke Station
  1925. Durham, NC  27706
  1926.  
  1927. email: tcamp@teer3.acpub.duke.edu
  1928. .fi
  1929. .TA
  1930. .sp 2
  1931. .ne 6
  1932. About the author:
  1933. .sp
  1934. .P
  1935. Ted A. Campbell is an Assistant Professor of Church History at
  1936. the Divinity School, Duke University. Programming is an
  1937. avocational interest. In addition to books and articles in the
  1938. field of Church History, he is the author of the program
  1939. "Stardate," published by the National Collegiate Software
  1940. Clearinghouse. 
  1941. .ls 2
  1942. .TZ
  1943. ..    \"===================================================
  1944. ..    \"    end of sfs.ro
  1945. ..    \"===================================================
  1946.