Installation of DE200 Ephemerides for Bernese GPS Software Version 5.0 
======================================================================

Content: - how to download the ephemerides
         - how to generate a continuous ephemeris file over the year 2000
               - for UNIX-platforms
               - for WINDOWS-platforms
         - how to incorporate DE200 ephemerides into the Bernese GPS Software


NOTE: Please make sure that the Bernese environment variables are 
      available when you run the programs.
      UNIX platforms:
         Make sure that the environment variables are loaded. 
         Depending on your shell use   
         ". BERN50/GPS/LOADGPS.setvar"  or 
         "source BERN50/GPS/LOADGPS.setvar".
         (Adapt the path to LOADGPS.setvar if necessary). 
         You may add this step into your login script.
      WINDOWS platform:
         You need to reboot (win9x systems) or to re-login after 
         running the installation files.


Source of Ephemerides
---------------------
The DE200 ephemerides are prepared at JPL by M.E. Standish et al. Information 
may be found at
           
	   http://ssd.jpl.nasa.gov/?ephemerides#planets

The ephemerides may be downloaded from this site (see below). 
There is also a CD available containing binary and ascii versions of the DE200 
ephemerides covering the time interval from 1599 to 2200. The CD may be purchased
for $24.95 from William-Bell, Inc., see

           http://www.willbell.com/software/jpl.htm



Ephemerides Available from Earlier Version of the Bernese GPS Software
----------------------------------------------------------------------

If you are already using DE200 ephemerides in version 4.2 of the Bernese
GPS Software you may copy the file DE200.EPH from the version 4.2 to 
version 5.0. In both versions the file is located in the directory 
${X}/GEN.

The pre-requirement is that you use the same compiler for version 5.0 as
for version 4.2 or that the compilers are at least binary compatible (this 
is not the case for the binaries distributed for WINDOWS). We recommend to
check the compatibility with the program ${XG}/TESTEPH in any case:

    - Download the file testpo.200 from URL 
      ftp://ssd.jpl.nasa.gov/pub/eph/planets/test-data/	
    - Prepare an input file TESTEPH.INP containing: 
      - First line:   the name of the binary file which you want to test. 
      - Second entry: the name of the test-data file.
      Example for TESTEPH.INP: 
           DE200.EPH   
           testpo.200

    - Run the program: 
           use the command ${XG}/TESTEPH

If this test fails the file DE200.EPH has to rebuilt following the instructions 
below.


Download the Ephemerides
------------------------
The ephemeris package is available from the anonymous ftp server

           ssd.jpl.nasa.gov

When connected: "cd pub/eph/planets".

Get the following files:

For UNIX users:

           test-data/testpo.200
           UNIX/de200/unxp1950.200              (each file is 3.8 MB)
           UNIX/de200/unxp2000.200           
           
For non UNIX users (Linux and PC):

           test-data/testpo.200
           ascii/de200/header.200
           ascii/de200/ascp1980.200             (each file is 5.2 MB)
           ascii/de200/ascp2000.200           

The fortran programs needed for the installation of the JPL ephemerides on
your computer are included in the distribution of the Bernese GPS Software 
Version 5.0. The programs are the original JPL routines, slightly adapted
to simplify the usage.


Procedure for Binary Compatible UNIX-Platforms
----------------------------------------------
For UNIX binary compatible platforms (most UNIX-systems, but not LINUX) the 
binary files covering 50 years each can be downloaded directly from JPL as 
described above. The following steps show how to generate a DE200 file 
covering the years 1950 to 2050:

1) Check whether the downloaded binary files are readable on the UNIX 
   platform used:
    - Prepare an input file TESTEPH.INP containing: 
      - First line:   the name of the binary file which you want to test. 
      - Second entry: the name of the test-data file.
      Example for TESTEPH.INP: 
           unxp2000.200
           testpo.200

    - Run the program using the command "${XG}/TESTEPH". 
      The routine prints the range of the ephemerides in Julian date and the
      constants contained in the ephemeris files and checks ephemeris values
      agains values precomputed at JPL and contained in the file "testpo.200".
      An error message occurs if the output from the ephemeris file does 
      deviate too much from the content of the test file. If an error occurs, 
      try the procedure for non-binary compatible UNIX platforms after 
      downloading the ASCII ephemeris files.
      
2) Merge the two files together:
    - Prepare an input file BINMERGE.INP containing:
      - First line:  the file name containing the data from 1950-2000.
      - Second line: the file name containing the data from 2000-2050.
      - Third line:  the name of the result file with merged ephemerides.
      Example for BINMERGE.INP: 
           unxp1950.200 
           unxp2000.200 
           DE200.EPH

    - Run the program using the command "${XG}/BINMERGE".

3) Check output:
    - Modify TESTEPH.INP corresponding to the new input file 
      (e.g., DE200.EPH)
    - Run the program using the command "${XG}/TESTEPH" and check for error 
      messages.


Procedure for Non-Binary Compatible UNIX-Platforms and WINDOWS-Users
--------------------------------------------------------------------
For platforms that are not binary compatible with UNIX the ephemeris files
have to be downloaded as ASCII files and converted into binary format on the
target machine using the program "ASC2EPH". The ASCII files available at 
JPL cover a time interval of 20 years each. The required files are listed 
above.

1) Concatenate the ASCII files:
    - Concatenate the header file and the two ASCII ephemeris files to
      a temporary file:
           Windows:  copy header.200+ascp1980.200+ascp2000.200 temp.200
           UNIX:     cat header.200    > temp.200
                     cat ascp1980.200 >> temp.200
                     cat ascp2000.200 >> temp.200

2) Convert the file to binary
      Non Windows users:
        Prepare an input file ASC2EPH.INP containing:
        - First line:  the file name of the concatenated ASCII file
        - Second line: the file name of the resulting binary file
        Example for ASC2EPH.INP: 
           temp.200 
           DE200.EPH
      All users:
        Run the program in the directory of temp.200:
        -  Windows:  run ASC2EPH with the file "temp.200" as input:
	             %XG%\ASC2EPH.exe < temp.200
		     (&lt; is the "less than" sign)
                     this will create the file JPLEPH containing
                     the binary DE200 ephemeris.
        -  UNIX:     use the command ${XG}/ASC2EPH 
                             
    - Alternatively (e.g. in case of disk space restrictions) the two 
      files ascp1980.200 and ascp2000.200 may be converted individually
      repeating the two steps above for each of them. The two binary files
      may then be merged using the program BINMERGE (see description for
      UNIX users above).
    
3) Check the readability of the file
    - Prepare an input file TESTEPH.INP containing: 
      - First line:   the name of the binary file which you want to test. 
      - Second entry: the name of the test-data file.
      Example for TESTEPH.INP: 
           DE200.EPH   
           testpo.200

    - Run the program: 
           Windows:  use the command %XG%\TESTEPH.exe
           UNIX:     use the command ${XG}/TESTEPH


How to Implement the DE200 Ephemerides into the Bernese GPS Software
--------------------------------------------------------------------

Within the Bernese GPS Software the DE200 ephemerides
   - are located in the directory 
          %X%\GEN (Windows) resp. ${X}/GEN (UNIX notation)
   - have the extension .EPH
   - have a default name DE200.EPH.

To implement the newly generated ephemeris file into the Bernese GPS Software
simply copy the file you have just generated to the name DE200.EPH in the 
%X%\GEN-directory (${X}/GEN).On Windows: copy JPLEPH %X%\GEN\DE200.EPH
