1
1
**********************************************************************
2
2
* RNX2CRX/CRX2RNX *
3
3
* RINEX file compression programs. *
4
- * for RINEX version 2/3 files *
5
- * (Ver.4.0.8 ) *
4
+ * for RINEX version 2/3/4 files *
5
+ * (Ver.4.1.0 ) *
6
6
* *
7
7
* Yuki Hatanaka, *
8
8
* Geospatial Information Authority of Japan *
9
9
* Kitasato-1, Tsukuba, Ibaraki, 305-0811 Japan *
10
10
11
11
* *
12
- * 2007/06/08 *
13
- * (comment on file naming convention: 2009/06/31) *
14
- * (Update URLs and description of file name conventions: 2019/07/12) *
12
+ * 2007-06-08 *
13
+ * (2009-06-31: comment on file naming convention) *
14
+ * (2019-07-12: Update URLs and description of file name conventions) *
15
+ * (2021-12-22: Handling of RINEX ver. 4 is added) *
15
16
* *
16
17
**********************************************************************
17
18
@@ -25,14 +26,18 @@ From the version 4.0.0, these programs are able to handle not only the
25
26
RINEX format version 2.xx (and the corresponding Compact RINEX format
26
27
version 1.0), but also the RINEX format version 3.xx (and the corresponding
27
28
Compact RINEX format version 3.0):
29
+ From the version 4.1.0, The programs are able to handle RINEX format version 4.xx, too.
28
30
29
31
[compression]
30
32
RINEX format version 2.xx --> (RNX2CRX) --> Compact RINEX format version 1.0
31
33
RINEX format version 3.xx --> (RNX2CRX) --> Compact RINEX format version 3.0
34
+ RINEX format version 4.xx --> (RNX2CRX) --> Compact RINEX format version 3.0
32
35
33
36
[restoration]
34
37
Compact RINEX format version 1.0 --> (CRX2RNX) --> RINEX format version 2.xx
35
- Compact RINEX format version 3.0 --> (CRX2RNX) --> RINEX format version 3.xx
38
+ Compact RINEX format version 3.0 --> (CRX2RNX) --> RINEX format version 3.xx
39
+ or 4.xx according to the
40
+ version of the original RINEX
36
41
37
42
Since Compact RINEX is ASCII text format, the high compression rate is achieved
38
43
by combining the Compact RINEX file generation with an additional standard
@@ -61,21 +66,21 @@ The following is an instruction to install the programs.
61
66
directories are listed, type "echo $PATH" for unix or
62
67
"echo %PATH%" for DOS. Or, you would add new path to those list.
63
68
3. (for UNIX) Set permission of the files to be executed.
69
+ If you need to output .Z file, UNIX 'compress' command have to be
70
+ installed.
64
71
4. (for DOS) To use DOS frontend tools, put following tools into the
65
72
directory which is included in the command serch paths.
66
- 1) compress.exe, compr.bat, decompr.bat
67
- These programs are avairable from, e.g.
68
- ftp://ftp.aiub.unibe.ch/pcrinex/compress.zip
69
- compress.exe in the above works on 16- or 32-bit system.
73
+ To input .gz or .Z files or to output .gz files, 'gzip.exe' must be
74
+ installed and command serch path is appropriately set.
75
+ To output .Z files, "compress.exe" (UNIX compress command) is needed.
76
+ too.
77
+
78
+ 1) compress.exe
70
79
The compress.exe for 64-bit Windows system is available from
71
80
http://www.willus.com/archive/utils.shtml
72
81
--> "Unix-style command archive"
73
82
or
74
83
https://sourceforge.net/projects/unxutils/
75
- 2) SPLNAME.EXE (provided with the package, or, if needed, you may
76
- compile the source code splname.c which is also avairable in
77
- the source package.
78
-
79
84
80
85
==== How to compile the programs? ====
81
86
@@ -92,6 +97,10 @@ The following is an instruction to install the programs.
92
97
# non-standard behaviour of function "sprintf" that was provided in
93
98
# the library of OS. Support for this irregularity was terminated,
94
99
100
+ [using GNU C on MacOSX10.14]
101
+ gcc -ansi -O2 rnx2crx.c -o RNX2CRX
102
+ gcc -ansi -O2 crx2rnx.c -o CRX2RNX
103
+
95
104
[using SUN C compiler on Sun OS 5.9]
96
105
cc -xO2 -Bstatic rnx2crx.c -o RNX2CRX
97
106
cc -xO2 -Bstatic crx2rnx.c -o CRX2RNX
@@ -109,18 +118,26 @@ The following is an instruction to install the programs.
109
118
110
119
The basic usage of the program RNX2CRX is as follows.
111
120
112
- RNX2CRX [file] [-] [-f] [-e # of epochs] [-s] [-h]
121
+ RNX2CRX [file] [-] [-f] [-e # of epochs] [-s] [-d] [- h]
113
122
stdin and stdout are used if input file name is not given.
114
123
- : output to stdout
115
124
-f : force overwrite of output file
116
125
-e # : initialize the compression operation at every # epochs
126
+ When some part of the Compact RINEX file is lost, the data
127
+ can not be recovered thereafter until all the data arc are
128
+ initialized for differential operation. This option may be used to
129
+ increase chances to recover parts of data by using an option of
130
+ CRX2RNX(ver. 4.0 or after) with cost of increase of file size.
117
131
-s : warn and skip strange epochs (default: stop with error status)
132
+ -d : delete the input file if conversion finishes without errors
133
+ (i.e. exit code = 0 or 2).
134
+ This option does nothing if stdin is used for the input.
118
135
-h : display help message
119
136
120
- The default file name of the CompactRINEX file is "*.??d".
121
- If the input RINEX file name follows the file name convention of RINEX
122
- format (*.??o) and option '-' is not specified, then the default file
123
- name is chosen for the output file .
137
+ The default file name of the CompactRINEX file is "*.??d" and "*.crx" .
138
+ If the input RINEX filename follows the filename convention of RINEX
139
+ format (*.??o or *O.rnx ) and option '-' is not specified, then the default
140
+ filename is chosen for the output.
124
141
The followings are the example of usage of RNX2CRX for UNIX environment:
125
142
- If a standard naming convention is adoped;
126
143
RNX2CRX rinex.07o
@@ -175,11 +192,12 @@ The following is an instruction to install the programs.
175
192
If RNX2CRX and CRX2RNX detect a truncation of the file or other strange
176
193
things, the programs stop with an error message.
177
194
178
- The line feed code of the input files can be one of "LF", "CR+LF", or even
179
- mixture of them. "CR" (that is often the case of Mac OS) is not supported
180
- at current. Please convert "CR" into "LF" or "CR+LF" before the processing.
181
- The line feed code of the output file depends on the OS (LF for UNIX,
182
- CR+LF for DOS/Windows).
195
+ The line feed code of the input files can be "LF" or "CR+LF" and may even
196
+ change in the middle of the file. "CR" (that was the case of old MacOS
197
+ until ver.9) is not supported at current. Please convert "CR" into "LF"
198
+ or "CR+LF" before the processing.
199
+ The line feed code of the output file depends on the OS on which the
200
+ program is run (LF on UNIX, CR+LF on DOS/Windows).
183
201
184
202
Some old RINEX (version 2.xx) files assign the format (12(A1,I2)) for
185
203
continuation lines of satellite list instead of (32X,12(A1,I2)). RNX2CRX
@@ -202,91 +220,82 @@ The following is an instruction to install the programs.
202
220
203
221
RINEX obs --> CRINEX --> z-compressed CRINEX
204
222
205
- ????????.??o --> ????????.??d --> ????????.??d.Z (UNIX)
206
- ????????.??O --> ????????.??D --> ????????.??E (DOS)
207
- *O.rnx --> *O.crx --> *O.crx.Z (UNIX)
208
- *o.rnx --> *o.crx --> *o.crx.Z (UNIX)
223
+ ????????.??o --> ????????.??d --> ????????.??d.gz
224
+ ????????.??O --> ????????.??D --> ????????.??D.gz
225
+ *O.rnx --> *O.crx --> *O.crx.gz
226
+ *o.rnx --> *o.crx --> *o.crx.gz
209
227
210
228
- and vice versa (CRZ2RNX)
211
229
212
- - to generate z- compressed CompactRINEX files from old z-compressed RINEX
230
+ - to generate compressed CompactRINEX files from old z-compressed RINEX
213
231
observation files (RNX2CRZ):
214
232
215
- z- compressed RINEX obs --> CRINEX --> z- compressed CRINEX
233
+ compressed RINEX obs --> CRINEX --> compressed CRINEX
216
234
217
- ????????.??o.Z --> ????????.??d --> ????????.??d.Z (UNIX)
218
- ????????.??Y --> ????????.??D --> ????????.??E (DOS)
219
- *o.rnx.Z --> *o.crx --> *o.crx.Z (UNIX)
235
+ ????????.??o.gz --> ????????.??d --> ????????.??d.gz
236
+ ????????.??o.Z --> ????????.??d --> ????????.??d.gz
237
+ *o.rnx.Z --> *o.crx --> *o.crx.gz
220
238
221
- - to z- compress CompactRINEX files (RNX2CRZ):
239
+ - to compress CompactRINEX files (RNX2CRZ):
222
240
223
- CRINEX --> z- compressed CRINEX
241
+ CRINEX --> compressed CRINEX
224
242
225
- ????????.??d --> ????????.??d.Z (UNIX)
226
- ????????.??D --> ????????.??E (DOS)
227
- *o.crx --> *o.crx.Z (UNIX)
243
+ ????????.??d --> ????????.??d.gz
244
+ *o.crx --> *o.crx.gz
228
245
229
246
- to z-compress RINEX NAV/MET/etc. files (RNX2CRZ):
230
247
231
- RINEX nav --> z-compressed RINEX nav
232
-
233
- ????????.??n --> ????????.??n.Z (UNIX)
234
- ????????.??g --> ????????.??g.Z (UNIX)
235
- ????????.??l --> ????????.??l.Z (UNIX)
236
- ????????.??p --> ????????.??p.Z (UNIX)
237
- ????????.??h --> ????????.??h.Z (UNIX)
238
- ????????.??b --> ????????.??b.Z (UNIX)
239
- ????????.??m --> ????????.??m.Z (UNIX)
240
- ????????.??c --> ????????.??c.Z (UNIX)
241
- ????????.??N --> ????????.??X (DOS)
242
- ????????.??G --> ????????.??V (DOS)
243
- ????????.??L --> ????????.??T (DOS)
244
- ????????.??P --> ????????.??Q (DOS)
245
- ????????.??H --> ????????.??U (DOS)
246
- ????????.??B --> ????????.??A (DOS)
247
- ????????.??M --> ????????.??W (DOS)
248
- ????????.??C --> ????????.??K (DOS)
249
- *n.rnx --> *n.rnx.Z (UNIX)
250
- *m.rnx --> *m.rnx.Z (UNIX)
248
+ RINEX --> z-compressed RINEX nav
249
+
250
+ ????????.??n --> ????????.??n.gz
251
+ ????????.??g --> ????????.??g.gz
252
+ ????????.??l --> ????????.??l.gz
253
+ ????????.??p --> ????????.??p.gz
254
+ ????????.??h --> ????????.??h.gz
255
+ ????????.??b --> ????????.??b.gz
256
+ ????????.??m --> ????????.??m.gz
257
+ ????????.??c --> ????????.??c.gz
258
+ *n.rnx --> *n.rnx.gz
259
+ *m.rnx --> *m.rnx.gz
251
260
252
261
- and vice versa (CRZ2RNX)
253
262
254
263
- to decompress old z-compressed RINEX observation files (CRZ2RNX):
255
264
256
- ????????.??o.Z --> ????????.??o (UNIX)
257
- ????????.??Y --> ????????.??O (DOS)
258
- *.rnx.Z --> *.rnx (UNIX)
265
+ ????????.??o.gz --> ????????.??o
266
+ ????????.??o.Z --> ????????.??o
267
+ *.rnx.gz --> *.rnx
268
+ *.rnx.Z --> *.rnx
259
269
260
270
- to convert CompactRINEX files to RINEX observation files (CRZ2RNX):
261
271
262
- ????????.??d --> ????????.??o (UNIX)
263
- ????????.??d.Z --> ????????.??o (UNIX)
264
- ????????.??D --> ????????.??O (DOS)
265
- ????????.??E --> ????????.??O (DOS)
266
- *.crx --> *.rnx (UNIX)
272
+ ????????.??d --> ????????.??o
273
+ ????????.??d.gz --> ????????.??o
274
+ ????????.??d.Z --> ????????.??o
275
+ ????????.??D --> ????????.??O
276
+ *.crx --> *.rnx
267
277
268
278
269
279
Remarks:
270
280
- The extensions of the input files should conform to the RINEX convention
271
281
recommended in the documentation of RINEX. The current and old conventions
272
282
are written in the following references:
273
- International GNSS Service (IGS ), RINEX Working Group and Radio Technical
274
- Commission for Maritime Services Special Committee 104 (RTCM-SC104),
275
- 2013, RINEX The Receiver Independent Exchange Format Version 3.02
276
- Gurtner, W., L. Estey (2006 ), RINEX The Receiver Independent Exchange
277
- Format Version 3.01, avairable from
278
- ftp ://ftp .igs.org/pub/data/format/rinex301.pdf
283
+ Romero I. (ed. ), RINEX The Receiver Independent Exchange Format Version 4.00,
284
+ 1 December 2021;
285
+ https://files.igs.org/pub/data/format/rinex_4.00.pdf
286
+ Gurtner, W., L. Estey (2009 ), RINEX The Receiver Independent Exchange
287
+ Format Version 3.01, 22 June 2009;
288
+ https ://files .igs.org/pub/data/format/rinex301.pdf
279
289
The software accept both of them.
280
- The extentions of the output files alse follow the RINEX convention.
281
- - UNIX versino of the front-end tools has following feature (ver. 4.0.4-)
290
+ - The UNIX version of the front-end tools has following feature (ver. 4.0.4-)
282
291
* help message is shown if executed with option -h or with no argument.
283
292
* The output files are created to the same directory as the
284
293
input file in default. The option "-c" may be used to change
285
294
them to the current directory.
286
295
* The input files are removed if option "-d" is specified,
287
296
otherwise they are preserved.
288
- * The tools inquire if overwrite the an output file if it preexist.
297
+ * The UNIX tools inquire if overwrite the an output file if it preexist.
289
298
The option -f forces overwriting without inquiring
290
- * Both Z-compressed and gzipped files can be processed.
299
+ * Both gzipped and Z-compressed files can be processed.
291
300
292
301
0 commit comments