Index of /igscb/software/rnxcmp/

advertisement
Index of /igscb/software/rnxcmp/docs/
Name
Last modified
Size
Parent Directory
06-Jan-98 13:40
-
crinex.txt
12-Jan-98 17:18
26K
test2010.95d
06-Jan-98 13:40
2K
test2010.95o
06-Jan-98 13:40
4K
tskb0320.96d.Z
06-Jan-98 13:40
208K
tskb0320.96o.Z
06-Jan-98 13:40
555K
Description
**********************************************************************
*
RNX2CRX/CRX2RNX
*
*
RINEX file compression programs.
*
*
(Ver.2.2beta)
*
*
*
*
1998/01/03
*
*
*
*
Yuki Hatanaka,
*
*
Geographical Survey Institute
*
*
Kitasato-1, Tsukuba, Ibaraki, 305 Japan
*
*
e-mail: hata@geos.gsi-mc.go.jp
*
**********************************************************************
==== Contents of the directory ====
docs/
source/
the document of Compact RINEX format(crinex.txt)
and sample files.
C source code of the programs (common for UNIX, DOS, and
VMS)
unix/
bin/
shell/
binary of the programs for several OS
front-end tools for multiple file handling (C-shell
scripts)
dos/
exe_win95/ DOS-exe files of the programs compiled under Windows95
batch/
front-end tools for multiple file handling (batch scripts
and a small C program)
vms/
com/
front-end tools for multiple file handling (VMS command
files)
==== What are these programs? ====
RNX2CRX is a program to compress RINEX ver.2 observation files into Compact
RINEX format. CRX2RNX is the uncompression program to retrieve original RINEX
files from Compact RINEX files. (See crinex.doc for details of the Compact
RINEX format.)
Since Compact RINEX is ASCII text format, the high compression rate is
achieved
by combining the Compact RINEX file generation with an additional standard
data compression program such as UNIX "compress" command.
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* For convenience, front-end tools RNX2CRZ(.bat) and CRZ2CRX(.bat) are also
*
* provided to do these two steps by one command. We recommend to use these
*
* tools for the compression/decompression of all RINEX files (i.e., for
*
* navigation message files and met files, too): They will automatically
*
* skip the Compact RINEX step for non-observation files (see below).
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
==== How to compile the programs? ====
The source code is written in ANSI C language.
compiler is necessary.
(1)
An ANSI C or GNU C
Change the line of system selection in the source code to
your system as follows.
[on UNIX system]
/*** Choose the system by defining one of UNIX/DOS/VMS. ***/
#define UNIX
[on DOS system]
/*** Choose the system by defining one of UNIX/DOS/VMS. ***/
#define DOS
[on VMS system]
/*** Choose the system by defining one of UNIX/DOS/VMS. ***/
#define VMS
(2) compile the source by using ANSI C compiler or GNU cc with -ansi
option. See following examples:
[using GNU C on SunOS4.1.3, SunSolaris5.5, or Linux]
gcc -ansi -O2 -static rnx2crx.c -o RNX2CRX
gcc -ansi -O2 -static crx2rnx.c -o CRX2RNX
#
#
#
#
#
I observed compiling errors on SunOS4.1.3 even using gcc.
This is because the function "sprintf" in the library of OS is not
a standard one. If you are faced with the same situation,
uncomment the following line in the source code.
/*** #define SUN41 ***/
[using SUN C compiler on SunSolaris5.5]
cc -xO2 -Bstatic rnx2crx.c -o RNX2CRX
cc -xO2 -Bstatic crx2rnx.c -o CRX2RNX
[on HP-UX A.09.05, HP-UX 10.1]
cc -Aa -O -o RNX2CRX rnx2crx.c
cc -Aa -O -o CRX2RNX crx2rnx.c
[compiler option for QuickC for Windows ver 1.0 on DOS]
Program Type : DOS EXE
Memory Model : Medium
C Language
: ANSI Compatible
Optimization : ON
Stack size
: 10096
[on VMS]
cc RNX2CRX
link RNX2CRX
RNX2CRX == "$ yourdisk:[yourdir]RNX2CRX"
cc CRX2RNX
link CRX2RNX
CRX2RNX == "$ yourdisk:[yourdir]CRX2RNX"
==== How to use the programs? ====
The usage of the program RNX2CRX is as follows.
[UNIX][DOS]
RNX2CRX [file] [-] [-f] [-h]
stdin and stdout are used if input file name is not given
- : output to stdout
-f : force overwrite of output file
-h : display help message
RNX2CRX [input file] - > [output file]
[VMS]
RNX2CRX [input file] -o [output file]
The default file name of the CompactRINEX file is "????????.??d".
If the input RINEX file name is given with ????????.??o and option '-'
is not specified, then the default file name is chosen for the output file.
The usage of CRX2RNX is similar to RNX2CRX.
==== Features of the programs ====
The current version of RNX2CRX takes only 3rd order differences for
compression, but CRX2RNX can deal with differential data of up to 5th
order,
and the differential order can be different for different data arcs.
When RNX2CRX detects the following situation, the program stops with
an error code when using the default check level, if:
- the same satellite appears twice at the same epoch
- more data types are found than specified in a header line.
- middle part of the file is collapsed.
If check level is set to 0, RNX2CRX skips the epoch and tries to find
next epoch to continue conversion.
If the differential phase or pseudorange data becomes larger than 100000
(for example, because of cycle slip), RNX2CRX initializes the arc of the
data type.
IF RNX2CRX and CRX2RNX detect a truncation of the file or other strange
things, the programs stop with an error message.
The programs can process DOS (or partly-DOS) files on UNIX, and vice versa.
Some old RINEX files apply the format (12(A1,I2)) for continuation line
of satellite list instead of (32X,12(A1,I2)). In the default check level,
RNX2CRX detects it by judging if the 3rd column of the continuation line is
a space or not, and reads and converts it correctly. In this case, the
continuation line is corrected to the right format after uncompressing by
CRX2RNX.
In some old RINEX files, the format of the receiver clock offset is shifted
by one column (F11.9 seems to be used instead of F12.9). In the default
check level, RNX2CRX detects it by looking at the position of the decimal
point, and tries to read and convert it correctly. In this case, the
clock format is corrected to the right format after uncompressing by
CRX2RNX.
Those errors or warning cases can be judged by the exit codes.
The exit codes depend on the system, and you can see it by
printing the help message (execute them with the -h option).
==== Front-End Tools ====
The front-end tools RNX2CRZ and CRZ2RNX can be used together with the
programs.
- to allow multiple file processing with wildcard notation
- to directly generate z-compressed files from ASCII RINEX observation
files(RNX2CRZ):
RINEX obs
????????.??o
????????.??O
%%%%%%%%.%%O
-->
CRINEX
--> z-compressed CRINEX
--> ????????.??d -->
--> ????????.??D -->
--> %%%%%%%%.%%D -->
- and vice versa (CRZ2RNX)
????????.??d.Z
????????.??E
%%%%%%%%.%%D_Z
(UNIX)
(DOS)
(VMS)
- to generate z-compressed CompactRINEX files from old z-compressed
RINEX
observation files (RNX2CRZ):
z-compressed RINEX obs -->
????????.??o.Z
????????.??Y
%%%%%%%%.%%O_Z
CRINEX
--> z-compressed CRINEX
--> ????????.??d -->
--> ????????.??D -->
--> %%%%%%%%.%%D -->
????????.??d.Z
????????.??E
%%%%%%%%.%%D_Z
(UNIX)
(DOS)
(VMS)
- to z-compress CompactRINEX files (RNX2CRZ):
CRINEX
-->
????????.??d
????????.??D
%%%%%%%%.%%D
-->
-->
-->
z-compressed CRINEX
????????.??d.Z
????????.??E
%%%%%%%%.%%D_Z
(UNIX)
(DOS)
(VMS)
- to z-compress RINEX navigation files (RNX2CRZ):
RINEX nav
--> z-compressed RINEX nav
????????.??n
????????.??N
%%%%%%%%.%%N
-->
-->
-->
????????.??n.Z
????????.??X
%%%%%%%%.%%N_Z
(UNIX)
(DOS)
(VMS)
- to z-compress RINEX meteorological files (RNX2CRZ):
RINEX met
--> z-compressed RINEX met
????????.??m
????????.??M
%%%%%%%%.%%M
-->
-->
-->
????????.??m.Z
????????.??W
%%%%%%%%.%%M_Z
(UNIX)
(DOS)
(VMS)
- and vice versa (CRZ2RNX)
- to decompress old z-compressed RINEX observation files (CRZ2RNX):
????????.??o.Z
????????.??Y
%%%%%%%%.%%O_Z
-->
-->
-->
????????.??o
????????.??O
%%%%%%%%.%%O
(UNIX)
(DOS)
(VMS)
- to convert CompactRINEX files to RINEX observation files (CRZ2RNX):
????????.??d
????????.??D
%%%%%%%%.%%D
-->
-->
-->
????????.??o
????????.??O
%%%%%%%%.%%O
(UNIX)
(DOS)
(VMS)
The filenames must follow the RINEX file naming conventions.
[UNIX][DOS]
RNX2CRZ *.*
CRZ2RNX *.*
(RINEX OBS/NAV, CRINEX, or compressed RINEX OBS)
(CRINEX, compressed CRINEX, or compressed RINEX OBS/NAV)
Remarks for [DOS] version:
1) compress.exe, compr.bat, decompr,bat are necessary to use the DOS
front-end tools. Those can be obtained from IGS Central bureau
Information System:
ftp://igscb.jpl.nasa.gov/igscb/software/compress/dos.
2) A small C-program splname.c is also necessary to handle the file
name in the front-end tools. The source code and EXE files are
supplied in the ./dos/batch/ directory.
3) The filename extentions for the compressed CRINEX obs files: ??E
those for the compressed RINEX nav files:
??X
those for the compressed RINEX met files:
??W
[VMS]
RNX2CRZ [-k] [file_in]
[-h]
CRZ2RNX [-k] [file_in]
[-h]
[file_in] : File(s) to be (de-)compressed
(Wildcards allowed)
k : Keep intermediate file
h : This information
1) Define symbols to call the command files, e.g.:
RNX2CRZ == "@yourdisk:[yourdir]RNX2CRZ"
CRZ2RNX == "@yourdisk:[yourdir]CRZ2RNX"
2) compress.exe, decompress.exe (or other z-compress programs)
are necessary to use the VMS front-end tools. Those can be
obtained from IGS Central bureau Information System:
ftp://igscb.jpl.nasa.gov/igscb/software/compress/vms.
See also the file README.VMS.
==== Idea for future development ====
The Compact RINEX format allows to initialize the data arc at arbitrary
epoch. Adding a function to initialize all data arcs periodically might
make it possible to recover the data after the initialization in the
case the Compact RINEX file is corrupted somewhere in the middle.
The current version applies only 3rd order difference, since the 3rd order
difference is empirically optimum on the average, but higher or lower
orders might be optimum for some of the data arc.
It would be possible to improve the compression rate somehow. if the
program could search the optimum order for each data arc. The Compact
RINEX format allows the arbitrary order of differences up to 9.
==== Acknowledgements ====
I would like to thank Werner Gurtner of the Astronomical Institute,
University of Bern for checking the compilation on the VMS VAX and Alpha
systems. He is the author of the batch scripts for the VMS version.
Yuki Hatanaka/ Geographical Survey Institute
e-mail hata@gsi-mc.go.jp
Download