                                                                   
                             NEWMODBB DOCUMENTATION
                   
                                 VERSION 3.2                               
                                November 1999 
                                

 I. USER DOCUMENTATION - for general processing

   Purpose:  To modify Blue Book HZTL observation data set records for use
 as input to program ADJUST, where the Blue Book SSNs are four digits.

    This version is based upon the FGCC's publication Input Formats and
 Specifications of the NGS Data Base (Blue Book), vol. I, chapter two,
 (1989, reprint 1993) as of February, 1993.  In general this program should 
 be run after CHKOBS and before ADJUST.

    NEWMODBB performs the following functions:

    1.  Converts WGS72 positions to PNAD83 positions (if required).

    2.  Updates *20* and *22* records by computing the Final One Sigma
        Estimate (FOSE).

    3.  Updates *40* and *42* records.
        a. Computes FOSE.
        b. Changes Zenith Distances to Mark-to-Mark.
        c. Changes vertical angles to zenith distances.

    4.  Converts *50* and *51* records to *52* records.
        a. Computes FOSE.
        b. Changes to Mark-to-Mark distance.

    5.  Converts *53* to *54* records.
        a. Computes FOSE.
        b. Changes to Mark-to-Mark distance.

    6.  Updates *60* records to Mark-to-Mark and computes FOSE.

    7.  Prints the correction required to reduce distances from
        sea level or horizontal to mark -to- mark.

    8.  Computes the FOSEs for instruments with resolutions between
        1.0" and 30".
    
    9.  Prints an error message if the difference in elevation is
        greater than the length of the line.

     SPECIAL NOTE: Newmodbb will not convert *81* records to *80* 
     records. To use Newmodbb, you must have geodetic positions.

     Newmodbb was changed on May 5, 1992 to process an order of B 
     or A for Gps Surveys.

     Newmodbb was changed on February 19, 1993 to process *86* records
     according to the new Bluebook specifications.
   
     The following changes were made in version 3.1 (1/19/95):
        1. Newmodbb was changed to handled the total station instruments.
           The program will now accept three *70* records for one JSIN (one
           for horizontal directions, one for vertical angles, and one for
           distance observations).  In version 3.0, the program would only
           accept two *70* records for one JSIN, one for distance and one
           for directions.
        2. The program now requires a separate *70* record for the vertical
           angles measurements.  In version 3.0, only one *70* record was 
           required for both horizontal and vertical measurements.
                  
     The following change were made in version 3.2 (11/23/99):
        1. Newmodbb was changed to prompt for a newmodbb output filename.

 A. INPUT

    1.  A standard Blue Book observation data set, which in general has
        previously been successfully run through program CHKOBS.

    2.  M-File - consists of three types of records.

    - CONVERSION RECORD.

      cc 01-02   AA
      cc 03-03   Conversion Code    Y -- convert WGS-72 positions into
                                         PNAD-83 positions.
                                    N -- no conversion necessary 
      cc 04-80   Reserved.

                 NOTE:  A determination of what code to use for this record
                        may be made by reading the *13* record of the HZTL
                        OBS DATA listing and from the accompanying Project
                        Report.  Only one per project.

    - INSTRUMENT DISTANCE STANDARD DEVIATION RECORD.

      cc 01-02   BB
      cc 03-05   NGS Survey distance equipment code.
      cc 06-09   Standard deviation, units of 0.1 mm.
      cc 10-12   Distance-dependent term, units of 0.1 ppm.
      cc 13-80   Reserved.

                 NOTE:  There may be none, one or many of this type records,
                        depending on whether or not all of the *70* survey
                        equipment codes exist in internal table TBLSD which
                        correspond to the present version of Blue Book Annex F.
                        If not, you will receive the following  message when
                        running NEWMODBB:
                        ***FATAL*** INTERNAL TABLE NEEDS TO BE UPDATED WITH
                        NEW SURVEY EQUIP CODE = (ISEC)
    - OUTPUT RECORD.

      cc 01-02   CC
      cc 03-03   Modified File Indicator  Y -- display modified Blue Book
                                          N -- do NOT display modified
                                               Blue Book.
      cc 04-80   Reserved.

                NOTE:  Only one of this type record required.


 B. OUTPUT

    1. A successful run of NEWMODBB will produce the following results:
       a. A listing of all non-fatal errors.
       b. The message - 'HERE IS THE MODIFIED BLUE BOOK'.
       c. An optional listing of the modified Blue Book output data set.
       d. A Blue Book observation output data set consisting of the converted
          records.

    2. An unsuccessful run of NEWMODBB will produce the following results:
       a. A listing of fatal errors.
       b. The message - '****** FATAL TERMINATION FATAL TERMINATION!!'.
                        '****** THIS DUMP IS INTENTIONAL!'
                        '****** REFER TO PRIOR ERROR MESSAGES'

       NOTE:  The following error messages may need more explanation:

       1. '**** ILLEGAL ISN (isn), FOR NSTA = (nsta) IN (subroutine name)'

         Either no *80* or *81* record with an ISN (station serial number)
         exists or the ISN (station serial number) was miskeyed.

       2. '*** FATAL *** INTERNAL TABLE NEEDS TO BE UPDATED WITH NEW
           SURVEY EQUIP CODE = (isec)'

         A *70* record has a survey equipment code that is not in the
         program's internal table, this can be temporarily updated for the
         duration of a run by providing an appropriate BB record in the M-File.
                                                                   

 C . EXECUTING NEWMODBB

       On a PC or sun -

       Run NEWMODBB.EXE

       Respond to the prompts for a:

           Blue Book observation filename
           mfile filename
           modified Blue Book observation filename
           NEWMODBB output filename

       Review printed listing of error messages, edit the input data 
       set and then run NEWMODBB again.  Continue this procedure until
       all of the error messages are corrected or addressed to your 
       satisfaction.  Use the final output as input to program ADJUST.
