home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume27 / sfs / part15 < prev    next >
Encoding:
Text File  |  1991-12-27  |  55.2 KB  |  1,493 lines

  1. Newsgroups: comp.sources.misc
  2. From: tcamp@hercules.acpub.duke.edu (Ted Campbell)
  3. Subject:  v27i015:  sfs - Space Flight Simulator, Part15/21
  4. Message-ID: <1991Dec24.191753.20927@sparky.imd.sterling.com>
  5. X-Md4-Signature: df14c2b936250136dbd2e18d42fab8cd
  6. Date: Tue, 24 Dec 1991 19:17:53 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: tcamp@hercules.acpub.duke.edu (Ted Campbell)
  10. Posting-number: Volume 27, Issue 15
  11. Archive-name: sfs/part15
  12. Environment: IBMPC && EGA/VGA, UNIX-PC && MGR, UNIX && X11
  13.  
  14. #!/bin/sh
  15. # do not concatenate these parts, unpack them in order with /bin/sh
  16. # file sfs/doc/null.tab continued
  17. #
  18. if test ! -r _shar_seq_.tmp; then
  19.     echo 'Please unpack part 1 first!'
  20.     exit 1
  21. fi
  22. (read Scheck
  23.  if test "$Scheck" != 15; then
  24.     echo Please unpack part "$Scheck" next!
  25.     exit 1
  26.  else
  27.     exit 0
  28.  fi
  29. ) < _shar_seq_.tmp || exit 1
  30. if test ! -f _shar_wnt_.tmp; then
  31.     echo 'x - still skipping sfs/doc/null.tab'
  32. else
  33. echo 'x - continuing file sfs/doc/null.tab'
  34. sed 's/^X//' << 'SHAR_EOF' >> '_shar_tmp_.tmp' &&
  35. M3E5,3"!P;W-T<')O8V5S<V]R("AN;R!P;W-T<')O8V5S<V]R(&-O9&5S(&ES
  36. '<W5E9"D*&G-T
  37. `
  38. end
  39. SHAR_EOF
  40. echo 'File sfs/doc/null.tab is complete' &&
  41. echo 'uudecoding file sfs/doc/null.tab' &&
  42. uudecode < _shar_tmp_.tmp && rm -f _shar_tmp_.tmp &&
  43. chmod 0644 sfs/doc/null.tab ||
  44. echo 'restore of sfs/doc/null.tab failed'
  45. Wc_c="`wc -c < 'sfs/doc/null.tab'`"
  46. test 52 -eq "$Wc_c" ||
  47.     echo 'sfs/doc/null.tab: original size 52, current size' "$Wc_c"
  48. rm -f _shar_wnt_.tmp
  49. fi
  50. # ============= sfs/doc/nx10.tab ==============
  51. if test -f 'sfs/doc/nx10.tab' -a X"$1" != X"-c"; then
  52.     echo 'x - skipping sfs/doc/nx10.tab (File already exists)'
  53.     rm -f _shar_wnt_.tmp
  54. else
  55. > _shar_wnt_.tmp
  56. echo 'x - extracting sfs/doc/nx10.tab (Binary)'
  57. sed 's/^X//' << 'SHAR_EOF' > _shar_tmp_.tmp &&
  58. begin 600 sfs/doc/nx10.tab
  59. M4W1A<B!-:6-R;VYI8W,@3E@M,3`@4')I;G1E<@IB9&]N"2)<,#,S1R(*8F1O
  60. M9F8)(EPP,S,U7#`S,T@B"FET;VX)(EPP,S,T(@II=&]F9@DB7#`S,S5<,#,S
  61. D2"(*=7`)(EPP,S-J7#`R,B(*9&]W;@DB7#`S,TI<,#(R(@H:
  62. `
  63. end
  64. SHAR_EOF
  65. echo 'uudecoding file sfs/doc/nx10.tab' &&
  66. uudecode < _shar_tmp_.tmp && rm -f _shar_tmp_.tmp &&
  67. chmod 0644 sfs/doc/nx10.tab ||
  68. echo 'restore of sfs/doc/nx10.tab failed'
  69. Wc_c="`wc -c < 'sfs/doc/nx10.tab'`"
  70. test 126 -eq "$Wc_c" ||
  71.     echo 'sfs/doc/nx10.tab: original size 126, current size' "$Wc_c"
  72. rm -f _shar_wnt_.tmp
  73. fi
  74. # ============= sfs/doc/sfs.ro ==============
  75. if test -f 'sfs/doc/sfs.ro' -a X"$1" != X"-c"; then
  76.     echo 'x - skipping sfs/doc/sfs.ro (File already exists)'
  77.     rm -f _shar_wnt_.tmp
  78. else
  79. > _shar_wnt_.tmp
  80. echo 'x - extracting sfs/doc/sfs.ro (Text)'
  81. sed 's/^X//' << 'SHAR_EOF' > 'sfs/doc/sfs.ro' &&
  82. ..    \"===================================================
  83. ..    \"
  84. ..    \"    sfs.ro
  85. ..    \"
  86. ..    \"    documentation for Space Flight Simulator
  87. ..    \"    copyright (c) 1991, Ted A. Campbell
  88. ..    \"
  89. ..    \"
  90. ..    \"    NOTE: this documentation is in a format com-
  91. ..    \"    patible with the "ro" text formatter. The file
  92. ..    \"    sfs.doc is an ASCII output version of this file
  93. ..    \"    with no formatting marks. 
  94. ..    \"
  95. ..    \"    To print this file to an ANSI terminal, use:
  96. ..    \"
  97. ..    \"        ro -Tansi.tab sfs.ro | more
  98. ..    \"    
  99. ..    \"    To send it with no underline or bold to a
  100. ..    \"    printer, use:
  101. ..    \"
  102. ..    \"        ro -Tnull.tab sfs.ro >prn
  103. ..    \"
  104. ..    \"    For further details on ro usage and formatting,
  105. ..    \"    see the ro documentation.
  106. ..    \"
  107. ..    \"===================================================
  108. .so tmac.m
  109. ..    \"===================================================
  110. ..    \"    String "V" -- current version number
  111. .ds V "1.01"
  112. ..    \"===================================================
  113. ..    \"    String "Y" -- copyright year
  114. .ds Y "1991"
  115. ..    \"===================================================
  116. ..    \"    Page Headers and Footers
  117. .PF "''''"
  118. ..    \"===================================================
  119. .sp 12
  120. .ce
  121. Bywater Software
  122. .sp 2
  123. .ce
  124. SPACE FLIGHT SIMULATOR
  125. .sp 5
  126. .ce
  127. Version \*V
  128. .sp 2
  129. .ce
  130. Copyright (c) \*Y,
  131. .ce
  132. Ted A. Campbell
  133. .sp 4
  134. .ce
  135. Bywater Software
  136. .ce
  137. P. O. Box 4023
  138. .ce
  139. Duke Station
  140. .ce
  141. Durham, NC  27706
  142. .sp 2
  143. .ce
  144. email: tcamp@hercules.acpub.duke.edu
  145. .SK
  146. .PF "''Page  #''"
  147. .sp 4
  148. .ce
  149. CONTENTS
  150. .sp 4
  151. .nf
  152. .ne 6
  153. 0. Quick Start Information ..................................
  154. X
  155. .ne 6
  156. 1. Introduction .............................................
  157. X
  158. X   1.1 Description ..........................................
  159. X   1.2 Copyright and Distribution Information ...............
  160. X   1.3 Hardware Requirements ................................
  161. X   1.4 Unpacking SFS ........................................
  162. X   1.5 Starting SFS .........................................
  163. X   1.6 Exiting SFS ..........................................
  164. X   1.7 Running the Default SFS Program ......................
  165. X
  166. .ne 6
  167. 2. Developing Orbital Simulations ...........................
  168. X
  169. X   2.1 Selecting a SFS Program File .........................
  170. X       2.1.1 Using Bywater UI Menus .........................
  171. X   2.2 The Main Modeling Menu ...............................
  172. X       2.2.1 Set Program Title ..............................
  173. X           2.2.1.1 Using Bywater UI Dialogue Boxes ..........
  174. X       2.2.2 Set Current Orbit ..............................
  175. X           2.2.2.1 Mass of the Orbital Focus ................
  176. X           2.2.2.2 Radius of the Orbital Focus ..............
  177. X           2.2.2.3 Sidereal Period of the Orbital Focus .....
  178. X           2.2.2.4 Semiminor Axis of the Orbit ..............
  179. X           2.2.2.5 Eccentricity of the Orbit ................
  180. X           2.2.2.6 Orbital Period ...........................
  181. .ne 6
  182. X       2.2.3 Set Orbital Parameters .........................
  183. X           2.2.3.1 Set Orbital Focus ........................
  184. X           2.2.3.2 Set Orbit/Spacecraft Name ................
  185. X           2.2.3.3 Set Surface Datafile .....................
  186. X           2.2.3.4 Set Orbital Periapsis ....................
  187. X           2.2.3.5 Set Orbital Apoapsis .....................
  188. X           2.2.3.6 Set Orbital Inclination ..................
  189. X           2.2.3.7 Set Argument of the Periapsis ............
  190. X           2.2.3.8 Set Longitude of the Ascending Node ......
  191. X           2.2.3.9 Exit from Orbital Parameters Menu ........
  192. X       2.2.4 Set Insertion Parameter ........................
  193. .ne 6
  194. X       2.2.5 Set System Parameters ..........................
  195. X           2.2.5.1 Set Time Factor ..........................
  196. X           2.2.5.2 Set Screen Update Interval ...............
  197. X           2.2.5.3 Set Trig Precision Level .................
  198. X           2.2.5.4 Exit from System Parameters Menu .........
  199. X       2.2.6 View Current Orbit .............................
  200. X       2.2.7 Exit from Main Modeling Menu ...................
  201. X
  202. .ne 6
  203. 3. Advanced Control of the Simulation Module ................
  204. X
  205. .ne 6
  206. X   3.1 Simulation Module Information Panels .................
  207. .ne 6
  208. X   3.2 Simulation Module Displays ...........................
  209. X       3.2.1 The Visual Simulation ..........................
  210. X       3.2.2 The Ground Track Display .......................
  211. X       3.2.3 The Distant Perspective Display ................
  212. .ne 6
  213. X   3.3 The Escape Menu ......................................
  214. X       3.3.1 Changing the Display ...........................
  215. X       3.3.2 Changing System Parameters .....................
  216. X       3.3.3 Exits from the Simulation Module ...............
  217. .ne 6
  218. X   3.4 Simulation Module Toggles ............................
  219. X
  220. .ne 6
  221. 4. Compiling SFS ............................................
  222. X
  223. .ne 6
  224. X   4.1 File and Directory Hierarchies .......................
  225. .ne 6
  226. X   4.2 Using Script Files to Build SFS ......................
  227. .ne 6
  228. X   4.3 Include Files ........................................
  229. .ne 6
  230. X   4.4 Implementing the Input/Output System and the UI ......
  231. X       4.3.1 Implementing the Graphics (gr) System ..........
  232. X       4.3.2 Implementing the Keyboard (kb) System ..........
  233. X       4.3.3 Implementing the Directory (dr) System .........
  234. X       4.3.4 Building the User Interface (ui) ...............
  235. .ne 6
  236. X   4.5 Compiling the Space Flight Simulator .................
  237. X
  238. .ne 6
  239. 5. SFS Data File Formats ....................................
  240. X
  241. .ne 6
  242. X   5.1 SFS Program Files (*.sfs) ............................
  243. X   5.2 Focal Data Files (*.fd) ..............................
  244. X   5.3 Spherical Projection Data Files (*.spd) ..............
  245. X
  246. .ne 6
  247. 6. The MAP Utility ..........................................
  248. X
  249. .ne 6
  250. X   6.1 Change Position ......................................
  251. X   6.2 Enter Title or Comments ..............................
  252. X   6.3 Begin Sequence .......................................
  253. X   6.4 Set Default Attitude .................................
  254. X   6.5 Exit .................................................
  255. X
  256. 7. Communications ...........................................
  257. X
  258. .fi
  259. .PH "''''"
  260. .PF "''Page  #''"
  261. .SK
  262. .sp 4
  263. .ce
  264. QUICK START INFORMATION
  265. .sp
  266. .TA
  267. .TZ
  268. .BA
  269. If you have the executable \fIPC version\fR of the Space Flight
  270. Simulator and want a quick start, copy all the files (possibly
  271. from two 5.25" diskettes) into one directory. Change to this
  272. directory, and enter "sfs" to run the program. If you are using
  273. Hercules (tm) graphics, you must run the program "msherc" before
  274. running "sfs." The program is menu-driven, and should largely be
  275. self-explanatory from this point.
  276. .P
  277. If you are planning to install the Space Flight Simulator on a
  278. \fIUnix\fR or other system, the program will have to be compiled
  279. (and possibly implemented for your system). Implementations
  280. currently exist for Unix based systems using the X Windows
  281. system, and for the AT&T Unix PC (tm). Turn to chapter four for
  282. further information on compiling the software.
  283. .BZ
  284. .TA
  285. .TZ
  286. .SK
  287. .PH "''''"
  288. .PF "''Page  #''"
  289. .sp 4
  290. .ce
  291. Chapter 1
  292. .sp
  293. .ce
  294. INTRODUCTION
  295. .PH "'SFS \*V'Chapter 1'Page #'"
  296. .sp 3
  297. .TA
  298. .na
  299. .ne 5
  300. .ce
  301. 1.1 \fBDescription\fR
  302. .P
  303. The development of microcomputers has been directly related to
  304. the progress of the U.S. and Soviet space programs. Not only did
  305. the space programs demand increasing miniaturization of computer
  306. hardware and software, thus preparing the way for the
  307. development of microcomputers, but they also began to develop
  308. software techniques for spacecraft tracking and eventually
  309. visualization. It is not surprising, then, that computers and
  310. space technology are closely associated in the minds of many
  311. people. 
  312. .P
  313. The Space Flight Simulator by Bywater Software offers a means of
  314. simulating orbital flight, and since all space flight is, one
  315. way or another, orbital flight, it can appropriately be called a
  316. "space flight simulator." The fact of the matter is, however,
  317. that orbital flight involves a fair degree of mathematics, and
  318. once an orbit has been selected space flight does not at all
  319. involve the kind of instantaneous (and personal) "piloting" that
  320. makes atmospheric craft (airplanes, jets, helicopters) exciting.
  321. Orbital Flight, that is, can be dull by comparison.
  322. .P
  323. Bywater's Space Flight Simulator can keep track of a number of
  324. orbital spacecraft (simultaneously) in its current version, and
  325. offers three visual representations of orbital flight: a ground
  326. track map (of all orbits around a particular orbital focus, such
  327. as the earth or the moon), a "visual simulation" showing the
  328. orbital focus as it might appear from the space craft, and a
  329. "distant perspective" that shows all orbits around a particular
  330. focus.
  331. .TZ
  332. .BA
  333. \fIRoom for Improvement\fR. The Space Flight Simulator does not
  334. yet have the capability of calculating and executing transfer
  335. orbits, or transfers from one orbital focus to another (e.g.,
  336. from the earth to the moon). These are areas for future
  337. development of the program. 
  338. .BZ
  339. .TA
  340. .P
  341. The Space Flight Simulator has two principal parts: a modeling
  342. module (including the main program menu) that allows the
  343. development of particular orbital models, and a simulation
  344. module that attempts to display the orbits selected in real
  345. time. The program begins by displaying a main menu that allows
  346. the user to select a previously written SFS program file, alter
  347. a SFS program file, proceed to orbital simulation, or exit the
  348. program. This document attempts to explain the various options
  349. available to the SFS user. 
  350. .sp 2
  351. .ne 5
  352. .PF "''''"
  353. .ce
  354. 1.2 \fBCopyright and Distribution Information\fR
  355. .P
  356. The Space Flight Simulator is distributed under the following
  357. agreement: 
  358. .TZ
  359. .BA
  360. .P
  361. All U.S. and international copyrights are claimed by the author.
  362. The author grants permission to use this code and software based
  363. on it under the following conditions: 
  364. .P
  365. (a) in general, the code and software based upon it may be used
  366. by individuals and by non-profit organizations;
  367. .P
  368. (b) it may also be utilized by governmental agencies in any
  369. country, with the exception of military agencies;
  370. .P
  371. (c) the code and/or software based upon it may not be sold for a
  372. profit without an explicit and specific permission from the
  373. author, except that a minimal fee may be charged for media on
  374. which it is copied, and for copying and handling;
  375. .P
  376. (d) the code must be distributed in the form in which it has
  377. been released by the author;
  378. .P
  379. and (e) the code and software based upon it may not be used for
  380. illegal activities.
  381. .BZ
  382. .TA
  383. .P
  384. This answers roughly to what some call a "freeware" agreement.
  385. One can use the program as one wishes for non-profit, peaceful,
  386. and legal purposes, one can copy it freely and give it to
  387. whomever one pleases, and the author expects no compensation for
  388. these uses. Users are not allowed to sell the program, to use it
  389. for military uses, or to use it for illegal activities. I am not
  390. naive, actually, but I do not consent for my program to be used
  391. for these purposes.
  392. .sp 2
  393. .ne 5
  394. .ce
  395. 1.3 \fBHardware Requirements\fR
  396. .P
  397. CPU and Coprocessor (MSDOS version):  SFS version \*V will run
  398. under MSDOS or PCDOS on any of the 8088 and upwardly-compatible
  399. CPUs.  Speed of the processor is critical in this program. The
  400. presence of a math coprocessor will be automatically detected by
  401. the program, and will also greatly enhance the performance of
  402. the program. 
  403. .P
  404. Graphics (MSDOS version):  SFS version \*V is configured to work
  405. with Hercules (tm), EGA, or VGA graphics, and must support at
  406. least two pages of memory.  Because CGA does not allow multiple
  407. pages of video memory, it cannot be used. The program
  408. automatically detects these graphics systems, except the
  409. Hercules-type cards.  For systems with Hercules-compatible
  410. graphics, run the program "msherc.com" first.
  411. .TZ
  412. .BA
  413. What about CGA graphics? Actually, SFS will try to run on these
  414. systems, but the result will not be very attractive, for two
  415. reasons: (a) the fonts are too coarse to be read easily and will
  416. probably overwrite each other, and (b) the lack of paged memory
  417. will mean that the system will write all over the existing
  418. screen in simulation mode, very sloppy.
  419. .BZ
  420. .TA
  421. .sp 2
  422. .ne 5
  423. .ce
  424. 1.4 \fBUnpacking SFS\fR
  425. .P
  426. Before using the Space Flight Simulator it is necessary to copy
  427. all the binary and data files to a single directory, preferably
  428. on a hard disk drive.  SFS is distributed in two different
  429. forms: (a) executable binaries (with supporting data files) for
  430. the IBM PC and compatible computers, and (b) C source code (also
  431. with supporting data files) to be compiled on Unix computer
  432. systems, at this point supporting the X windows system and the
  433. AT&T Unix PC "tam" interface library. 
  434. .P
  435. The PC (binary) version may be archived utilizing one of a
  436. number of different archiving systems. Documentation for the
  437. archiving system should explain how to extract the files. Also,
  438. note that the PC binary version will not fit on a single 5.25"
  439. floppy diskette, so that binaries and data from 5.25" diskettes
  440. will have to be copied to a single directory on a hard disk
  441. drive (or possibly to a single 720k or larger diskette).
  442. .TZ
  443. .BA
  444. Does the Space Flight Simulator require a hard disk drive? SFS
  445. will run, in fact, on a single 720k diskette (thus, on a 720k
  446. 3.5" drive, or possible a 1.2 megabyte 5.25" diskette), but the
  447. PC versions require the reading of the disk drive every time a
  448. font must be changed. This can be extremely time consuming, and
  449. is why the use of a hard disk drive is recommended.
  450. .BZ
  451. .TA
  452. .P
  453. The source code for SFS will be supplied in the form of Unix
  454. "sh" archives. File headers and tails should be removed, then
  455. the files should be executed with "sh" to extract the individual
  456. source code files and data files. See chapter 4 below on
  457. compiling SFS.
  458. .sp 2
  459. .ne 5
  460. .ce
  461. 1.5 \fBStarting SFS\fR
  462. .P
  463. To run SFS version \*V on most computers (including
  464. PC-compatible computers with EGA and VGA graphics), simply type
  465. .nf
  466. X    sfs<RET>
  467. .fi
  468. (<RET> denotes a carriage return).  To run the program on a
  469. PC-compatible computer with Hercules graphics, first run the
  470. program "msherc." The following commands will run the program
  471. with Hercules graphics:
  472. .ls 1
  473. .nf
  474. X
  475. X    msherc<RET>
  476. X    sfs<RET>
  477. X
  478. .ls 2
  479. .fi
  480. The sfs program will load the menu and modeling module
  481. (sfsm.app). It will then display the SFS logo (which will remain
  482. on the screen for a few seconds), after which it will show the
  483. main sfs menu.
  484. .TZ
  485. .BA
  486. \fINote for Advanced Users\fR:  The name of an SFS program file
  487. (see below) can be specified on the SFS command line.  For
  488. instance,
  489. .nf
  490. X    sfs moon.sfs
  491. .fi
  492. will start the program using "moon.sfs" for its initial program
  493. data.
  494. .BZ
  495. .TA
  496. .sp 2
  497. .ne 5
  498. .ce
  499. 1.6 \fBExiting SFS\fR
  500. .P
  501. XFrom the main SFS menu a number of different options may be
  502. selected. The SFS main menu is one of a number of menus that
  503. work similarly (they all employ the Bywater Grpahical User
  504. Interface). The up and down arrow keys can be used to select
  505. items, then <ENTER> or <RETURN> will execute a selected item.
  506. With a mouse, click once on an item to select it, then click a
  507. second time to execute it. There may be unseen menu items above
  508. or below the current position; to expose these use the window
  509. sliders or arrows with the mouse. (See 2.1.1 below for more
  510. information on Bywater UI menus.)
  511. .P
  512. The last item on the SFS main menu is an the exit from the
  513. program. Select and execute this item to return to the operating
  514. system. 
  515. .sp 2
  516. .ne 5
  517. .ce
  518. 1.7 \fBRunning the Default SFS Program\fR
  519. .P
  520. To run the default SFS program (a view of the earth from an
  521. orbiting spacecraft), enter the SFS program described above
  522. (with no command line argument; just "sfs"). From the main SFS
  523. menu, select and execute the "Visual Simulation" item. This will
  524. begin running the default program. 
  525. .P
  526. The screen will go entirely blank for a while. Don't panic: SFS
  527. is a fairly large program, and had to be divided into a few
  528. smaller pieces. The sfs (under MSDOS, "sfs.exe") program itself
  529. is very small and only loads the two main programs: 
  530. .ls 1
  531. .nf
  532. X
  533. X      sfsm.app (which contains the main menu 
  534. X               and the modeling module), and
  535. X
  536. X      sfsx.app (which contains the simulation module).
  537. X
  538. .fi
  539. .ls 2
  540. When the screen goes blank, sfsm.app has relinquished control to
  541. sfs (sfs.exe), which is loading sfsx.app. In a moment or two the
  542. simulation module will appear on screen. 
  543. .P
  544. After the simulation module shows the program logo, it reads in
  545. maps and data about the object(s) to be orbited. Then it has to
  546. make some initial calculations. After a while (depending greatly
  547. on the speed of a computer, and whether it has a math
  548. coprocessor), two windows will open on the screen. A simulation
  549. of the orbital focus (probably the earth) as seen from the
  550. spacecraft will appear in the top window, and a ground track map
  551. will appear in the bottom window. After a while (again,
  552. depending on the speed of the computer at performing
  553. trigonometric calculations), the visual simulation will appear
  554. in the upper window and will change as the spacecraft continues
  555. on its path (as indicated in the lower window).
  556. .P
  557. To exit from the simulation module, either press <ESCAPE> or
  558. click the mouse once on the top bar of the screen. This will
  559. bring up the simulation module escape menu in the middle of the
  560. screen, and it is used just like the main SFS menu described
  561. above (and in 2.1.1 below). The last item on the main simulation
  562. menu will allow a return to the main SFS menu. If this option is
  563. chosen, the screen will again go blank (while sfs loads
  564. sfsm.app). The program can then be exited altogether by choosing
  565. the last (exit) item from the main SFS menu. Alternatively, the
  566. next to last item on the main simulation menu is a short cut to
  567. exit from SFS altogether (i.e., without reloading the main menu
  568. and modeling module, sfsm.app).
  569. .TZ
  570. .PH "''''"
  571. .SK
  572. .sp 4
  573. .ce
  574. Chapter 2
  575. .sp
  576. .ls 1
  577. .ce
  578. DEVELOPING ORBITAL SIMULATIONS:
  579. .ce
  580. THE MAIN MENU AND MODELING MODULE (sfsm.app)
  581. .ls 2
  582. .PH "'SFS \*V'Chapter 2'Page #'"
  583. .PF "''Page  #''"
  584. .sp 2
  585. .TA
  586. .na
  587. .ne 5
  588. .P
  589. The main menu and modeling module are contained within the
  590. executable file "sfsm.app" which is first loaded by "sfs"
  591. ("sfs.exe" in the PC version). The main menu allows users to set
  592. an appropriate SFS program file, to go to the modeling menu, to
  593. run the simulation, or to exit from the program. The modeling
  594. module allows users to develop and customize their own SFS
  595. programs. We begin with a discussion of the menu items available
  596. from the main menu. 
  597. .sp 2
  598. .ne 5
  599. .ce
  600. 2.1 \fBSelecting a SFS Program File\fR
  601. .P
  602. The first item on the main menu allows users to select a SFS
  603. program file. These files have the extension "*.sfs". A number
  604. are supplied with the program, and users can develop their own
  605. simulations using the modeling menu (see below). When a user
  606. selects this option from the main menu, she is provided with a
  607. menu listing all SFS program files found in the current
  608. directory. The user selects (see below) the file wanted, and
  609. will then return to the main menu.
  610. .sp 2
  611. .ne 5
  612. 2.1.1 Utilizing Bywater User Interface Menus
  613. .P
  614. Since both the main menu and the program selection menu utilize
  615. the Bywater User Interface menu system, a word is needed at this
  616. point on the use of this menuing system. The Bywater User
  617. Interface menu presents the user with a list of menu items to be
  618. selected. The menu can be controlled either by a pointer device
  619. (such as a mouse or track ball) or by the computer's arrow keys.
  620. Using the \fIarrow keys\fR, the UP and DOWN keys will move
  621. through the various menu items, highlighting the current item.
  622. Use the RETURN or ENTER key to select a particular item. If
  623. there are items below the bottom item (moving down) or above the
  624. top item (moving up), the menu items will be scrolled as the
  625. keys move above or below the currenly shown items. Using a
  626. \fIpointer device\fR (mouse or track ball), place the cursor on
  627. the item to be selected and click once (down and up on the
  628. pointer device button). Once an item has selected, the user can
  629. either select a different item by pointing and clicking, or
  630. choose the selected item by clicking on it a second time. 
  631. .PF "''''"
  632. .P
  633. The pointer device is not capable of scrolling up and down
  634. simply by pointing at menu items. For this reason, some of the
  635. menus will have scroll bars and arrows that the pointer device
  636. can use. Pressing an arrow area (up, down, left, or right,
  637. although left and right are irrelevant to the Spavce Flight
  638. Simulator, since it only uses vertical menus) will cause the
  639. menu items to be scrolled in that direction. Alternatively, one
  640. can press the pointer button on the "elevator" in the scroll
  641. bar, then release the button at a higher or lower position in
  642. the scroll bar. This will cause the screen to scroll in the
  643. appropriate direction. Using the scroll bars, a user can scroll
  644. instantly from the top to the bottom (and vice versa) of a menu
  645. list very quickly.
  646. .sp 2
  647. .ne 5
  648. .ce
  649. 2.2 \fBThe Orbital Modeling Menu\fR
  650. .P
  651. The orbital modeling menu allows users to develop and customize
  652. their own SFS programs. A number of orbital parameters can be
  653. set, and certain aesthetic features can be controlled. 
  654. .sp 2
  655. .ne 5
  656. 2.2.1 Set Program Title
  657. .P
  658. The first option from the modeling menu allows the user to set a
  659. title for the program one is developing. After selecting this
  660. item, the user is presented with a dialogue box (see 2.2.1.1
  661. below) for entering the title. Although there is theoretically
  662. no limit to the length of the title, none of the SFS programs
  663. can display more than a few words of titles, so users are
  664. advised to make their titles rather short. 
  665. .P
  666. To begin a new SFS program, a user simply starts with an old
  667. one, and then alters the parameters for the new program. When a
  668. user exits from the orbital modeling menu, she can specify a new
  669. filename under which the program can be stored.
  670. .sp 2
  671. .ne 5
  672. 2.2.1.1 Using Bywater User Interface Dialogue Boxes
  673. .P
  674. Dialogue Boxes will be encountered at several points in the
  675. Space Flight Simulator. A dialogue box will prompt the user for
  676. a text string. Enter the string from the keyboard, concluding it
  677. with a RETURN or ENTER. Although it is possible to write beyond
  678. the bounds of the dialogue box, the area written over beyond the
  679. bounds of the box will not be restored when the dialogue box is
  680. completed. The user can use the BACKSPACE key to correct errors
  681. if they are made in a dialogue box session.
  682. .sp 2
  683. .ne 5
  684. 2.2.2 Set Current Orbit
  685. .P
  686. The Space Flight Simulator can simulate a number of orbits
  687. (around multiple orbital foci) concurrently. Orbital parameters
  688. have to be set for one orbit at a time; consequently the user
  689. must select which orbit she wishes to work on, and the "set
  690. current orbit" item (the second item in the orbital modeling
  691. menu) allows this. After selecting this menu item, the user is
  692. presented with a dialogue box and is prompted for an orbit
  693. number. Enter the number, then the program will return to the
  694. orbital modeling menu. 
  695. .P
  696. When a new program is initialized, only one orbit (number 1) is
  697. available. If a user selects a different orbit than those
  698. available, the new orbit is initialized with a set of default
  699. orbital parameters before returning to the orbital modeling
  700. menu. The user is not required to enter new orbits in sequence,
  701. so that one could conceivably have a simulation with three
  702. orbits with numbers 1, 5, and 9, but it makes conceptual sense
  703. to proceed in sequence. 
  704. .TZ
  705. .BA
  706. \fIRoom for Improvement\fR. At this point, there is no display
  707. showing how many orbits have already been initialized in a given
  708. program, and there is no provision from deleting an orbit from a
  709. program. Both of these matters may be addressed by looking
  710. directly at the program file (*.sfs) with an ASCII text editor
  711. (see the file format information in 5.1 below).
  712. .BZ
  713. .TA
  714. The Space Flight Simulator displays (in the lower right-hand
  715. corner of the orbital modeling screen a list of information
  716. concerning the selected orbit. Although it appears in the form
  717. of a Bywater UI menu, it is read-only information, and is
  718. updated whenever new orbital data is entered. The information in
  719. this display is as follows.
  720. .sp 2
  721. .ne 5
  722. 2.2.2.1 Mass of the Orbital Focus
  723. .P
  724. The mass of the orbital focus (the object around which this
  725. orbit is focused) is given in grams, as read from the focal data
  726. file (see 5.2 below).
  727. .sp 2
  728. .ne 5
  729. 2.2.2.2 Radius of the Orbital Focus
  730. .P
  731. The (average) radius of the orbital focus is given in
  732. kilometers, as read from the focal data file (see 5.2 below).
  733. .sp 2
  734. .ne 5
  735. 2.2.2.3 Sidereal Period of the Orbital Focus
  736. .P
  737. The sidereal period of the orbital focus (the period in which it
  738. completes one revolution in relation to the stellar background)
  739. is given in seconds, as read from the focal data file (see 5.2
  740. below).
  741. .sp 2
  742. .ne 5
  743. 2.2.2.4 Semiminor Axis of the Orbit
  744. .P
  745. The "semiminor axis" of an orbit is one of the six classical
  746. orbital elements and represents a distance (in kilometers) of
  747. one half of the smallest diameter of the orbit. It is calculated
  748. on the basis of orbital parameters entered in the orbital
  749. parameters menu.
  750. .sp 2
  751. .ne 5
  752. 2.2.2.5 Eccentricity of the Orbit
  753. .P
  754. The "eccentricity" of an orbit is one of the six classical
  755. orbital elements and represents the ratio between the semiminor
  756. and semimajor axes of the orbit. An eccentricity of "0" denotes
  757. a perfectly circular orbit, whereas a higher eccentricity (1.0
  758. is the maximum) denotes a greater difference between semiminor
  759. and semimajor axes. The eccentricity is calculated on the basis
  760. of orbital parameters entered in the orbital parameters menu.
  761. .sp 2
  762. .ne 5
  763. 2.2.2.6 Orbital Period
  764. .P
  765. The period of an orbit is one of the six classical orbital
  766. elements and represents the time (in seconds) to complete one
  767. revolution around the orbital focus. The orbital period is
  768. calculated on the basis of orbital parameters entered in the
  769. orbital parameters menu.
  770. .sp 2
  771. .ne 5
  772. 2.2.3 Set Orbital Parameters
  773. .P
  774. [Discussion now returns to the orbital modeling menu.] The third
  775. option in the orbital modeling menu is the "set orbital
  776. parameters" item. After selecting this item, the orbital
  777. modeling menu itself will be deactivated, and an orbital
  778. parameters menu will be activated in the top right-hand corner
  779. of the screen. This menu allows the user to set specific
  780. parameters for the currently selected orbit.
  781. .sp 2
  782. .ne 5
  783. 2.2.3.1 Set Orbital Focus
  784. .P
  785. The orbital focus is the object around which a satellite orbits.
  786. The Space Flight Simulator is supplied with a number of files
  787. (with extention "*.fd") that give focal data for astronomical
  788. objects (see section 5.2 below for a description of focal data
  789. files). After selecting this item from the orbital parameters
  790. menu, the user is presented with a Bywater UI menu showing all
  791. the focal data files in the current directory. One of these must
  792. be selected.
  793. .TZ
  794. .BA
  795. \fIRoom for Improvement\fR. The Space Flight Simulator does not
  796. offer in this revision a facility for creating new focal data
  797. files. The user can create these directly by using an ASCII text
  798. editor (see 5.2 below for information on the file format).
  799. .BZ
  800. .TA
  801. .sp 2
  802. .ne 5
  803. 2.2.3.2 Set Name of Orbit/Spacecraft
  804. .P
  805. The user can enter a name for the spacecraft (or a particular
  806. orbit) which will appear on some of the simulation screens.
  807. After selecting this item, the user is presented with a Bywater
  808. UI dialogue box (see above), in which the name should be
  809. entered. Again, there is a limit to the number of words that the
  810. programs can be displayed, so a short title is to be preferred.
  811. .sp 2
  812. .ne 5
  813. 2.2.3.3 Set Surface Datafile
  814. .P
  815. It is possible to utilize different surface datafiles (extension
  816. "*.spd", for "spherical projection data"), even for the same
  817. orbital focus. The earth ("earth.spd") is the only object for
  818. which significant surface data is available at this time. The
  819. file "null.spd" is a null which can be used in other cases. In
  820. these cases, only the latitude-longitude grid will be shown.
  821. After selecting this item, the user will be presented with a
  822. Bywater UI menu, from which a surface data file can be selected.
  823. .TZ
  824. .BA
  825. \fIAdvanced Use\fR. The Space Flight Simulator has a special
  826. program (the map utility) which allows users to enter their own
  827. spherical projection data and thus create spherical projection
  828. data files (e.g., to show maps of planets, etc.). The map
  829. utility is not supplied with the executable versions of SFS, and
  830. will be released separately. See Chapter 5.3 below for further
  831. information on the SPD file format, and Chapter 6 below for further
  832. information on the MAP utility.
  833. .BZ
  834. .TA
  835. .sp 2
  836. .ne 5
  837. 2.2.3.4 Set Orbital Periapsis
  838. .nf
  839. X    Default:  0.1 x the radius of the focus
  840. .fi
  841. The "periapsis" (also referred to by the specific term "perigee"
  842. for terrestrial orbits) is the lowest point in an orbit. Any
  843. positive number of kilometers lower than or equal to the
  844. apoapsis can be specified for the periapsis, although
  845. terrestrial orbits below about 250 kilometers begin to run into
  846. serious problems with atmospheric drag. (SFS does not account
  847. for atmospheric drag.)
  848. .sp 2
  849. .nf
  850. 2.2.3.5 Set Orbital Apoapsis
  851. .nf
  852. X    Default:  4 x the radius of the focus
  853. .fi
  854. The "apoapsis" (also referred to by the specific term "apogee"
  855. for terrestrial orbits) is the highest point in an orbit. Any
  856. positive number of kilometers greater than or equal to the
  857. periapsis can be specified.  An orbit having an equal apoapsis
  858. and periapsis will be perfectly circular; all other orbits will
  859. be elliptical.  The greater the difference between the two, the
  860. greater will be the "eccentricity" of the orbital ellipse.
  861. .P
  862. It may be helpful to remember, as a rule of thumb in setting
  863. terrestrial orbital altitudes, that the altitude of the moon is
  864. 378,014 kilometers, and this can serve as a practical limit for
  865. terrestrial orbits, since relatively small spacecraft or
  866. satellites beyond this range would be controlled more by the
  867. gravitational effect of the sun than by the earth.
  868. .sp 2
  869. .ne 5
  870. 2.2.3.6 Set Orbital Inclination
  871. .nf
  872. X    Default:  25 degrees
  873. .fi
  874. The "inclination" of an orbit is the amount that the orbit is
  875. inclined or "tilted" away from the equator of the orbital focus.
  876. The inclination must be specified in degrees between 0 and 180.
  877. An orbit having an inclination of 0 is "equatorial," that is,
  878. it follows the equator of the orbital focus.  An orbit with an
  879. inclination of 90 degrees is "polar," that is, it will go over
  880. the north and south poles of the orbital focus every orbit.
  881. .sp 2
  882. .ne 5
  883. 2.2.3.7 Set Argument of the Periapsis
  884. .nf
  885. X    Default:  0 degrees
  886. .fi
  887. The next two orbital parameters are somewhat more difficult to
  888. understand, but can be mastered by experimenting with different
  889. settings.
  890. .P
  891. The "argument of the periapsis" is the point in the orbit where
  892. periapsis occurs, measured in degrees (0-360) from the point of
  893. the "ascending node," which is the point in the orbit where the
  894. ground track crosses the equator, moving in a northward
  895. direction.
  896. .P
  897. For a non-equatorial orbit, the argument of the periapsis will
  898. have the following general effects:
  899. .TZ
  900. .BA
  901. \fI0\fR Periapsis will occur at the point over the equator where
  902. the spacecraft crosses it heading northward, and apoapsis will
  903. occur at the point over the equator where the spacecraft crosses
  904. it heading southward (0 is the default setting).
  905. .P
  906. \fI90\fR Periapsis will occur at the northernmost point in the
  907. orbit, and apoapsis will occur at the southernmost point.
  908. .P
  909. \fI180\fR Periapsis will occur at the point over the equator
  910. where the spacecraft crosses it heading southward, and apoapsis
  911. will occur at the point over the equator where the spacecraft
  912. crosses it heading northward.
  913. .P
  914. \fI270\fR Periapsis will occur at the southernmost point in the
  915. orbit, and apoapsis will occur at the northernmost point.
  916. .BZ
  917. .TA
  918. .sp 2
  919. .ne 5
  920. 2.2.3.8 Set Longitude of the Ascending Node
  921. .nf
  922. X    Default:  0 degrees longitude
  923. .fi
  924. .P
  925. The "longtude of the ascending node" is the point on the focal
  926. equator at which ascending node occurs.  For SFS, the longitude
  927. of the ascending node is specified in degrees (-180 to 180),
  928. with west negative and east positive.
  929. .P
  930. The longitude of the ascending node changes each orbit, so what
  931. is set here is the longitude for the first orbit.
  932. .P
  933. SFS calculates orbits beginning at periapsis; consequently,
  934. either the argument of the periapsis or the longitude of the
  935. ascending node (or the insertion parameter -- see below) can be
  936. altered to change what portion of the focus will be displayed
  937. when the program begins.
  938. .TZ
  939. .BA
  940. \fIExamples\fR:  (a)  The default settings have the argument of
  941. the periapsis at 0 degrees (periapsis over the equator), and the
  942. longitude of the ascending node at 0 degrees. For a terrestrial
  943. orbit (the default), this means that the orbit will begin at
  944. latitude 0, longitude 0, which is just off the coast of West
  945. Africa.  The orbital direction will be northeastward, so one
  946. will first see the African continent, the Mediterranean Sea, and
  947. Europe beyond them. 
  948. .P
  949. (b) By retaining all the default settings except the longitude
  950. of the ascending node, and by setting it to -120 degrees, the
  951. orbit will begin at periapsis over the equator, latitude 0 and
  952. longitude -120, which is just off of the western coast of
  953. Central American.  Since, again, the orbital direction is
  954. northeastward, one will first see Mexico and North America in
  955. the visual display.
  956. .BZ
  957. .TA
  958. .sp 2
  959. .ne 5
  960. 2.2.3.9 Exit from Orbital Parameters Menu
  961. .P
  962. The last item in the orbital parameters menu allows the user to
  963. return to the orbital modeling menu. The orbital parameters menu
  964. will be deactivated, and the orbital modeling menu reactivated.
  965. .sp 2
  966. .ne 5
  967. 2.2.4 Set Insertion Parameter
  968. .P
  969. .nf
  970. X    Default:  0 seconds
  971. .fi
  972. .P
  973. The "point of insertion" is the moment in the first orbit when
  974. the orbit begins. Imagine a rocket or spaceplane delivering a
  975. spacecraft to a certain altitude where the spacecraft would take
  976. up the orbital track -- this would be the point of insertion. 
  977. The moment of insertion is specified in seconds from periapsis,
  978. and is limited by the orbital period (which is given on this
  979. screen).
  980. .TZ
  981. .BA
  982. \fIExample\fR:  If one wants to begin by seeing the orbital
  983. focus from apoapsis, one should specify the insertion moment as
  984. one half of the orbital period.  If the period is 60000 seconds,
  985. one should set the moment of insertion to 30000 seconds and the
  986. program will effect insertion at apoapsis.
  987. .BZ
  988. .TA
  989. .sp 2
  990. .ne 5
  991. 2.2.5 Set System Parameters
  992. .P
  993. .P
  994. The system parameters menu allows a user to set three parameters
  995. controlling the manner in which calculations are made and the
  996. screen is updated.  Note that one can also change the system
  997. parameters later, while the program is running, but it is best
  998. to specify system parameters from the beginning.
  999. .sp 2
  1000. .ne 5
  1001. 2.2.5.1 Set Time Factor
  1002. .P
  1003. .nf
  1004. X    Default:  1 x real time
  1005. .fi
  1006. .P
  1007. The "time factor" is the ratio of flight time to real time. If
  1008. the time factor is set to one (the default), the program will
  1009. try to run in real time).  If the time factor is set to two, the
  1010. program will calculate two flight seconds for every real second,
  1011. and so forth.  Increasing the time factor allows users to speed
  1012. up the orbital progress.
  1013. .sp 2
  1014. .ne 5
  1015. 2.2.5.2 Set Screen Update Interval
  1016. .P
  1017. .nf
  1018. X    Default:  15 seconds
  1019. .fi
  1020. .P
  1021. The "screen update interval" denotes the number of real-time
  1022. seconds between each update of the screen.  Users need to find
  1023. out, by experimentation, what the best update interval is for
  1024. their computer systems.  The default 15 second rate works
  1025. nominally on a computer with a 10 mhz 8088 CPU and no math
  1026. coprocessor.  An 80286 machine with a math coprocessor can
  1027. easily make a 5 second update interval.  A Unix workstation such
  1028. as the DecStation 2100 (tm) can make a 2 second rate, thus allowing
  1029. an extremely smooth animated effect. Slower computers may not be
  1030. able to keep up with the 15 second update interval rate.
  1031. .sp 2
  1032. .ne 5
  1033. 2.2.5.3 Set Trig Precision Level
  1034. .P
  1035. .nf
  1036. X    Default:  1 (fast)
  1037. .fi
  1038. .P
  1039. The "trig precision level" specifies the level of accuracy at
  1040. which trigonometric functions are calculated by the program. 
  1041. Trig functions take up most of the processing time for the
  1042. program, so by default SFS utilizes a look-up table for
  1043. calculating trig functions.  By specifying "2 (precise),"
  1044. however, one can force the program to perform much more accurate
  1045. (and much slower) trig calculations.  The look-up tables work
  1046. acceptably well, so we would recommend setting the trig
  1047. precision level to 2 only if a math coprocessor is present.
  1048. .sp 2
  1049. .ne 5
  1050. 2.2.5.4 Exit from System Parameters Menu
  1051. .P
  1052. The last item in the system parameters menu returns the user to
  1053. the orbital modeling menu.
  1054. .sp 2
  1055. .ne 5
  1056. 2.2.6 View Current Orbit
  1057. .P
  1058. [Discussion now returns to items in the orbital modeling menu.]
  1059. The "View Current Orbit" item, next to last in the orbital
  1060. modeling menu, allows the user to see a simulation of the
  1061. orbital focus with orbits around it. This display is equivalent
  1062. to the "distant perspective" display in the simulation module
  1063. (see 3.2.3 below). When this item is selected, SFS has first to
  1064. calculate the parameters for the display, then the display is
  1065. drawn in the background memory, and finally it is blitted to the
  1066. screen. NOTE that the display window for the "View Current
  1067. Orbit" display (the window at the bottom left) is normally
  1068. blanked, and will be blanked again after any parameters are
  1069. changed (because the display would no longer be appropriate).
  1070. .sp 2
  1071. .ne 5
  1072. 2.2.7 Exit from Orbital Modeling Menu
  1073. .P
  1074. The last item in the orbital modeling menu returns the user to
  1075. the main SFS menu. When exiting, the user is asked whether she
  1076. wishes to save the parameters entered (or altered). The user
  1077. must answer "Yes" to the prompt to save the work done, and then
  1078. she is prompted for a filename. By simply pressing RETURN, the
  1079. current filename will be used. However, if a user has begun with
  1080. a previously existing SFS program and altered it, the user may
  1081. wish to enter a new filename at this point. Remember to end the
  1082. filename with ".sfs", or the item of the main menu which selects
  1083. SFS program files will not recognize the filename as a program
  1084. file.
  1085. .TZ
  1086. .PH "''''"
  1087. .SK
  1088. .sp 4
  1089. .ce
  1090. Chapter 3
  1091. .sp
  1092. .ce
  1093. ADVANCED CONTROL OF THE SIMULATION MODULE
  1094. .PH "'SFS \*V'Chapter 3'Page #'"
  1095. .PF "''Page  #''"
  1096. .sp 2
  1097. .TA
  1098. .na
  1099. .ne 5
  1100. .P
  1101. Although chapter one gave an indication of how a simple SFS
  1102. program could be viewed using the simulation module, there is a
  1103. range of controls available to the user of the simulation
  1104. module. This chapter explains the use of these controls. It is
  1105. important to remember, however, that once the simulation module
  1106. is entered the basic parameters for the orbit are set, and one
  1107. must exit to the modeling module to change basic parameters.
  1108. .sp 2
  1109. .ne 5
  1110. .ce
  1111. 3.1 \fBSimulation Module Information Panels\fR
  1112. .P
  1113. The simulation module constantly updates a number of information
  1114. panels in the display. At the very top of the display, on the
  1115. left-hand half of the top window bar, is the program name and
  1116. version. The right-hand half of the top bar is a message area
  1117. where the user may look for a clue as to available options. 
  1118. .P
  1119. On the left-hand side of the display are three information
  1120. panels, one on top of each other. The top panel gives the title
  1121. and description of the SFS that is currently being executed. The
  1122. middle panel gives timing information as the simulation
  1123. progresses. The top item in the timing display panel is the
  1124. simulated time expressed as Coordinated Universal Time (UTC).
  1125. The second item is local time, but this will differ from UTC
  1126. only if one has set the "TZ" environment variable to indicate
  1127. your timezone's difference from Coordinated Universal Time. 
  1128. .TZ
  1129. .BA
  1130. \fISetting the "TZ" Environmental Variable\fR.  If you want the
  1131. system to set UTC correctly based on your internal clock, you
  1132. need to set the environmental variable TZ before running the
  1133. program.  A sample command, which might be included in your
  1134. ".profile", ".login", or "autoexec.bat" file would be:
  1135. .nf
  1136. X
  1137. X    set TZ=EST5EDT
  1138. X
  1139. .fi
  1140. which would set the system for the Eastern time zone of the U.S.
  1141. Other North American settings would be:
  1142. .nf
  1143. X
  1144. X    set TZ=CST6CDT
  1145. X    set TZ=MST7MDT
  1146. X    set TZ=PST8PDT
  1147. X
  1148. .fi
  1149. for Central, Mountain, and Pacific time zones, respectively.
  1150. (Note that for some Unix systems, the command "set" is
  1151. unnecessary. Unix users will have to learn how to set
  1152. environmental variables on their respective systems.)
  1153. .BZ
  1154. .TA
  1155. The next two lines after the simulated time lines give Mission
  1156. Elapsed Time (MET) expressed as hours, minutes, and seconds, and
  1157. as days. The lowest of the three information panels at the left
  1158. is a status panel that will be updated frequently, informing the
  1159. user what SFS is currently doing.
  1160. .sp 2
  1161. .ne 5
  1162. .PF "''''"
  1163. .ce
  1164. 3.2 \fBSimulation Module Displays\fR
  1165. .P
  1166. The simulation module offers three different types of displays
  1167. which can be selected by the user through the simulation module
  1168. escape menu (see 3.3 below). When tracking multiple orbits, the
  1169. user may even choose to view two displays of the same type, but
  1170. with different orbital foci or orbits. (For example, if tracking
  1171. two terrestrial satellites concurrently, visual simulation
  1172. displays for each satellite could be displayed in the upper and
  1173. lower display windows.) The three display types are described in
  1174. this section.
  1175. .sp 2
  1176. .ne 5
  1177. 3.2.1 The Visual Simulation
  1178. .P
  1179. The visual simulation offers the user a simulation of how the
  1180. orbital focus would appear from the spacecraft. For an orbital
  1181. focus for which there is relatively complete surface information
  1182. (such as the earth), the display will show a considerable amount
  1183. of detail. For other orbital foci for which there is not surface
  1184. data (such as Pluto) or for which surface data is irrelevant
  1185. (such as the Sun), a simple latitude-longitude grid for the
  1186. focus will be shown. The focus will be seen to grow larger in
  1187. the display as the spacecraft approaches periapsis, and will
  1188. seem to grow smaller as the spacecraft approaches apoapsis. The
  1189. visual simulation screen represents about thirty degrees of arc
  1190. in horizontal length. The simulation module constantly
  1191. calculates the forward track of the spacecraft, and on the basis
  1192. of these calculations it tries to keep the point on the horizon
  1193. in focus towards which the spacecraft is currently headed. For
  1194. this reason, the orbital focus will often appear to rotate while
  1195. a simulation is in progress. 
  1196. .P
  1197. At the bottom of each visual simulation display there is a
  1198. status line indicating the latitude and longitude of the current
  1199. "subsatellite point," that is, the point on the surface of the
  1200. orbital focus immediately below the spacecraft. The status line
  1201. also shows the current altitude of the spacecraft (in
  1202. kilometers) over the surface of the orbital focus. 
  1203. .sp 2
  1204. .ne 5
  1205. 3.2.2 The Ground Track Display
  1206. .P
  1207. The ground track display shows a flat surface map of the orbital
  1208. focus on which the orbital track is superimposed. If there are
  1209. multiple orbits and color is supported, the orbital tracks will
  1210. appear in (up to six) different colors. One portion of each
  1211. orbital track will appear solid -- this is the portion of the
  1212. track that the spacecraft has already traversed. Another portion
  1213. appears in a dotted line of the same color, and represents the
  1214. forward track for one orbit, i.e., the path over the surface of
  1215. the orbital focus that the spacecraft will follow on its next
  1216. orbit. 
  1217. .TZ
  1218. .BA
  1219. \fINote\fR. The track of an orbit will not always stretch around
  1220. the orbital focus. At higher earth orbits, for instance, the
  1221. track will almost appear to stand still, due to the rotation of
  1222. the earth under the spacecraft. Similar effects should be
  1223. expected for other orbital foci.
  1224. .BZ
  1225. .TA
  1226. It is important to note that whereas the visual simulation
  1227. applies to a specific orbit, the grund track (and distant
  1228. perspective) display applies to all orbits around a specific
  1229. orbital focus. (For example, a SFS program showing three earth
  1230. orbits would display all three orbits on the one earth ground
  1231. track map.)
  1232. .sp 2
  1233. .ne 5
  1234. 3.2.1 The Distant Perspective Display
  1235. .P
  1236. The distant perspective display offers a perspective on an
  1237. orbital focus and all orbits associated with it from a
  1238. hypothetical position approximately ten times the apoapsis of
  1239. the highest orbit. Like the ground track display, the simulation
  1240. module will try to show multiple orbits in different colors, and
  1241. will display both the portion of the track that has been
  1242. traversed in solid color, and the untraversed (forward) track in
  1243. dotted color. Like the ground track display, the distant
  1244. perspective display shows all orbits around a specific orbital
  1245. focus.
  1246. .sp 2
  1247. .ne 5
  1248. .ce
  1249. 3.3 \fBThe Escape Menu\fR
  1250. .P
  1251. A number of options in the simulation module are made available
  1252. through the escape menu. The escape menu can be accessed in two
  1253. ways. Using the keyboard, pressing the ESCAPE key will bring up
  1254. the escape menu. Using the pointer device (mouse), pointing the
  1255. cursor to the top window bar and clicking (down and up) will
  1256. bring up the escape menu. The user will recognize the simulation
  1257. module escape menu as a standard Bywater UI menu (see 2.1.1
  1258. above). 
  1259. .sp 2
  1260. .ne 5
  1261. 3.3.1 Changing the Display
  1262. .P
  1263. The first three items in the escape menu allow the user to
  1264. change the available displays. Although each of these items
  1265. specifies a different display window, they each work the same.
  1266. The three display windows are areas on the screen where displays
  1267. can be shown, and they are not to be confused with the three
  1268. display types. (That is, any of the three display windows can
  1269. hold any of the three display types.) The three display windows
  1270. are: (a) the top window, (b) the bottom window, and (c) the
  1271. "zoom" window. Whenever the zoom window is specified, it takes
  1272. the place of the top and bottom windows and is activated.
  1273. Conversely, whenever a user selects either the top or bottom
  1274. window, both bottom and top windows are activated and the zoom
  1275. window is deactivated. The advantage of using the bottom and top
  1276. windows is that two displays can be viewed concurrently (by
  1277. default, the visual simulation for orbit 1 in the top window,
  1278. and the ground track for the focus of orbit 1 in the lower
  1279. window). The advantage of the zoom window is that a larger
  1280. screen area can be devoted to a single display. 
  1281. .P
  1282. When any of the first three escape menu items is selected, the
  1283. user is offered a number of options. There will be at least
  1284. three: the visual simulation for orbit 1, the ground track for
  1285. the focus of orbit 1, and the distant perspective for the focus
  1286. of orbit 1. But the visual simulation for each active orbit will
  1287. also be offered, as well as ground track displays and distant
  1288. perspective displays for all orbital foci. The user selects one
  1289. of these items to fill the window she chose from the escape
  1290. menu. The display will return immediately to its previous
  1291. contents, but the next time the display is updated the newly
  1292. selected display window and type will be activated. 
  1293. .sp 2
  1294. .ne 5
  1295. 3.3.2 Changing System Parameters
  1296. .P
  1297. The fourth item in the escape menu allows the user to change
  1298. certain system parameters while the simulation module is active.
  1299. The system parameters are the same as those described in section
  1300. 2.2.5 above, but they are entered here temporarily and will not
  1301. become part of the program under execution. This is useful when,
  1302. for example, a user executes a SFS program on a machine which is
  1303. considerably slower or faster than the producer of the SFS
  1304. program anticipated, in which case the user can more or less
  1305. immediately shift the speed of simulation or the speed at which
  1306. the simulation module tries to update the screen. Note that it
  1307. may take a few screen updates before the new parameters go into
  1308. effect. To change system parameters permanently for a SFS
  1309. program file, use the systems parameters option from the orbital
  1310. modeling module. 
  1311. .sp 2
  1312. .ne 5
  1313. 3.3.3 Exits from the Simulation Module
  1314. .P
  1315. Two exits are provided from the simulation module as the fifth
  1316. and sixth entries in the escape module. The fifth (next to last)
  1317. entry allows the user to escape completely from SFS. The sixth
  1318. and last escape menu option allows the user to return to the
  1319. main SFS menu. 
  1320. .sp 2
  1321. .ne 5
  1322. .ce
  1323. 3.4 \fBSimulation Module Toggles\fR
  1324. .P
  1325. In addition to pressing ESCAPE to get the escape menu, a user
  1326. may press four keys ("G", "S", "O", or "C") that serve as
  1327. toggles for the visual simulation displays. The status of each
  1328. of these keys is shown at the top right hand corner of the
  1329. visual simulation display: reverse video means that the item is
  1330. activated, and normal video for the letter indicates that the
  1331. item is currently inactive. The four letters stand for the
  1332. following:
  1333. .nf
  1334. .fl
  1335. .ne 8
  1336. .ls 1
  1337. X    G - Grid
  1338. X    S - Surface features
  1339. X    O - Orb
  1340. X    C - Crosshairs
  1341. X
  1342. .ls 2
  1343. .fi
  1344. The "grid" element refers to the latitude-longitude grid shown
  1345. in the visual display. The "Surface features" are such features
  1346. as landmass boundaries, craters, mountains, gas bands, and the
  1347. like. The "Orb" denotes the circle which represents the extent
  1348. of the orbital focus. "Crosshairs" denotes a crosshair display
  1349. which shows increments of ten degrees of arc in the display. By
  1350. default, all elements are activated except the crosshair
  1351. element. (The crosshair element can confuse users of monochrome
  1352. systems). By pressing one of these four letters while the
  1353. simulation module is running, the element will be switched on or
  1354. off. The display itself will be updated with (or without) the
  1355. newly toggled elements the next time the screen is updated. 
  1356. .TZ
  1357. .BA
  1358. \fIExample\fR. If the user wants to see a somewhat more realistic
  1359. representation of the earth from space, she might toggle off the
  1360. grid display element, leaving only the earth's orb filled in with
  1361. surface features. 
  1362. .P
  1363. \fIRoom for Improvement\fR. SFS currently supports element
  1364. toggles for the visual simulation alone. future versions may
  1365. implement this for the ground track or distant perspective
  1366. displays. 
  1367. .BZ
  1368. .TA
  1369. .PH "''''"
  1370. .SK
  1371. .sp 4
  1372. .ce
  1373. Chapter 4
  1374. .sp
  1375. .ce
  1376. COMPILING THE SPACE FLIGHT SIMULATOR
  1377. .PH "'SFS \*V'Chapter 4'Page #'"
  1378. .PF "''Page  #''"
  1379. .sp 3
  1380. .TA
  1381. .na
  1382. .ne 5
  1383. .P
  1384. The source code for the Space Flight Simulator, version \*V,
  1385. will be released at the same time as PC-compatible binaries.
  1386. Users of Unix based systems will have to compile the entire set
  1387. of programs -- no small task. Implementations of the program
  1388. exist for the IBM PC and compatibles utilizing Microsoft QuickC
  1389. (tm) compiler, for the AT&T Unix PC (tm) utilizing the native
  1390. TAM graphics system, and for X Windows version 11. Users of
  1391. other systems than these will face the substantial task of
  1392. implementing the graphics, keyboard, and directory routines
  1393. necessary to build the Space Flight Simulator on their machines.
  1394. Also, there are some built-in facilities for converting the SFS
  1395. software to utilize other languages than English. In some cases,
  1396. users may want to implement the software utilizing different
  1397. languages.
  1398. .P
  1399. In general, the procedure for implementing the software will
  1400. fall into two general stages. (a) In the first place, the user
  1401. must build the implementations of the Bywater specifications for
  1402. graphics output and mouse input (gr), keyboard input (kb), and
  1403. directory reading (dr), and then combine these to produce the
  1404. Bywater User Interface (ui). The object files produced in these
  1405. steps are then transferred (copied) to the Space Flight
  1406. Simulator file hierarchy. (b) The second stage is the building
  1407. of the SFS programs themselves. This may involve editing some of
  1408. the makefiles for particular implementations, and then copying
  1409. produced binary files to the SFS "bin" subdirectory where they
  1410. can be executed. In what follows, some more detailed
  1411. explanations of these processes are given.
  1412. .sp 2
  1413. .ne 5
  1414. .ce
  1415. 4.1 \fBFile and Directory Hierarchies\fR
  1416. .P
  1417. The development of the SFS software presupposes the existence of
  1418. a specific file hierarchy, which must be related
  1419. as described. In the
  1420. tables that follow, the slash ("/") is used as the directory
  1421. delimiter, but on MSDOS systems the delimiter will be the
  1422. backslash ("\\"). Although the name of the directory from 
  1423. which all the following subdirectories will grow can be
  1424. whatever one wishes, the hierarchy should contain the
  1425. following subdirectories: 
  1426. .TZ
  1427. .BA
  1428. .nf
  1429. .ne 9
  1430. \fIGeneral\fR:
  1431. X
  1432. X    ./include    directory for include files
  1433. X    ./lib        directory for completed object files
  1434. X
  1435. .ne 9
  1436. \fIThe Input/Output and UI Hierarchy\fR:
  1437. X
  1438. X    ./io
  1439. X    ./io/bw    Bywater error-handling subsystem
  1440. X    ./io/gr    Graphics subsystem
  1441. X    ./io/kb    Keyboard subsystem
  1442. X    ./io/dr    Directory subsystem
  1443. X    ./io/ui    User interface system
  1444. X    ./io/tw Text Window subsystem (not used by SFS)
  1445. X
  1446. .ne 9
  1447. \fIThe SFS Hierarchy\fR:
  1448. X
  1449. X    ./sfs
  1450. X    ./sfs/sfs    SFS program code
  1451. X    ./sfs/as    Astronomical subsystem
  1452. X    ./sfs/map    Map utility
  1453. X    ./sfs/bin    Datafiles and binary (executable) files
  1454. .fi
  1455. .BZ
  1456. .TA
  1457. Depending upon how a user receives the source code, she may have
  1458. to create these file hierarchies before moving the source code
  1459. into them.
  1460. .PF "''''"
  1461. .sp 2
  1462. .ne 5
  1463. .ce
  1464. 4.2 \fBUsing Script Files to Build SFS\fR
  1465. .P
  1466. There are a few script files designed to make compilation of
  1467. SFS easier on some systems; all are included in the "./io/ui"
  1468. and "./sfs/sfs"
  1469. subdirectories. The "./io/ui" subdirectory has two scripts
  1470. that will allow the user to build the input/output and user
  1471. interface systems. The file "buildlib.bat" will build the
  1472. input/output system and user interface on a PC-compatible
  1473. microcomputer, utilizing the Microsoft QuickC compiler. 
  1474. The file "buildlib.sh" will allow users to build the input/output
  1475. system and user interface on three Unix systems: the X windows
  1476. system, the AT&T Unix PC utilizing the TAM interface, and the
  1477. AT&T Unix PC utilizing the MGR interface.  The Unix script
  1478. ("buildlib.sh" should be run from the "./io/ui" sudbirectory
  1479. as "sh buildlib.sh".  The user will be prompted for a number
  1480. SHAR_EOF
  1481. true || echo 'restore of sfs/doc/sfs.ro failed'
  1482. fi
  1483. echo 'End of  part 15'
  1484. echo 'File sfs/doc/sfs.ro is continued in part 16'
  1485. echo 16 > _shar_seq_.tmp
  1486. exit 0
  1487. exit 0 # Just in case...
  1488. -- 
  1489. Kent Landfield                   INTERNET: kent@sparky.IMD.Sterling.COM
  1490. Sterling Software, IMD           UUCP:     uunet!sparky!kent
  1491. Phone:    (402) 291-8300         FAX:      (402) 291-4362
  1492. Please send comp.sources.misc-related mail to kent@uunet.uu.net.
  1493.