Version 17 (modified by wja, 10 months ago) (diff) |
---|
Converting Raw GPS Base Station Data to RINEX
Before running any of these commands make a copy of the basestation data and work on this
NERC-ARF Leica Basestation
This consists of multiple files usually named something like Default_NNNN_DDMM_HHMMSS.*. The import file extension here is the .m00 one.
To convert the basestation data to RINEX use the following unix command:
teqc +nav OUTFILE.14n BASESTATIONFILE.m00 > OUTFILE.14o
where the OUTFILE is the output filename and should be the same for both .14n and .14o files. The extension .14* is the year (so for 2015 data the extension would be 15o and 15n).
For more commands for working with basestation data see here.
In a nutshell
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.
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.
Splitting up RINEX Data
Sometimes basestation data over multiple days are written to one file. This will result in errors in the navigation software, perhaps about the basestation data being too long or moving location.
To view a summary of RINEX data use either of the below commands:
teqc -O.sum . [INPUT_FILE]
or
teqc -O.sum . [INPUT_FILE]
Below is an example of basestation data that contains multiple days:
! Notice ! 2023 May 23 08:08:28.000: poss. incr. of sampling int. OR data gap of 4201.000 seconds (min. dt found= 1.000 s) ! Notice ! 2023 May 23 08:08:59.000: poss. incr. of sampling int. OR data gap of 26.000 seconds (min. dt found= 1.000 s) ! Notice ! 2023 May 24 08:00:12.000: poss. incr. of sampling int. OR data gap of 70564.000 seconds (min. dt found= 1.000 s) ! Notice ! 2023 May 26 07:09:45.000: poss. incr. of sampling int. OR data gap of 156199.000 seconds (min. dt found= 1.000 s) ! Notice ! 2023 May 27 08:52:50.000: poss. incr. of sampling int. OR data gap of 78443.000 seconds (min. dt found= 1.000 s) ! Notice ! 2023 May 28 07:07:11.000: poss. incr. of sampling int. OR data gap of 62460.000 seconds (min. dt found= 1.000 s) ! Notice ! 2023 May 30 06:44:54.000: poss. incr. of sampling int. OR data gap of 153869.000 seconds (min. dt found= 1.000 s) ! Notice ! 2023 May 31 06:50:53.000: poss. incr. of sampling int. OR data gap of 71677.000 seconds (min. dt found= 1.000 s) ! Notice ! 2023 Jun 1 07:06:25.000: poss. incr. of sampling int. OR data gap of 77228.000 seconds (min. dt found= 1.000 s) ! Notice ! 2023 Jun 25 09:18:19.000: poss. incr. of sampling int. OR data gap of 2067472.000 seconds (min. dt found= 1.000 s) ! Notice ! 2023 Jun 26 06:48:02.000: poss. incr. of sampling int. OR data gap of 62715.000 seconds (min. dt found= 1.000 s) ! Notice ! 2023 Jun 26 10:29:26.000: poss. incr. of sampling int. OR data gap of 885.000 seconds (min. dt found= 1.000 s)
Extract a specific time period with the following command. The start flag '-st' or the end flag '-e' can be used independantly. Times are formatted as 'YYYY_MM_DD:hh:mm:ss',
teqc -st [START_TIME] -e [END_TIME] +nav [OUTPUT].YYn [INPUT] > [OUTPUT].YYo
e.g
teqc -st 2023_05_28:00:00:00 -e 2023_05_28:23:59:59 +nav SIENA_148.23n SIENA_9488_0523_061721.23o > SIENA_148.23o
Converting raw Trimble data (*.T00) to Trimble DAT format
- Check you have runpkr00 installed (http://facility.unavco.org/software/download_transfer/trimble/trimble.html)
- 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
- 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.
- Check which Julian day your GPS observations were collected on.
- 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
- If you have several sequential RINEX files for the same site, they can be joined together using teqc:
- teqc <rinex_file_1> <rinex_file_2> ... > <joint_rinex_file>
- More info/instructions at http://facility.unavco.org/software/teqc/tutorial.html#teqc_splice
Converting and concatenating compact Rinex data
If the Rinex data is in Compact Rinex format (e.g. xxx.10D) then it needs to be converted to Rinex using the CRX2RNX tool, using the command:
CRX2RNX filename
If you have many files (for instance data that is organised in hourly files) then you can concatenate them into a single file using teqc. The filenames to be concatenated should be listed in time order.
teqc file1 file2 file3 ... filen > file_all
Attachments (1)
-
trmdatefinder.py
(2.0 KB) -
added by benj 15 years ago.
Python script to extract the date from a Trimble raw GPS filename
Download all attachments as: .zip