home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / private / oev9233a.zip / EARTH.DOC next >
Text File  |  1992-08-12  |  19KB  |  428 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.                                ORTHOGRAPHIC EARTH
  7.  
  8.                                   Version  9232
  9.                                  August 06, 1992
  10.  
  11.  
  12.  
  13.                     (C) Copyright David H. Ransom, Jr., 1992
  14.                               All rights reserved.
  15.  
  16.  
  17.  
  18.  
  19.                               David H. Ransom, Jr.
  20.                               7130 Avenida Altisima
  21.                        Rancho Palos Verdes, CA  90274  USA
  22.  
  23.  
  24.  
  25.    Computer Bulletin Boards
  26.    ------------------------
  27.  
  28.    RPV ASTRONOMY BBS    (14400/9600/2400):  (310) 541-7299
  29.  
  30.    RPV HOTLINE BBS      (2400/1200):        (310) 544-8977
  31.  
  32.    NASA SPACELINK BBS   (2400/1200):        (205) 895-0028
  33.  
  34.  
  35.    Program Description
  36.    -------------------
  37.  
  38.    ORTHOGRAPHIC EARTH is a demonstration of the orthographic projection method 
  39.    of displaying the Earth intended for use on EGA and VGA display monitors. 
  40.    The program is NOT compatible with other display types. The orthographic 
  41.    projection used here does not include perspective. It assumes you are at a 
  42.    great distance from the Earth and can therefore see a complete hemisphere. 
  43.    The zoom feature is roughly equivalent to what would be seen using a 
  44.    variable zoom lens on a camera.
  45.  
  46.    ORTHOGRAPHIC EARTH is copyrighted software; you are hereby granted a non-
  47.    exclusive license for non-commercial or educational use only. Agencies of 
  48.    the U.S. Government are also hereby granted a non-exclusive license for 
  49.    internal use. Use ORTHOGRAPHIC EARTH if you like it, discard it if you 
  50.    don't. There are no warranties of any kind. If you wish to use ORTHOGRAPHIC 
  51.    EARTH commercially, write for license information. The only request I make 
  52.    of users is that they take the time to complete and return the confidential 
  53.    questionnaire in file README. The questionnaire gives users a chance to 
  54.    offer comments and suggestions, and lets me know that people use and 
  55.    appreciate ORTHOGRAPHIC EARTH . Registration of ORTHOGRAPHIC EARTH is 
  56.    inexpensive and optional -- but will be appreciated and will encourage me 
  57.    to continue supporting and enhancing the program.
  58.  
  59.  
  60.  
  61.  
  62.    The initial orthographic rotation equations were implemented in Microsoft 
  63.    QuickBASIC by Matthew Merrill for possible inclusion in his fine Solar 
  64.    Eclipse program SOLAR, also available on my bulletin board systems, and he 
  65.    was kind enough to send his code to me for evaluation and for possible use 
  66.    in my own program STSORBIT PLUS. My thanks to Matthew for his assistance, 
  67.    and I have in turn supplied my rewritten code to him. Watch for a similar 
  68.    projection in SOLAR! Thanks also to Mike Gardner and Joel Runes for their 
  69.    testing efforts, comments, and suggestions.
  70.  
  71.    The purpose of writing ORTHOGRAPHIC EARTH is two-fold: first, to 
  72.    demonstrate and test the orthographic projection algorithms and performance 
  73.    for use in Matthew Merrill's program SOLAR and my own program STSORBIT 
  74.    PLUS; and second, to provide an interesting and entertaining view of the 
  75.    Earth on suitable personal computers. Subject the license information in 
  76.    the preceeding paragraph, the program may be freely used and distributed. 
  77.    The current version is always posted on my bulletin board systems (above) 
  78.    or may be obtained on disk for a donation of US$10.00 (please specify 5-
  79.    1/4" or 3-1/2" disks).
  80.  
  81.    The program is set up with default values set to display the Earth centered 
  82.    approximately on Rancho Palos Verdes, California, near Los Angeles. By 
  83.    responding "N" to the prompt asking if default values should be used, the 
  84.    user may enter any desired zoom factor from 10% to 2000%, set the map 
  85.    center coordinates (latitude and longitude), and select whether or not to 
  86.    display a map grid. The prompts are self-explanatory; values enclosed in 
  87.    square brackets [...] are the default values which will be used if ENTER is 
  88.    pressed.
  89.  
  90.  
  91.    Math Coprocessor Chip
  92.    ---------------------
  93.  
  94.    The drawing time for ORTHOGRAPHIC EARTH is a function of the part of the 
  95.    Earth being drawn, the selected Zoom Factor, the speed of the computer, and 
  96.    whether or not it has a math coprocessor chip. A math coprocessor is now 
  97.    relatively inexpensive and is STRONGLY RECOMMENDED! For example, the time 
  98.    using the default values is approximately 3.5 seconds on a 486DX and 
  99.    approximately 30 seconds on a 286/287. Times for computers without math 
  100.    coprocessor chips will be MUCH longer, on the order of several minutes even 
  101.    for 386 systems!
  102.  
  103.    Users are also cautioned to be certain that the math coprocessor chip which 
  104.    is selected will execute properly. One math coprocessor chip, not Intel, 
  105.    failed to execute ORTHOGRAPHIC EARTH without errors. I was unable to 
  106.    determine if the math coprocessor failure was a generic problem associated 
  107.    with that brand or speed, if the problem was the design of the laptop 
  108.    computer being evaluated, or only a problem associated with that particular 
  109.    chip. If errors are detected, error messages will appear on the right 
  110.    portion of the display. On the five computers I normally use for testing, 
  111.    NO ERRORS EVER APPEARED!
  112.  
  113.  
  114.    Command Line Options
  115.    --------------------
  116.    The program is started by switching to the directory which contains all of 
  117.  
  118.  
  119.  
  120.    the program files and entering a command at the DOS prompt:
  121.  
  122.         EARTH [options]
  123.  
  124.    No options are required. However, the following command line options may be 
  125.    included:
  126.  
  127.         /D   Force automatic demonstration mode. This option overrides all 
  128.              other options EXCEPT /M and bypasses operator prompts. 
  129.              Automatically enables the display of selected locations.
  130.  
  131.         /E   Force a VGA monitor to use the EGA mode.
  132.  
  133.         /L   Enables the display of selected location/city names when Zoom 
  134.              Factor is equal to or greater than 100%.
  135.  
  136.         /M   Force monochrome operation. Note that this command line option 
  137.              uses WHITE and LIGHT WHITE, usually available on monochrome 
  138.              monitors.
  139.  
  140.         /R   Display the Earth in motion, using five degrees (if the drawing 
  141.              time is 10 seconds or greater) or two and a half degrees 
  142.              (otherwise) rotation per display. This option is ONLY available 
  143.              in EGA resolution and forces EGA emulation on VGA monitors.
  144.  
  145.    During the demonstration mode or if automatic rotation is enabled with the 
  146.    "/R" command line option AND the zoom factor is less than 100%, the zoom 
  147.    factor will be increased by 5% for each drawing cycle until it reaches 
  148.    100%. For a demonstration of the rotation and zoom features, enter:
  149.  
  150.         EARTH /D
  151.  
  152.    at the DOS prompt. Press ESC to stop the automatic rotation and press ESC 
  153.    again to quit the program.
  154.  
  155.  
  156.    Initial Menu
  157.    ------------
  158.  
  159.    Except when the program is started with the "/D" command line option (in 
  160.    which case map drawing begins immediately), the initial menu is presented 
  161.    to the user:
  162.  
  163.                                ORTHOGRAPHIC EARTH VIEW
  164.  
  165.                                      Version 9233
  166.  
  167.                                           by
  168.                                  David H. Ransom, Jr.
  169.  
  170.    Accept default values? (Y/N) [Y]:
  171.  
  172.    Type in Zoom Factor (10-2000) [100]:
  173.    Origin Longitude (-180 to +180) [-118]:
  174.    Origin Latitude (+90 to -90) [34]:
  175.  
  176.  
  177.  
  178.    Display the grid? (Y/N) [Y]:
  179.    Display locations? (Y/N) [Y]:
  180.  
  181.    In each case, the available choices or the acceptable range of numeric 
  182.    values are shown in parentheses and the default value (used when ENTER is 
  183.    pressed alone in response to the prompt) is shown in square brackets.
  184.  
  185.  
  186.    Stopping EARTH
  187.    --------------
  188.  
  189.    When automatic rotation has been requested ("/D" or "/R" command line 
  190.    options), the message "Press ESC to stop" will be displayed. Pressing the 
  191.    key marked "ESC" will cause map drawing to stop, a "beep" will be heard, 
  192.    and the message will change to "Press ESC to quit". There may be a slight 
  193.    delay, as long as the current map drawing time, before the ESC key takes 
  194.    effect.
  195.  
  196.    When the message "Press ESC to quit" is displayed, pressing the key marked 
  197.    "ESC" will return you to the DOS prompt.
  198.  
  199.  
  200.    Moving the Map Center and other options
  201.    ---------------------------------------
  202.  
  203.    The map center is set initially by either selecting the default values (for 
  204.    Rancho Palos Verdes, California) or by entering latitude and longitude 
  205.    coordinates for a selected location. The initial map will always be drawn 
  206.    using these coordinates. The center of the map is marked by a small yellow 
  207.    circle in the center of the map area.
  208.  
  209.    When the message "Press ESC to quit" is displayed, you may press the "C" 
  210.    key (upper or lower case) and you will be prompted to enter new coordinates 
  211.    (latitude and longitude) for the map center.
  212.  
  213.    Any time the messages "PgUp/PgDn to ZOOM" and "Arrow Key to MOVE" are 
  214.    displayed, those keys are active. There is a built-in 0.5 second delay from 
  215.    the time one of these keys is pressed until the action is taken; this 
  216.    allows for multiple keypresses (to save intermediate map drawing time). The 
  217.    following keys are active:
  218.  
  219.         PgUp      Increases the ZOOM to a maximum of 2000%. The size of the 
  220.                   increment changes depending upon the current Zoom Factor.
  221.  
  222.         PgDn      Decreases the ZOOM to a minimum of 20%. The size of the 
  223.                   increment changes depending upon the current Zoom Factor.
  224.  
  225.         Home      Returns the Zoom Factor to 100%.
  226.  
  227.         End       Steps the Zoom Factor from 50% to 100% to 300% to 1000% to 
  228.                   2000% and then back to 50%.
  229.  
  230.         Up Arrow  Moves the center of the map UP on the map. The size of the 
  231.                   increment changes depending upon the current Zoom Factor.
  232.  
  233.  
  234.  
  235.  
  236.         Dn Arrow  Moves the center of the map DOWN on the map. The size of the 
  237.                   increment changes depending upon the current Zoom Factor.
  238.  
  239.         Rt Arrow  Moves the center of the map RIGHT on the map. The size of 
  240.                   the increment changes depending upon the current Zoom 
  241.                   Factor.
  242.  
  243.         Lt Arrow  Moves the center of the map LEFT on the map. The size of the 
  244.                   increment changes depending upon the current Zoom Factor.
  245.  
  246.         C         Prompts the user to enter new map center coordinates.
  247.  
  248.         D         Executes the demonstration sequence; identical to using the 
  249.                   "/D" command line option.
  250.  
  251.         L         Toggles the display of selected locations.
  252.  
  253.         R         Enable automatic rotation. Note that on VGA displays, the 
  254.                   display will switch to EGA mode for rotation.
  255.  
  256.  
  257.    Location Data File
  258.    ------------------
  259.  
  260.    ORTHOGRAPHIC EARTH expects the geographic location data to be in file 
  261.    EARTH.LOC and it must be in the same directory from which the program is 
  262.    run. The file includes 350+ locations (cities), their coordinates, and 
  263.    certain information required by the program. The file is normal ASCII 
  264.    comma-delimited data. The following is a typical data line in the file:
  265.  
  266.    "London",-.1167,51.5,7,100
  267.     ---+--  ---+-- --+- + -+-
  268.        |       |     |  |  |
  269.        |       |     |  |  +---  Minimum zoom factor to display
  270.        |       |     |  |
  271.        |       |     |  +------  Color to display name (1 to 15)
  272.        |       |     |
  273.        |       |     +---------  Latitude in degrees
  274.        |       |
  275.        |       +---------------  Longitude in degrees
  276.        |
  277.        +-----------------------  Location name
  278.  
  279.    The minimum zoom factors in file EARTH.LOC have been carefully selected so 
  280.    that the display is not too "cluttered" at a given zoom factor and so that 
  281.    location names near to each other do not overlap upon each other. Some care 
  282.    is required when adding new locations to avoid this problem!
  283.  
  284.    Note that location data is NOT displayed if the zoom factor is less than 
  285.    100%. Acceptable zoom factors range from 100 to 2000. The "color" is a 
  286.    number from 1 to 15 according to the following table:
  287.  
  288.         Black = 0       Gray = 8
  289.         Blue = 1        LtBlue = 9
  290.         Green = 2       LtGreen = 10
  291.  
  292.  
  293.  
  294.         Cyan = 3        LtCyan = 11
  295.         Red = 4         LtRed = 12
  296.         Magenta = 5     LtMagenta = 13
  297.         Brown = 6       Yellow = 14
  298.         White = 7       LtWhite = 15
  299.  
  300.    The color Black is ignored and is only shown for completeness. If the color 
  301.    is a NEGATIVE number, the small circle marking the location of the city or 
  302.    feature will NOT be displayed. Thus, if the a mountain range or river is to 
  303.    be labeled, you may wish to set the color negative.
  304.  
  305.    The latitude and longitude are expressed in degrees and decimal fractions 
  306.    of a degree. Note that many atlases show a number such as "24.45" which is 
  307.    actually 24 degrees and 45 minutes (NOT 24.45 degrees!) and should be 
  308.    entered as "24.75" (24 + 45/60).
  309.  
  310.    There is no restriction on the length of the location name. However, avoid 
  311.    long names if possible so as to minimize location names displaying on top 
  312.    of one another.
  313.  
  314.    The program performs no error checking on the contents of file EARTH.LOC. 
  315.    Be sure to use a simple ASCII editor or use your word processor in the 
  316.    "Non-Document" mode when editing file EARTH.LOC. Very strange results can 
  317.    appear if the wrong data are present or the wrong number of items is in a 
  318.    data line!
  319.  
  320.  
  321.    Map Database Detail
  322.    -------------------
  323.  
  324.    The map database used for ORTHOGRAPHIC EARTH is an adaptation of the Micro 
  325.    World Database II, placed in the public domain by Peter Pospeschil and 
  326.    Antonio Riveria. The original data were from the US Central Intelligence 
  327.    Agency (CIA) as distributed by the National Technical Information Service 
  328.    (NTIS).
  329.  
  330.    In order to obtain maximum performance, the map database has been converted 
  331.    to geocentric coordinates from the original latitude/longitude data and 
  332.    split into a data file (*.XYZ) and an index file (*.MCX). Several versions 
  333.    of the database are available, differing only in the amount of map detail 
  334.    included. Two such databases are included in the standard distribution of 
  335.    ORTHOGRAPHIC EARTH, and a third, more detailed database is available 
  336.    separately via my bulletin board systems. The available map databases are:
  337.  
  338.         EARTH4.*       Lowest level of detail and required for operation of 
  339.                        the program.
  340.  
  341.         EARTH3.*       Optional intermediate level of detail selected (if 
  342.                        present) for Zoom Factors of 300% or greater.
  343.  
  344.         EARTH2.*       Optional highest level of detail, selected (if present) 
  345.                        for Zoom Factors of 1000% or greater.
  346.  
  347.    ORTHOGRAPHIC EARTH checks to see which map databases are present in the 
  348.    default directory when it starts. The EARTH4.* files MUST be present. The 
  349.  
  350.  
  351.  
  352.    remaining map databases are optional. Increasing the level of detail 
  353.    greatly improves the map appearance at higher Zoom Factors. As usual, 
  354.    however, there is no free lunch. EARTH3 requires approximately twice the 
  355.    time to draw the map as does EARTH4. Similarly, EARTH2 requires 
  356.    approximately three times as long as EARTH3 to draw a given map. Note that 
  357.    the EARTH2.* files are large, approximately 500K bytes, in order to yield 
  358.    much greater detail.
  359.  
  360.    Other map databases may be made available periodically, depending upon my 
  361.    available time and user interest. Comments and suggestions are welcome.
  362.  
  363.  
  364.    Keyboard Rotation Modes
  365.    -----------------------
  366.  
  367.    Automatic Rotation may be initiated any time the message "Press ESC to 
  368.    quit" is displayed by pressing the "R" key (upper or lower case). The map 
  369.    will begin rotating at the current latitude.
  370.  
  371.    The demonstration (identical to that requested by the "/D" command line 
  372.    option), may be initiated any time the message "Press ESC to quit" is 
  373.    displayed by pressing the "D" key (upper or lower case). The demonstration 
  374.    automatically enables the display of selected locations.
  375.  
  376.  
  377.  
  378.    Version 9233, August 1992
  379.    -------------------------
  380.  
  381.    -Location names added with file EARTH.LOC. As released, the file includes 
  382.    365 selected cities around the world.
  383.    -Display algorithm speed has been greatly improved for zoom factors larger 
  384.    than 100%. Typical improvement is a factor of 2 or 3 in mid and equatorial 
  385.    latitudes. The effectiveness of the new algorithm decreases as the map 
  386.    center moves toward the polar regions.
  387.    -"C" command added to prompt the user for new map center coordinates while 
  388.    map is displayed.
  389.    -"D" command added to initiate the demonstration sequence (identical to the 
  390.    sequence displayed with the "/D" command line option is used.
  391.    -"L" command added to toggle location display.
  392.    -"R" command added to initiate automatic rotation from the current map 
  393.    center.
  394.    -All map database files from Version 9232 are unchanged and may be used 
  395.    with this version.
  396.    -Various cosmetic changes.
  397.  
  398.  
  399.    Version 9232, August 1992
  400.    -------------------------
  401.  
  402.    -Added PgUp, PgDn, Home, End, and arrow keys to allow manual adjustment of 
  403.    the map center.
  404.    -Corrected the direction of rotation of the Earth to correspond to the 
  405.    "real thing". Silly mistake! Thanks to Dave Mullenix for pointing it out to 
  406.    me.
  407.    -Added the "/D" command line option to bypass all prompts and immediately 
  408.    do the demonstration.
  409.    -Changed the map database from EARTH.MCP to EARTH.XYZ to eliminate the 
  410.    conversion of map coordinates from latitude/longitude to geocentric X-Y-Z 
  411.    coordinates. This typically saved an additional 25% in map drawing time.
  412.    -Added additional error trapping to try and detect problems on certain 
  413.    machines.
  414.  
  415.  
  416.    Version 9230, July 1992
  417.    -----------------------
  418.  
  419.    -The original code for ORTHOGRAPHIC EARTH was written by Matthew Merrill to 
  420.    work out the details of the projection and test to the features for use in 
  421.    his program SOLAR. Motion and EGA were not included.
  422.    -Version 9230 has been re-written by Dave Ransom to improve the speed
  423.    performance, to include EGA compatibility for use on systems so equipped, 
  424.    and to allow for motion. Note that the EGA mode on some VGA-equipped 
  425.    systems does NOT always perform correctly or may appear "squeezed" 
  426.    vertically.
  427.  
  428.