Coastal & Marine Geology InfoBank

Home FACS Activities Atlas Geology School Related Sites More

USGS InfoBank program -- navmerge

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

       
NOTES
  Based on MERGEIT

   
  Data that occurs before the navigation starts are not preserved.
  Data that occurs after  the navigation ends   are not preserved.
  
  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 is:
  YYYYDDDHHMMSST LAT.ITUDE LONG.ITUDE TENTHSEC.S ORIGINAL_DATA.......
  (i4.4,i3.3,3i2.2,i1.1, 1x,f9.5, 1x,f10.5, 1x,f10.1, 1x,a)  or
  (i4.4,i3.3,3i2.2,i1.1,t16,f9.5,t26,f10.5,t37,f10.1,t48,a)
    
AUTHOR
  Michael Hamer           .for             6/28/99

    
PROMPTS
  Enter data file name:

  Enter navigation file name:
    
SUBROUTINES
  converttime (external shareable)

  openem      (external shareable)

    
Reads
          read (20, '(a)', end = 9) EquipType(EquipTypeCount)
      read (30, '(q,a)') BestNavLen, BestNav
          read (90, 90, err = 99, end = 98)
     *        DataYr, DataDay, DataHour, DataMin, DataSec, DataTen,
     *        DataLineLength, DataLine(1:DataLineLength)
          read (DataLine(1:DataLineLength), 150)
     *          KeepLat, KeepLon
              read (91, 91, err = 97, end = 96)
     *            NavYr, NavDay, NavHour, NavMin, NavSec, NavTen,
     *            NavLat, NavLong
          read (*, '(a1)') OverWriteFile
          read (*, '(a1)') OverWriteFile
Writes
            write (Level3(Loop), '(80x)')
            write (Level3(Loop), '(80x)')
            write (Level2(Loop), '(80x)')
            write (Level3(Loop), '(80x)')
            write (Level2(Loop), '(80x)')
            write (Level1(Loop), '(80x)')
         write (EquipTypeExtPath(Loop), '(255x)')
              write (92, 92) 
     *          DataYr, DataDay, DataHour, DataMin, DataSec, DataTen,
     *             NavLat, NavLong,
     *             DataLine(23:DataLineLength)
              write (92, 92) 
     *          DataYr, DataDay, DataHour, DataMin, DataSec, DataTen,
     *             Latitude, Longitude,
     *             DataLine(23:DataLineLength)
              write (92, 92) 
     *          DataYr, DataDay, DataHour, DataMin, DataSec, DataTen,
     *             InterpLat, InterpLong,
     *             DataLine(23:DataLineLength)
Opens
      open (unit   = 20,
     *      status = 'old',
     *      form   = 'formatted',
     *      access = 'sequential',
     *      name   = '/infobank/programs/keep/equiptypes.keep')
      open (unit = 30,
     *      status = 'old',
     *      form   = 'formatted',
     *      access = 'sequential',
     *      file   = BestNavFile(1:BestNavFileLen))
      open (unit   = 91, 
     *      status = 'old',
     *      form   = 'formatted',
     *      access = 'sequential',
     *      file   = BestNav(1:BestNavLen))
      open (unit   = 92,
     *      status = 'unknown',
     *      access = 'sequential',
     *      form   = 'formatted',
     *      file  = '/infobank/tmp/navmerge.outfile')
Calls
      call openem (1,0)
      call stringlen (InputFilename, InputFileLen)
         call stringlen (InputFilename, InputFileLen)
      call changecase ('SMALLS', SmActId)
      call changecase ('SMALLS', SmFileExt)
      call stringlen (SmFileExt, SmFileExtLen)
      call stringlen (FilePath, FilePathLen)
      call stringlen (BestNavFile, BestNavFileLen)
          call changecase ('SMALLS', EquipType(EquipTypeCount))
         call stringlen (EquipType(Loop),
     *        EquipTypeLen(Loop))
         call stringlen (Level1(Loop), Length1(Loop))
         call stringlen (Level2(Loop), Length2(Loop))
         call stringlen (Level3(Loop), Length3(Loop))
         call stringlen (SubDir, SubDirLen)
         call stringlen (SubDirPath, SubDirPathLen)
            call stringlen (EquipTypeExtPath(Loop), EquipExtLen(Loop))
            call stringlen (EquipTypeExtPath(Loop), EquipExtLen(Loop))
            call stringlen (OutputFilename, OutputFileLen)
            call stringlen (EquipSubDir, EquipSubLen)
        call system ('/bin/mkdir '//EquipSubDir(1:EquipSubLen))
      call header (2,0)
      call stringlen (InputFile91, InputFile91Len)
      call stringlen (InputFile92, InputFile92Len)
          call converttime ('COMPRESS', DataDay, DataHour, DataMin, 
     *                      DataSec, DataTen, DataTime, ErrorFlag)
              call converttime ('COMPRESS', NavDay, NavHour, NavMin,  
     *                          NavSec, NavTen, NavTime, ErrorFlag)
          call changecase ('SMALLS', OverWriteFile)
             call system ('/bin/mv /infobank/tmp/navmerge.outfile '//
     *          OutputFilename(1:OutputFileLen))
          call changecase ('SMALLS', OverWriteFile)
             call system ('/bin/mv /infobank/tmp/navmerge.outfile '//
     *          OutputFilename(1:OutputFileLen))
                call system ('/bin/mv /infobank/tmp/navmerge.outfile '//
     *          OutputFilename(1:OutputFileLen))
         call system ('/bin/rm /infobank/tmp/navmerge.outfile')

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/nav/navmerge/navmerge.doc.html
Page Contact Information: InfoBank staff
Page Last Modified: Mon Sep 16 03:38:49 PDT 2013  (chd)