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

USGS InfoBank program -- spnav2daps

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 Topic  
   
Expanded description
Topic Description
Name
spnav2daps
Synopsis
/infobank/programs/refmt/spnav2daps/spnav2daps.for
Description
  Program to convert St. Petersburg character-delimited
  navigation files to standard DAPS format.
    
Author
  Clint Steele     11/1/2002


    
Reads
 read (90, '(q,a)', end = 99) 
*    ALineLength, ALine(1:ALineLength)

     read (90, '(q,a)', end = 99)
*        ALineLength, ALine(1:ALineLength)

         read (ALine(Tab(2)+1:Tab(3)-1), '(f)') Longitude
         read (ALine(Tab(2)+1:Tab(3)-1), '(i)') Degree
         read (ALine(Tab(3)+1:Tab(4)-1), '(f)') Latitude
         read (ALine(Tab(3)+1:Tab(4)-1), '(i)') Degree
     read (ALine(Tab(4)+1:Tab(5)-1), '(i)') Year
     read (ALine(Tab(5)+1:Tab(6)-1), '(i)') Day
     read (ALine(Tab(6)+1:Colon(1)-1), '(i)') Hour
     read (ALine(Colon(1)+1:Colon(2)-1), '(i)') Minute
     read (ALine(Colon(2)+1:ALineLength), '(i)') Second
     read (90, '(q,a)', end = 99)
*        ALineLength, ALine(1:ALineLength)

         read (ALine(1:Comma(1)-1), '(f)') Longitude
         read (ALine(Comma(1)+1:Comma(2)-1), '(f)') Latitude
         read (ALine(Comma(4)+1:Comma(5)-1), '(f)') Longitude
         read (ALine(Comma(5)+1:Comma(6)-1), '(f)') Latitude
     read (ALine(Comma(6)+1:Comma(7)-1), '(i)') Year
     read (ALine(Comma(7)+1:Colon(1)-1), '(i)') Day
     read (ALine(Colon(1)+1:Colon(2)-1), '(i)') Hour
     read (ALine(Colon(2)+1:Colon(3)-1), '(i)') Minute
     read (ALine(Colon(3)+1:ALineLength), '(i)') Second
     read (90, '(q,a)', end = 99)
*        ALineLength, ALine(1:ALineLength)

     read (ALine(1:Tab(1)-1), '(f)') Longitude
     read (ALine(Tab(1)+1:Tab(2)-1), '(f)') Latitude
     read (ALine(Tab(6)+1:Tab(7)-1), '(i)') Year
     read (ALine(Tab(7)+1:Colon(1)-1), '(i)') Day
     read (ALine(Colon(1)+1:Colon(2)-1), '(i)') Hour
     read (ALine(Colon(2)+1:ALineLength), '(i)') Minute
    
Writes
     write (91, 3) Year,Day, Hour, Minute,Second,Tenths,
*        Latitude, Longitude,
*        ALine(1:Tab(1)-1), 
*        ALine(Tab(1)+1:Tab(2)-1)

         write (91, 3) Year, Day, Hour, Minute, Second,
*            Latitude, Longitude,
*            ALine(Comma(2)+1:Comma(3)-1),
*            ALine(Comma(3)+1:Comma(4)-1),
*            ALine(Comma(4)+1:Comma(5)-1),
*            ALine(Comma(5)+1:Comma(6)-1)

         write (91, 3) Year, Day, Hour, Minute, Second,
*            Latitude, Longitude,
*            ALine(Comma(2)+1:Comma(3)-1),
*            ALine(Comma(3)+1:Comma(4)-1),
*            ALine(1:Comma(1)-1),
*            ALine(Comma(1)+1:Comma(2)-1)
     write (91, 3) Year, Day, Hour, Minute, 
*        Latitude, Longitude,
*        ALine(Tab(2)+1:Tab(3)-1),
*        ALine(Tab(3)+1:Tab(4)-1),
*        ALine(Tab(4)+1:Tab(5)-1),
*        ALine(Tab(5)+1:Tab(6)-1)

    
Calls
 call openem (1,1)
     call sp7tabnav
     call sp6tabnav
     call sp7commanav
     call stringlen (ALine(1:Tab(1)-1), LineLength)
     call stringlen (ALine(Tab(1)+1:Tab(2)-1), ShotLength)
         call stringlen (ALine(Comma(4)+1:Comma(5)-1), XLength)
         call stringlen (ALine(Comma(5)+1:Comma(6)-1), YLength)  
         call stringlen (ALine(1:Comma(1)-1), XLength)
         call stringlen (ALine(Comma(1)+1:Comma(2)-1), YLength)
     call stringlen (ALine(Comma(2)+1:Comma(3)-1), LineLength)
     call stringlen (ALine(Comma(3)+1:Comma(4)-1), ShotLength)
     call stringlen (ALine(Tab(2)+1:Tab(3)-1), LineLength)
     call stringlen (ALine(Tab(3)+1:Tab(4)-1), ShotLength)
     call stringlen (ALine(Tab(4)+1:Tab(5)-1), XLength)
     call stringlen (ALine(Tab(5)+1:Tab(6)-1), YLength)
    

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