Expanded description
| Topic |
Description |
| Name |
gerry2daps |
| Synopsis |
/infobank/programs/refmt/gerry2daps/gerry2daps.for |
| Description |
Program to reformat a comma-delimited navigation file
from Gerry Hatcher into the DAPS navigation file format.
|
| Prompts |
Input file = navigation file
Output file = DAPS time/lat/lon/etc file
Enter name of input file:
Enter name of output file:
|
| Input_format |
The input format is:
( t1, i2, month
t4, i2, day
t7, i2, year
t10, i2, hour
t13, i2, minute
t16, i2, second
t19,f14.12, ship latitude
t35,f16.12, ship longitude
t51, f, fish latitude
, f, fish longitude
, f, speed
, f, ship heading
, f, ship course
, f, ship depth
, a, line
, a, fish data age Ms
, f, fish heading
, f, fish pitch
, f, fish roll
, f, fish altitude
, f, fish pres depth
, f) fish water depth
|
| Output_format |
The DAPS ship nav output format is:
( t1, i4.4, Year
t5, i3,3, DayOfYear
t8, i2.2, Hour
t10, i2.2, Minute
t12, i2.2, Second
t14, i1.1, TenthOfSecond
t16, f9.5, ShipLatitude
t26,f10.5, ShipLongitude
t37, a, Line
t50, f9.2, Speed
t60, f9.2, ShipHeading
t70, f9.2, ShipCourse
t80, f9.2, ShipDepth)
The DAPS fish nav output format is:
( t1, i4.4, Year
t5, i3,3, DayOfYear
t8, i2.2, Hour
t10, i2.2, Minute
t12, i2.2, Second
t14, i1.1, TenthOfSecond
t16, f9.5, FishLatitude
t26,f10.5, FishLongitude
t37, a, Line
t50, f9.2, Speed
t60, f9.2, FishHeading
t70, f9.2, FishPitch
t80, f9.2, FishRoll
t90, f9.2, FishAltitude
t100, f9.2, FishPressureDepth
t110, f9.2, FishWaterDepth
t120, a FishDataAgeMS)
|
| Subroutines |
openem (external shareable)
forerror (external shareable)
julianday (external shareable)
getcentury (external shareable)
changecase (external shareable)
stringlen (external shareable)
|
| Author |
Clint Steele 04/26/2007
based on /infobank/programs/refmt/mips2daps
|
| Reads |
read (InputUnit, '(q,a)', end = 900, iostat = ErrorFlag)
* ALineLength, ALine(1:ALineLength)
read (ALine(1:Comma(1)-1), '(i2,1x,i2,1x,i2)')
* Month, Day, Year
read (ALine(Comma(1)+1:Comma(2)-1),
* '(i2,1x,i2,1x,i2)') Hour, Minute, Second
read (ALine(Comma(2)+1:Comma(3)-1), '(f)') ShipLatitude
read (ALine(Comma(3)+1:Comma(4)-1), '(f)') ShipLongitude
read (ALine(Comma(4)+1:Comma(5)-1), '(f)') FishLatitude
read (ALine(Comma(5)+1:Comma(6)-1), '(f)') FishLongitude
read (ALine(Comma(6)+1:Comma(7)-1), '(f)') Speed
read (ALine(Comma(7)+1:Comma(8)-1), '(f)') ShipHeading
read (ALine(Comma(8)+1:Comma(9)-1), '(f)') ShipCourse
read (ALine(Comma(9)+1:Comma(10)-1), '(f)') ShipDepth
read (ALine(Comma(10)+1:Comma(11)-1), '(q,a)')
* LineLength, Line(1:LineLength)
read (ALine(Comma(11)+1:Comma(12)-1), '(q,a)')
* FishDataAgeMSLength, FishDataAgeMS(1:FishDataAgeMSLength)
read (ALine(Comma(12)+1:Comma(13)-1), '(f)') FishHeading
read (ALine(Comma(13)+1:Comma(14)-1), '(f)') FishPitch
read (ALine(Comma(14)+1:Comma(15)-1), '(f)') FishRoll
read (ALine(Comma(15)+1:Comma(16)-1), '(f)') FishAltitude
read (ALine(Comma(16)+1:ALineLength), '(f)') FishPressureDepth
|
| Writes |
write (ShipOutputUnit, '(a)') '!* '//
* InputFileName(1:InputFileNameLength)
write (ShipOutputUnit, '(a)') '! '//ALine(1:ALineLength)
write (ShipOutputUnit, '(a)') '!'
write (FishOutputUnit, '(a)') '!* '//
* InputFileName(1:InputFileNameLength)
write (FishOutputUnit, '(a)') '! '//ALine(1:ALineLength)
write (FishOutputUnit, '(a)') '!'
write (Line, '(50x)')
write (FishDataAgeMS, '(50x)')
write (ShipOutputUnit, 40)
* Year+Century,
* DayOfYear, Hour, Minute, Second,
* ShipLatitude, ShipLongitude,
* Line(1:LineLength), Speed,
* ShipHeading, ShipCourse, ShipDepth
write (FishOutputUnit, 41)
* Year+Century,
* DayOfYear, Hour, Minute, Second,
* FishLatitude, FishLongitude,
* Line(1:LineLength), Speed,
* FishHeading, FishPitch, FishRoll,
* FishAltitude, FishPressureDepth, FishWaterDepth,
* FishDataAgeMS(1:FishDataAgeMSLength)
|
| Calls |
call openem (1, 2)
call stringlen (InputFileName, InputFileNameLength)
call getcentury (Year, Century)
call forerror (ErrorFlag)
call julianday
* ('JULIAN', DayOfYear, Year+Century, Month, Day)
call changecase ('SMALLS', Line(1:LineLength))
call changecase ('CAPITALS', Line(1:LineLength))
|
|