Quasi-zenith satellite Michibiki's positioning library CLASLIB (Part 2 ssr2osr)

category: gnss
tags: clas qzss

State Space Representation (SSR)

This is a continuation of the previous understanding of the CLASLIB configuration. This time, I will try ssr2osr of CLASLIB.

SSR is a state space representation. This is a method to improve the positioning accuracy by expressing the state related to satellite positioning more accurately, for example, the satellite internal clock error. This precision point positioning (PPP) is classified in this SSR.

On the other hand, OSR is an observation space representation, which is a method to improve the positioning accuracy on the user side by obtaining the correction value for the observation data at another reliable observatory. .. The former DGPS (differential GPS) and the RTK (realtime kinematic), which has been expected in recent years, are classified into this OSR.

There is ssr2osr (SSR-to-OSR conversion) as a program that realizes SSR. ssr2osr in CLASLIB is software used on the user side, and converts the user’s observation data into OSR by SSR correction of the CLAS signal. Positioning calculation is performed by another software using the OSR. As shown on page 11 of Slide of Dr. Martin Schmitz of Geo ++, ssr2osr can be executed by the user even if it is executed on the correction information creation side. We can do it on your side. Ultimately, it is desirable for the user to interpret this SSR directly without running ssr2osr. I think rnx2rtkp in CLASLIB is a direct interpretation of this SSR.

Execution of CLASLIB ssr2osr using own observation data

Here, ssr2osr realized by CLASLIB is used.

First, Download CLASLIB and execute make in the ssr2osr directory under the utils directory. Run to create the application program ssr2osr. The following work is done in this ssr2osr directory. I used the Debian 10 (buster) distribution of Linux.

Next, prepare the satellite signal observation pseudo-distance (OBS: observation) data file and the satellite orbit (NAV: navigation) data file, which are RINEX files. You may obtain these from the Electronic Reference Point Data Providing Service of the Geographical Survey Institute, but this time I used the data of my RTK reference station. Obtain the RTCM3 file of this RTK reference station from NTRIP Caster via the Internet and convert the RTCM3 file to a RINEX file. Use RTKLIB for this data acquisition and conversion.

Download and unzip the RTKLIB source code and run make in that app directory to create the command line tool str2str. If you copy this str2str to this ssr2osr directory and execute the following, a file representing the date and time code will be created in the current directory.

./str2str \
  -in ntrip://ntrip.phys.info.hiroshima-cu.ac.jp:80/F9P \
  -out file://%Y%m%d%H.rtcm3::S=1 -f 30

The extension is rtcm3. This time code represents the time from 0:00 to 23:00 in alphabetic characters from a to x. The str2str option S = 1 -f 30 creates another file every hour with a margin of 30 seconds before and after. Here, the data 20200505d.rtcm3 (about 3.8 MB) from 3:00 to 4:00 on May 5, 2020 observed by the RTK reference station is used. The time representation here is UTC (World Standard Time), which is 9 hours behind JST (Japan Standard Time). Therefore, this data is from 12:00 to 13:00 in JST.

Next, create an OBS file and a NAV file from this RTCM3 file. This conversion also uses convbin in RTKLIB.

./convbin 20200505d.rtcm3 -v 3.02 -os -o 20200505d.obs -n 20200505d.nav

The option -v 3.02 outputs in RINEX file version 3.02 format (otherwise it will be in version 2.11 format), and -os is the signal-to-noise ratio (SNR: signal). -to-noise power ratio) is included in the result. When using CLASLIB, it is necessary to specify this option when creating a RINEX file because it is set not to use satellite signals whose signal strength is below a certain level. The option -o is for specifying the output OBS file name, and -n is for specifying the NAV file name.

RTKLIB can directory process gzip compressed files, such as 20200505d.obs.gz and 20200505d.nav.gz.

Next, download the CLAS data corresponding to that date and time. In CLAS Archive, select the date and time in UTC and download. The file name in the CLAS archive consists of the year, the number of days since January 1, and the time code (but uppercase letters). This date, May 5, 2020, is the 126th day counting from January 1, so its file name is 2020126D.l6. Instead of selecting the date from the archive page and clicking the file name to get the file, you can get the file with the cURL command.

curl https://sys.qzss.go.jp/archives/l6/2020/2020126D.l6 -o 2020126D.l6

Then, prepare the following ssr2obs configuration file osr.conf.

The changes from the original sample setting file are (1) not specifying the receiving antenna format, (2) setting to 2 frequencies (L1 band and L2 band) according to the receiving frequency band of this RTK reference station, (3 ) The output file is displayed in the latitude longitude ellipse height (LLH) format instead of the NMEA format, and the results are displayed in an easy-to-understand manner.

Then run ssr2osr.

./ssr2osr -k osr.conf 20200505d.obs 20200505d.nav 2020126D.l6 -o 20200505d.llh


The contents of the created output file 20200505d.llh are as follows. There is a lot of information in this file, so I will only extract the first part.

% program   : RTKLIB ver.2.4.2
% inp file  : 20200505d.obs
% inp file  : 20200505d.nav
% inp file  : 2020126D.l6
% obs start : 2020/05/05 02:59:12.0 UTC (week2104 183570.0s)
% obs end   : 2020/05/05 04:00:11.0 UTC (week2104 187229.0s)
% pos mode  : ssr2osr
% solution  : forward
% elev mask : 15.0 deg
% dynamics  : off
% tidecorr  : on
% tropo opt : off
% ephemeris : broadcast+ssr apc
% navi sys  : gps galileo qzss
% antenna1  :                       ( 0.0000  0.0000  0.0000)
% (lat/lon/height=WGS84/ellipsoidal,Q=1:fix,2:float,3:sbas,4:dgps,5:single,6:ppp
,ns=# of satellites)
%  UTC                   latitude(deg) longitude(deg)  height(m)   Q  ns   sdn(m
)   sde(m)   sdu(m)  sdne(m)  sdeu(m)  sdun(m) age(s)  ratio
2020/05/05 02:59:12.000   34.440129246  132.414755496   233.7646   5   9   4.776
4   3.5026   7.3992  -1.7312  -3.5717   3.4371 10000.00    0.0
2020/05/05 02:59:13.000   34.440130299  132.414757135   233.3983   5   9   4.775
8   3.5023   7.3982  -1.7303  -3.5711   3.4354 10000.00    0.0
... snip ...

This result shows UTC time, latitude, longitude, ellipsoidal height, and quality (5 is PPP for single positioning) from the first column. I am not sure why the quality indication is not 6 (updated on 2022-04-01).

The 14th column, age (s), describes the number of seconds that have elapsed since the augmentation data arrived. CLAS augmentation information is sent every 5 seconds, so if the value in column 14 of this result is in the range 0, 1, 2, … 5, then continuous PPP positioning by CLAS was performed. It will be. If the value in this column is the maximum value of 1000, it means that CLAS has not augmentataed positioning. Use awk to extract only the time, latitude, longitude, ellipsoidal height, and elapsed seconds from this result.

awk '{print $2 "\t" $3 "\t" $4 "\t" $5 "\t" $14;}' 20200505d.llh

This CLAS information file 2020126D.l6 is from UTC time 03:00:00 to 04:00:00. If it is augmented in this time range, it can be said that CLAS-PPP positioning has been completed.

UTC     latitude(deg)   longitude(deg)  height(m)       age(s)
02:59:12.000    34.440129246    132.414755496   233.7646        10000.00
02:59:13.000    34.440130299    132.414757135   233.3983        10000.00
... snip ...
02:59:57.000    34.440126204    132.414755699   235.2483        10000.00
02:59:58.000    34.440127141    132.414755420   235.3133        1.00
02:59:59.000    34.440128971    132.414755250   235.2460        2.00
03:00:00.000    34.440131533    132.414754938   235.1163        3.00
03:00:01.000    34.440133495    132.414752663   235.4649        4.00
03:00:02.000    34.440134454    132.414753118   235.1127        5.00
03:00:03.000    34.440133393    132.414753927   234.9894        1.00
03:00:04.000    34.440134986    132.414753337   234.8666        2.00
03:00:05.000    34.440134555    132.414752899   234.7548        3.00
... snip ...
03:59:31.000    34.440113440    132.414782134   234.0389        4.00
03:59:32.000    34.440113328    132.414782015   234.2112        0.00
03:59:33.000    34.440113661    132.414782142   234.2457        1.00
03:59:34.000    34.440115799    132.414783428   234.1545        2.00
03:59:35.000    34.440116548    132.414784360   234.0657        3.00
03:59:36.000    34.440115588    132.414785932   234.2324        4.00
03:59:37.000    34.440114654    132.414787330   234.3477        0.00
03:59:38.000    34.440112902    132.414788481   234.3745        1.00
03:59:39.000    34.440112801    132.414785697   234.0207        2.00
03:59:40.000    34.440112910    132.414783535   233.6221        3.00
03:59:41.000    34.440113235    132.414783618   233.7450        4.00
03:59:42.000    34.440112895    132.414782548   234.0283        5.00
03:59:43.000    34.440112306    132.414782202   233.9166        6.00
03:59:44.000    34.440111882    132.414781813   233.8585        7.00
03:59:45.000    34.440110743    132.414781648   233.8334        8.00
03:59:46.000    34.440112951    132.414781696   233.9538        9.00
03:59:47.000    34.440111518    132.414779590   233.8481        10.00
03:59:48.000    34.440110554    132.414779131   233.9800        11.00
03:59:49.000    34.440110254    132.414777619   234.0704        12.00
03:59:50.000    34.440113086    132.414777736   233.5080        13.00
... snip ...

The results show that the augmentation signal is not used at the end of the augmentation at 02:59:58, which is 2 seconds earlier than expected, and at 03:59:37, which is 24 seconds earlier than expected. After UTC time 03:59:37, it means that the augmentation information at that time continues to be used.

A difference of 1 degree in longitude corresponds to about 111 kilometers. The result of processing the data of the stationary RTK reference station is fixed to the 5th digit after the decimal point of latitude, so it can be estimated to have an accuracy of several tens of centimeters. This result is not very good, but it may be because this CLAS positioning method is PPP instead of PPP-RTK.

I made these steps into a shell script. Save the following in the ssr2osr directory with a name such as clas.sh and add the execution attribute (chmod 755 ./clas.sh). Also, put the RTKLIB convbin in this directory. Running this clas.sh should give you the above result.

# configuration file download
curl -s https://gist.githubusercontent.com/yoronneko/430ad5519e0d30a503eb643b349b8796/raw/4e5b7a0cbb1c703046e9ca97bd210c2bcb92b105/osr.conf -o osr.conf
# RTCM3 file download
curl -s https://s-taka.org/img/$GNSSF.rtcm3 -o $GNSSF.rtcm3
# CLAS augmentation file download
curl -s https://sys.qzss.go.jp/archives/l6/2020/$CLASF.l6 -o $CLASF.l6
# extraction of the observation and navigation files from the RTCM file
./convbin $GNSSF.rtcm3 -v 3.02 -os -o $GNSSF.obs -n $GNSSF.nav
# execution of CLAS PPP positioning
./ssr2osr -k osr.conf $GNSSF.obs $GNSSF.nav $CLASF.l6 -o $GNSSF.llh
awk '{print $2 "\t" $3 "\t" $4 "\t" $5 "\t" $14;}' $GNSSF.llh

Next time, I will report RTK positioning by VRS (virtual reference station) using CLASLIB.

Related article(s):