Coastal & Marine Geology InfoBank

Home FACS Activities Atlas Geology School Related Sites More

USGS InfoBank program -- onoffmerge

Skip navigational links
Loading
InfoBank Programs: by Name   by Topic  
Expanded Description
Topic Description
Name
onoffmerge
Synopsis
/infobank/programs/edit/onoffmerge/onoffmerge.for
Description
  Program to automatically merge navigation to a data file.

       
PROCESS
  When data time and navigation time are identical, navigation is added.

  When data time has no corresponding navigation time, 
  navigation is linearly interpolated from the surrounding 2 fixes.
    
OUTPUT
  Output is:

  YYYYDDDHHMMSST LAT.ITUDE LONG.ITUDE ORIGINAL_DATA.......
  (i4.4,i3.3,3i2.2,i1.1, 1x,f9.5, 1x,f10.5, 1x,a)  or
  (i4.4,i3.3,3i2.2,i1.1,t16,f9.5,t26,f10.5,t37,a)
    
AUTHOR
  Michael Hamer       .for             7/21/2000

  Based on MERGEIT
    
PROMPTS
  Enter data file name:

  Enter navigation file name:
    
SUBROUTINES
  converttime (external shareable)

  openem      (external shareable)

    
Reads
      read (90, 90, err = 99, end = 100)
     *  DataYr, DataDay, DataHour, DataMin, DataSec, DataTen,
     *  DataLat, DataLong, DataLineLength, 
     *  DataLine(1:DataLineLength)
         read (91, '(q,a)', err = 97, end = 100)
     *        NavLineLength, NavLine
            read (91, '(q,a)', err = 97, end = 100)
     *          NavLineLength, NavLine
         read (91, 91, err = 97, end = 100)
     *        NavYr, NavDay, NavHour, NavMin, NavSec, NavTen,
     *        NavLat, NavLong
            read (90, 90, err = 99, end = 100)
     *          DataYr, DataDay, DataHour, DataMin, DataSec, DataTen,
     *          DataLat, DataLong, DataLineLength,
     *          DataLine(1:DataLineLength)
         read (91, 91, err = 97, end = 100)
     *       NavYr, NavDay, NavHour, NavMin, NavSec, NavTen,
     *       NavLat, NavLong
Writes
      write (92, 701)
               write (92, 92) 
     *            DataYr, DataDay, DataHour, DataMin, DataSec, DataTen,
     *            FirstLat, FirstLong, DataLine(1:DataLineLength)
               write (92, 92) 
     *            DataYr, DataDay, DataHour, DataMin, DataSec, DataTen,
     *            DataLat, DataLong, DataLine(1:DataLineLength)
            write (92, 92) 
     *           DataYr, DataDay, DataHour, DataMin, DataSec, DataTen,
     *           FirstLat, FirstLong, DataLine(1:DataLineLength)
            write (92, 92) 
     *           DataYr, DataDay, DataHour, DataMin, DataSec, DataTen,
     *           NavLat, NavLong, DataLine(1:DataLineLength)
            write (92, 92) 
     *           DataYr, DataDay, DataHour, DataMin, DataSec, DataTen,
     *           FirstLat, FirstLong, DataLine(1:DataLineLength)
            write (92, 92) 
     *           DataYr, DataDay, DataHour, DataMin, DataSec, DataTen,
     *           Latitude, Longitude, DataLine(1:DataLineLength)
            write (92, 92) 
     *           DataYr, DataDay, DataHour, DataMin, DataSec, DataTen,
     *           FirstLat, FirstLong, DataLine(1:DataLineLength)
            write (92, 92) 
     *           DataYr, DataDay, DataHour, DataMin, DataSec, DataTen,
     *           InterpLat, InterpLong, DataLine(1:DataLineLength)
            write (92, 92) 
     *           DataYr, DataDay, DataHour, DataMin, DataSec, DataTen,
     *           FirstLat, FirstLong, DataLine(1:DataLineLength)
            write (92, 92) 
     *           DataYr, DataDay, DataHour, DataMin, DataSec, DataTen,
     *           DataLat, DataLong, DataLine(1:DataLineLength)
Opens
         open (unit = 91, 
     *        form = 'formatted',
     *        status = 'old', 
     *        file = NavFileName, 
     *              iostat = oerr) 
Calls
      call openem (2, 1)
      call converttime ('COMPRESS', DataDay, DataHour, DataMin, 
     *                      DataSec, DataTen, DataTime, ErrorFlag)
         call converttime ('COMPRESS', NavDay, NavHour, NavMin,  
     *                    NavSec, NavTen, NavTime, ErrorFlag)
            call converttime ('COMPRESS', DataDay, DataHour,  
     *           DataMin, DataSec, DataTen, DataTime, ErrorFlag)
         call converttime ('COMPRESS', NavDay, NavHour, NavMin,  
     *                          NavSec, NavTen, NavTime, ErrorFlag)

Skip footer navigational links

Coastal and Marine Science Centers:  Pacific   St. Petersburg   Woods Hole  
InfoBank   Coastal and Marine Geology Program   Geologic Information   Ask-A-Geologist   USGS Disclaimer  


Accessibility FOIA Privacy Policies and Notices

Take Pride in America logo USA.gov logo U.S. Department of the Interior | U.S. Geological Survey
URL: http://walrus.wr.usgs.gov/infobank/programs/edit/onoffmerge/onoffmerge.doc.html
Page Contact Information: InfoBank staff
Page Last Modified: Mon Sep 16 03:37:00 PDT 2013  (chd)