USGS InfoBank banner.  USGS, Coastal and Marine Geology, InfoBank banner.
 USGS Coastal and Marine Geology banner.    Search InfoBank.
USGS InfoBank program -- gprmc2daps Skip navigational links
    ________   ________   ______________   ________   _________   _______________   ________  
  tab edge  Home  tab edge  Data  tab edge  Activities  tab edge  FACS  tab edge  Atlas  tab edge  Definitions  tab edge  More  tab edge  
   
InfoBank Programs: by Name   by Data Type   General Tools   GIS   Plotting   Web   USGS Disclaimer   InfoBank Programs
   
Expanded description
Topic Description
Name
gprmc2daps
Synopsis
/infobank/programs/refmt/gprmc2daps/gprmc2daps.for
Description
  Program to reformat GPRMC GPS records to standard DAPS format.
    
Output
  YonavTime, Latitude, Longitude, GPSTime, DeltaTime

    
Author
  Clint Steele      10/7/2002


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

     read (ALine(1:2), '(i2)') YonavHour
     read (ALine(4:5), '(i2)') YonavMinute
     read (ALine(7:8), '(i2)') YonavSecond
     read (ALine(10:12), '(i3)') YonavTenths
     read (ALine(Comma(1)+1:Comma(1)+2), '(i2)') GPSHour
     read (ALine(Comma(1)+3:Comma(1)+4), '(i2)') GPSMinute
     read (ALine(Comma(1)+5:Comma(1)+6), '(i2)') GPSSecond
     read (ALine(Comma(1)+8:Comma(1)+9), '(i2)') GPSTenths
     read (ALine(Comma(3)+1:Comma(3)+2), '(i2)') LatDeg
     read (ALine(Comma(3)+3:Comma(3)+10), '(f8.5)') LatMin
     read (ALine(Comma(5)+1:Comma(5)+3), '(i3)') LongDeg
     read (ALine(Comma(5)+4:Comma(5)+11), '(f8.5)') LongMin
     read (ALine(Comma(9)+1:Comma(9)+2), '(i2)') Day
     read (ALine(Comma(9)+3:Comma(9)+4), '(i2)') Month
     read (ALine(Comma(9)+5:Comma(9)+6), '(i2)') Year
    
Writes
       write (91, '(i4.4,i3.3,3i2.2,i1.1,
*        t16,f9.5,t26,f10.5,1x,
*        i4.4,i3.3,3i2.2,i1.1,
*        1x,a1,i4.4,i3.3,3i2.2,i1.1)')
*        Year, JDay+YonavDay,
*        YonavHour, YonavMinute, YonavSecond, YonavTenths,
*        Latitude, Longitude,
*        Year,JDay+GPSDay,
*        GPSHour, GPSMinute, GPSSecond, GPSTenths,'+',
*        0,DTime,DHour,Dminute,DSecond,DTenths

       write (91, '(i4.4,i3.3,3i2.2,i1.1,
*        t16,f9.5,t26,f10.5,1x,
*        i4.4,i3.3,3i2.2,i1.1,
*        1x,a,i4.4,i3.3,3i2.2,i1.1)')
*        Year, JDay+YonavDay,
*        YonavHour, YonavMinute, YonavSecond, YonavTenths,
*        Latitude, Longitude,
*        Year,JDay+GPSDay,
*        GPSHour, GPSMinute, GPSSecond, GPSTenths,'-',
*        0,DTime,DHour,DMinute,DSecond,DTenths
    
Calls
 call openem (1,-1)
     call getcentury (Year, Century)
     call julianday ("JULIAN", JDay, Year, Month, Day)
     call converttime ('COMPRESS', 
*        JDay+YonavDay, YonavHour, YonavMinute, YonavSecond,
*        YonavTenths, YonavTime, ErrorFlag)

     call converttime ('COMPRESS',
*        JDay+GPSDay, GPSHour, GPSMinute, GPSSecond,
*        GPSTenths, GPSTime, ErrorFlag)

     call converttime ('EXPAND',
*        DTime, Dhour, DMinute, DSecond, DTenths,
*        TimeDiff, ErrorFlag)
      call converttime ('EXPAND',
*        DTime, Dhour, DMinute, DSecond, DTenths,
*        -TimeDiff, ErrorFlag)
    

Skip footer navigational links

InfoBank   Menlo Park Center   Santa Cruz Center   St. Petersburg Center   Woods Hole Center   Coastal and Marine Geology Program  
 
U. S. Department of the Interior   U. S. Geological Survey   Geologic Information   Ask-A-Geologist   USGS privacy statement   Disclaimer  

URL: /infobank/programs/refmt/gprmc2daps/gprmc2daps.doc.html
Maintainer: Clint Steele
Last modified: Fri Oct 11 03:11:27 PDT 2002  (wcs)