0% found this document useful (0 votes)
31 views14 pages

PyRINEX Manuel

Uploaded by

andenet
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views14 pages

PyRINEX Manuel

Uploaded by

andenet
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

Install

Figure 1 GitHub repository


The GitHub repository link is https://github.com/geumjin99/PyRINEX,
you can download it or just clone it. The Test folder contains examples
used in the paper.

Figure 2 How to install


If you are downloading, clock CMD in the downloaded path and enter
the command phrase as shown in Figure 2.
Please note that you may need to install the latest version of Visual
Studio Build Tools. make sure that the "Desktop development with C++"
workload is selected during installation, as some of the dependencies in
Pandas may require a C++ compiler.
The PyRINEX software project (hereinafter referred to as the
"Project") is released under the Apache Software License 2.0
(hereinafter referred to as the "License"). Anyone using this Project
must comply with the terms of this License.
(If you want to quickly use PyRINEX for your research, you can
skip these chapters and go straight to the last chapter, where we
illustrate the practical use of PyRINEX with the provided test data as
an example.)

How to use PyRINEX

PyRINEX and other Python libraries such as matplotlib in the use of the
method is not very different, import PyRINEX in IDE, and call the
functions.

Figure 3 Example of how to use PyRINEX

Figure 3 shows how PyRINEX is used. After importing PyRINEX's


various modules, it can be easily called to realize its various functions.
In the next few sections we will specify the usage of the functions in
each module and the form of their output results.

Reader
Table 1 Functions in Reader module

Functions Parameter
oheader(opath) observation file path
observations(opath) observation file path
navigaions(opath) navigation file path

Functions that can read RINEX data are provided in the Reader module,
and they can read RINEX observation files and navigation files. They both
require the path to the RINEX data to be entered as an argument and return
a new json formatted data called LITE RINEX.
Figure 4 Output of the oheader function (If you wish to print that result in the IDE for
review, use a statement like print(json.loads("your0010.23o")).)

Figure 4 shows the output of the oheader function. This contains some of
the most important information in the header section in both categories, such as the
version of the RINEX file, information about the type of observation recorded, etc. The
second type of information is the marker name, receiver type, etc. The most important
feature of this type of information is that it can be edited according to the user's needs,
and it can be seen that this type of information is stored in a list, which is because the
number of rows where these information are located is not fixed, so the line number is
stored in the first item of the list for the purpose of modifying the information later on
in the original file.

Figure 5 Output of the observations function


As shown in figure 5, the same logic applies to the translation of the logged portion
of the observations. PyRINEX provides the ability to translate RINEX observations
and GPS navigation files into LITE RINEX format. This is extremely helpful for a
number of studies that aim to process GNSS observation data.
Figure 6 Output of the navigations function
Figure 6 shows the output of the navigations function, each satellite represented by
a key will correspond to a list as a value, this is because it is possible for a satellite to
be logged multiple times in the navigation file and the list will store them together.

DataManagement

Figure 7 DataFinding function in DataManagement module


As shown in figure 7, the DataFinding function implements the function of
retrieving and filtering the RINEX data under a certain path. The function is
implemented based on Python's os library, which is used to interact with the operating
A system, including file and directory operations. To use this function the user needs to
enter the specified root directory, a list of keywords to filter its subfolders, and a
extension representing the type of RINEX data file. After that, it will traverse all the
files under the path, and then determine whether it meets the conditions, it is worth
noting that even if the input extension is "08o", some files with "08O" as extension
will still be output in the result list because the RINEX standard format does not
specify the extension case.

Figure 8 DataCleaning function in DataManagement module


As shown in figure 8, in DataCleaning function, you need to input the root path of
the RINEX data that you want to be processed, the path of the ReceiverLibrary and
AntennaLibrary, and the path that you want to output after data cleaning. The basic
logic for PyRINEX to modify the four aforementioned errors is similar.
The DataCleaning function in DataManagement provide automatic errata for LITE
RINEX after reading. It should be noted that for receiver type and antenna type
corrections, the CSV files ReceiverLibrary and AntennaLibrary need to be read first,
and PyRINEX will store the incorrect spelling and correct spelling as keys and values,
respectively, as dictionaries in Python after reading them. After that, PyRINEX will
check if there is a key in dictonray when it reads the corresponding line of the two
contents, and if there is, it will replace it with the corresponding value, so that it can
correct the specific contents in this way. The two CSV files can be freely edited by
the user, which makes the processing of the data more customizable. CSV should like
as shown in figure 9. Note that the line that records the antenna type in the RINEX
data is required to record the radome type, but many RINEX data do not record this
information, and not all programs that process RINEX data are required to read the
radome type, but PyRINEX still modifies lines that do not have the radome
information marked on them. However, PyRINEX will still modify RINEX data that
do not have radome information marked on them by labeling them with "NONE" after
the antenna type.

Figure 9 Example of ReceiverLibrary.csv/AntennaLirary.csv (The two CSV files


available on Github were used in our research, and should be modified if you intend to
apply them to the RINEX dataset you want to work with. In particular, if you need to
work with a RINEX dataset that doesn't have a spelling error in the receiver and antenna
type you should clear the first and third columns of the CSV files. However, the question
mark in the second column must be saved.)
For the protection of raw data, the new RINEX file after data cleaning will be
written to a specified new path, user needs to specify the root path of the output. After
that, PyRINEX will use the mkdir function in the os library to create a new folder with
the corresponding "doy" name and write it to it, and then when there are RINEX data
observed on the same date that are cleansed by the data, they will also be written to
this folder, which can help to organize a large amount of unorganized RINEX data.
The reporter CSV file is shown in figure 10.
Figure 10 Example of reporter CSV file

QualityCheck

Table 2 Functions in QualityCheck module

Functions Discription

plot (filename, title, gps serises, epochs, Plot function for azi_ele(path), ION_MP(opath) and
cycleslip(path)
dataset, type, column, y_label = NONE,

limit = “100”)

SatelliteSignalPlot(path) Output the signal plot

azi_ele(path) Calculate the azimuth and elevation for GPS satellite

ION_MP(opath) Calculate the multipath and ionospheric delay

cycleslip(path) Calculate cycle slip

QualityCheck(path) Perform all quality checks on a given RINEX data

batchQC(rootpath, keywords_list, Performs a quality check on RINEX data under a path, the

extension) principle is the same as the DataFinding function.

The plot function is responsible for visualizing the results of the quality check. It is worth
noting, however, that if the user wishes to make changes to the function then the code for the
parameters should not be changed, as these parameters are not actually entered by the user.

Figure 11 Examples of using the plot function


As shown in Figure 11, this function will be called in the rest of the functions of the
QUALITY CHECK, whose parameters are determined by these functions, such as COLUMN
determines how many columns the satellites should be written in the legend. Please note that in
the plot function there is a default parameter is the upper and lower limits, the default is 100,
this is because a lot of RINEX data quality check results are poor, there may be some "bad
points" so that the final output is not easy to review, if you need to modify the parameter can
be used to change the upper and lower limits of the value and enter what you want.

Figure 12 Examples output of the SatelliteSignalPlot function


In the SatelliteSignalPlot function, a visualization of the satellite models received
by the receiver in each time slot is provided. The function outputs a schematic diagram,
which allows the user to visualize the type of satellites received during each time
period and, more importantly, to know which satellites have had interruptions in the
reception of their signals, which means that it is possible that poor observing
conditions have triggered difficulties in the reception of the signals. Figure 12 shows
schematic output of the SatelliteSignalPlot function.
Figure 13 Examples output of the azi_ele function
When using the azi_ele function, you need to make sure that the RINEX data is internally
logged with GPS satellite data and that the navigation file and the observation file are under
the same path. The output of azi_ele function as shown in figure 13.

Figure 14 Examples output CSV file of the azi_ele function


The CSV file output together with the azi_ele function is shown in Figure 14, with the first
data in each cell representing the azimuth and the second data representing the elevation angle
(It’s all in arcs).
Note that both the CSV file and the charts are generated in the same path as the original
RINEX data, which is the same for all subsequent quality check related functions.
Figure 15 Examples output Numpy array of the ION_MP function
At the same time, the output of this function is written to a list, where each element of the
list is a dictionary as shown in Figure 15.

Figure 16 Examples output Numpy array of the ION_MP function


For the two functions ION_MP and cycleslip, their most important feature is that they will
output a Numpy array in addition to the CSV file and the graph, which can be convenient for
the user to carry out subsequent calculations. The ordering of the output data in the third
dimension of this three-dimensional array is shown in Figure 13 (The output of cycleslip has
an index of 3 in the third dimension.).
The results of MP1 and MP2, as well as ION and IOD, are output to four different plots, but
then written two by two to the same CSV file, where the order of precedence in each cell is the
same as in Figure 14.
The cycleslip function is identical.
Figure 16 Example of output after using the QualityCheck function.
When using the QualityCheck function, it automatically runs all of the above quality check
calculations at once and produces the result file shown in Figure 16 under the same path.
However, if the navigation file does not exist in the same path, PyRINEX will skip the azi_ele
function and only execute other functions.
The operation mechanism of batchQC function is similar to that of DataFinding function,
users only need to input keywords to batch process specific RINEX data under a folder.

Practical use cases of PyRINEX

The data we use as examples in this chapter can be found in the Github repository, and you
can get him whether you rely on gitclone or just download the zip.

Figure 17 PyRINEX_TestData folder


As shown in Figure 17, there are two subfolders under this folder, which contain example
data for DATA CLEANING and QUALITY CHECK, respectively. The subfolder also includes
two folders, test data and results, which contain test data and runtime results, respectively.
Figure 18 Diagram of the structure of the data cleaning test folder
As shown in Figure 18, the structure of the folder for data cleaning tests is the same as the
dataset used in the experimental part of the paper, which we used to demonstrate how to perform
data cleaning.
The goal is to write all the RINEX files in the Gyeong-gi folder under the path of the unified
control points into a clearer path, and at the same time to fix the formatting errors within them.

Figure 19 Example of data cleaning


As shown in Figure 19, we performed data cleaning using the DataCleaning function. We
passed it five parameters in order: the root path where the data is located, a list of keywords,
the ReceiverLibrary.csv file path, the AntennaLibrary.csv file path, and the new folder path.
Please note that if you have opened our AntennaLibrary.csv file you will find that it is empty,
this is because in our test dataset we didn't find any misspellings of the antenna type, so we
have just filled in the antenna radome as 'NONE! This is because we did not find any
misspelling of antenna type in our test dataset, so we just complete the antenna radome to
'NONE', if you want to apply it to your own dataset, please modify AntennaLibrary.csv file.

Figure 20 Example of running results

The result of the run is shown in Figure 20, where the target RINEX data are written under
the corresponding new path, and the reporter is also generated in that path.

Figure 21 Example of reporter (The number "170" in marker is because CSV files can't
write numbers as strings, so "0170" is automatically changed to 170, but this is not the
case with RINEX data.)
As shown in Figure 21, the original and new paths of the RINEX data are recorded in the
reporter, and the information of the old and new RINEX data is compared in detail inside.

Figure 22 Results of formatting corrections


The format within the RINEX data was also corrected as shown in Figure 22. Some non-
English characters have been replaced and the missing antenna radome has been patched.

Next we have a demonstration of QUALITY CHECK.


Figure 23 “for quality check” folder and the data it contains
As shown in Figure 23, the data we provide is exactly the same data used for the
trustworthiness evaluation of the quality check function of PyRINEX used in the paper.

Figure 24 Example of a batch quality check


As shown in Figure 24, we use the batchQC function to perform a quality check, which is
used by entering the root path where the RINEX data that needs to be processed is located, and
the path needs to contain a list of keywords (in this case, an empty list), as well as the suffix
name of the RINEX data that is being processed.
Figure 25 The output of the batcQC run
As shown in Figure 25, the report files corresponding to the quality check results for each
RINEX data after the run were written under the same path, including schematic and CSV files.

You might also like