Link to USGS home page
USGS Home
Contact USGS
Search USGS
Coastal & Marine Geology InfoBank

USGS InfoBank program -- ties

Skip navigational links
Search InfoBank
Home tab Atlas tab Activities tab FACS tab Geology School tab More tab Activities tabs
   
InfoBank Programs: by Name   by Data Type   General Tools   GIS   Plotting   Web   USGS Disclaimer   InfoBank Programs   Boothill  
   
Expanded description
Topic Description
Name
ties
Synopsis
/infobank/programs/nav/ties/ties.for
Description
  Program to determine trackline crossings.
    
Prompts
  Enter input file name:

  Enter output file name:
  Enter acceptable time gap (in seconds):
  
  (Acceptable time gap is the maximum time gap in which you want the 
   program to look for track line crossings.)
    
Input
  Input is expected in DRS standard format for time/latitude/longitude:

  
  day, hour, minute, second, tenth, latitude, longitude, <rest of record>
  (i4,i3, 3i2, i1, 1x, f10.6, f11.6, <rest_of_format>)
    
Output
  Data is output in the following format:

  
  day1, hour1, minute1, second1, tenth1, latitude, longitude,
  day2, hour2, minute2, second2, tenth2,
  distance1, distance2, velocity1, velocity2
  (i4.4,i3.3,3i2.2,i1.1, 1x,f10.6,1x,f11.6,1x,
   i4.4,i3.3,3i2.2,i1.1,28x,
   f10.1, 3(1x,f10.1) )
    
Subroutines
  distance (internal)

  
  drsvt (external include file)
  
  openem     (external shareable)
  forerror   (external shareable
  converttime (external shareable)
  percentage (external shareable)
    
Author
  Clint Steele     4/12/2006    updated i/o formats

  Clint Steele     11/20/87
  Inverted the order of subscripts for 2-dimensional arrays,
  eliminated unnecessary code for reading input file, added more
  extensive help to this help header.
        Ed Maple   2/1/88

    
Reads
     read (InputUnit, InputFormat, iostat = ErrorFlag)
*         Year, Day, Hour, Minute, Second, Tenths, 
*         Latitude (NumberInput), Longitude (NumberInput)

    
Writes
                 write (OutputUnit, OutputFormat,
*                      iostat = ErrorFlag)
*                  Year, Day1, Hour1, Minute1, Second1, Tenths1, 
*                  TempLatitude, TempLongitude, 
*                  Year, Day2, Hour2, Minute2, Second2, Tenths2, 
*                  Distance1, Distance2,
*                  Velocity1, Velocity2

                 write (OutputUnit, OutputFormat, 
*                      iostat = ErrorFlag)
*                  Year, Day1, Hour1, Minute1, Second1, Tenths1, 
*                  TempLatitude, TempLongitude, 
*                  Year, Day2, Hour2, Minute2, Second2, Tenths2, 
*                  Distance1, Distance2, 
*                  Velocity1, Velocity2

    
Calls
 call openem (1, 1)
         call percentage (InputUnit)
             call forerror (ErrorFlag)
             call converttime 
*              ('COMPRESS', Day, Hour, Minute, Second, Tenths, 
*                         Time (NumberInput), TimeError)
 call percentage (0)
                 call converttime ('EXPAND', Day1, Hour1, Minute1, 
*                        Second1, Tenths1, TempTime, TimeError)

                 call converttime ('EXPAND', Day2, Hour2, Minute2, 
*                       Second2, Tenths2, TempTime2, TimeError)

                 call distance (Latitude (Loop1), 
*                               Longitude (Loop1), 
*                               Latitude (Loop1 + 1), 
*                               Longitude (Loop1 + 1), 
*                               Distance1)
                 call distance (Latitude (Loop2), 
*                               Longitude (Loop2), 
*                               Latitude (Loop2 + 1), 
*                               Longitude (Loop2 + 1), 
*                               Distance2)

                     call forerror (ErrorFlag)
                 call converttime ('EXPAND', Day1, Hour1, Minute1, 
*                        Second1, Tenths1, TempTime, TimeError)

                 call converttime ('EXPAND', Day2, Hour2, Minute2, 
*                       Second2, Tenths2, TempTime2, TimeError)

                 call distance (Latitude (Loop1), 
*                               Longitude (Loop1), 
*                               Latitude (Loop1 + 1), 
*                               Longitude (Loop1 + 1), 
*                               Distance1)
                 call distance (Latitude (Loop2), 
*                               Longitude (Loop2), 
*                               Latitude (Loop2 + 1), 
*                               Longitude (Loop2 + 1), 
*                               Distance2)

                     call forerror (ErrorFlag)
    

Skip footer navigational links


InfoBank   Menlo Park Center   Santa Cruz Center   St. Petersburg Center   Woods Hole Center   Coastal and Marine Geology Program   Geologic Information   Ask-A-Geologist   USGS Disclaimer  

FirstGov button   Take Pride in America button