Version 13 (modified by chrfi, 15 years ago) (diff)

--

Converting Raw GPS Base Station Data to RINEX

These instructions currently only cover converting Trimble GPS data to RINEX, though teqc can convert other formats.

Note: You are advised to take a backup before doing all this - these utilities will cheerfully overwrite your source files with garbage if misused.

In a nutshell

Running in the root directory containing your raw GPS data (and assuming you have everything installed), The commands you probably want are (in bash):

for filename in `find -name '*.T00'`; do runpkr00 -dveai $filename; done
for filename in `find -name '*.dat'`; do rawdatestr=`trmdatefinder.py -q $filename`; datestr=`julian $rawdatestr | sed 's/\([0-9]\+\) \([0-9]\{4\}\)/\2:\1/'`; teqc -week $datestr -tr d +nav `echo $filename | sed 's/dat$/09n/'` $filename > `echo $filename | sed 's/dat$/09o/'`; done

Note you should replace the "09" bit of the file extensions (ie 09n, 09o) with the year in which the observations were collected. It's just convention, it'll still work if you don't, but you should anyway. Watch the output from this carefully - if you see anything in it that looks like this:

teqc usage error: -week #              set GPS week to initial value # for native format translation (default = best guess)
teqc ... exiting

...then the script failed to parse the date for at least one input file (probably it didn't match the expected input pattern).

See below for more information about what those commands are doing.

Converting raw Trimble data (*.T00) to Trimble DAT format

  1. Check you have runpkr00 installed (http://facility.unavco.org/software/download_transfer/trimble/trimble.html)
  2. For each raw GPS file (*.T00), run runpkr00 -dveai <filename>
    • This should generate three or four files per input file - .dat (GPS observations), .eph (GPS ephemeris), .ion (Ionosphere information?) and possibly .app (?).

Converting Trimble DAT format to RINEX

  1. Check you have teqc (http://facility.unavco.org/software/teqc/teqc.html). Note this doesn't install, it's just an executable that should be in the path somewhere.
  2. Check which Julian day your GPS observations were collected on.
  3. for each .dat file created above, ensure the other files are in the same directory and run teqc -week YYYY:JJJ -tr d +nav <output_filename>.YYn <dat_filename> > output_filename.YYo
    • In that command, YYYY is a 4-digit year, JJJ is the julian day on which the GPS observations start, YY is a two-digit year.
    • Note: If you forget to give the nav filename (*.YYn) and just give the input DAT file, that command will overwrite your input file with garbage. Don't forget the nav file.
    • If you don't know the date of the observation file, run teqc without the week argument. It will default to the current week, but will tell you which week you should use instead (then you should re-run it with the suggested -week argument).
    • This should generate RINEX files that can be read by Grafnav/Grafnet as normal.
    • To extract the date of acquisition from the Trimble raw filename in a format useable by teqc (and assuming you've got the "julian" script installed), use:
      julian `trmdatefinder.py <filename>` | sed 's/\([0-9]\+\) \([0-9]\{4\}\)/\2:\1/'
      
      • This assumes the filename format is *YYYYMMDDnnnx.xxx, where x is any character, YYYY is a 4-digit year, MM is a two-digit month, DD is a two-digit day of month and nnn is any digit
      • trmdatefinder.py is attached to this page.
    • Teqc can do quite a lot (more than just format conversion). Usage info/instructions (comprehensive but somewhat opaque) are at http://facility.unavco.org/software/teqc/tutorial.html
  4. If you have several sequential RINEX files for the same site, they can be joined together using teqc:

Attachments (1)

Download all attachments as: .zip