Quasi-zenith satellite CLAS augmentation information extraction using Allystar HD9310 Option C

category: gnss
tags: clas hd9310 madoca

Allystar HD9310 Option C can receive either CLAS or MADOCA information for the augmentation signal transmitted by Michibiki. Using this, I confirmed the subtype 12 message, which is the new CLAS information broadcasting from QZS3 (Quasi-Zenith Satellite 3) satellite.

Allystar HD9310 Option C outputs CLAS information received from QZS 1, 2, 3, and 4 satellites to the serial port. CLAS information including the new subtype 12 is currently being broadcast experimentally only from QZS 3 satellite, so only the PRN (pseudo random noise, number for identifying satellites) 199 of QZS3 can be used in the Python program. I created a program to extract the augmentation information.

#!/usr/bin/python3
# ref: https://www.thecombineforum.com/threads/how-to-use-zed-f9p-as-a-base-station-for-trimble.331721/

import sys

while True:
    data = sys.stdin.buffer.read(1)
    if (data != b'\xf1'): continue
    data = sys.stdin.buffer.read(1)
    if (data != b'\xd9'): continue
    data = sys.stdin.buffer.read(1)
    if (data != b'\x02'): continue
    data = sys.stdin.buffer.read(1)
    if (data != b'\x10'): continue
    len_palyload  = sys.stdin.buffer.read(2)
    svn           = sys.stdin.buffer.read(2)
    freqid        = sys.stdin.buffer.read(1)
    len_data      = sys.stdin.buffer.read(1)
    i_len_data    = int.from_bytes (len_data, byteorder='little') - 2
    gps_week      = sys.stdin.buffer.read(2)
    gps_time      = sys.stdin.buffer.read(4)
    snr           = sys.stdin.buffer.read(1)
    flag          = sys.stdin.buffer.read(1)
    data          = sys.stdin.buffer.read(i_len_data * 4)
    checksum      = sys.stdin.buffer.read(2)
    i_svn         = int.from_bytes (svn,      byteorder='little')
    i_gps_week    = int.from_bytes (gps_week, byteorder='big')
    i_gps_time    = int.from_bytes (gps_time, byteorder='big') // 1000
    i_snr         = int.from_bytes (snr,      byteorder='big')
    print ("prn={} GPSW={} GPST={} SNR={}".format(i_svn-700, i_gps_week, i_gps_time, i_snr), file=sys.stderr)
    if (i_svn-700 == 199): sys.stdout.buffer.write(data)
    sys.stdout.flush()

When the fixed word 0xf1 0xd9 0x02 0x10 is found, this program decodes the information according to the specifications of HD9310 and extracts the payload of CLAS augmentation information of PRN 199. Saving this file as, for example, hd9310.py and connecting the HD9310 to the USB port of the microcomputer Raspberry Pi (the recognized port is /dev/ttyUSB3), we can obtain the augmentation information by typing socat /dev/ttyUSB3,b115200, raw - | ./hd9310.py > 20200923a.l6. The PRN number and signal strength of QZS signals received in near real time are displayed, and at the same time, the CLAS augmentation information of QZS 3 is saved in the file 20200923a.l6.

# socat /dev/ttyUSB3,b115200,raw - | ./hd9310.py > 20200923a.l6
...
prn=193 GPSW=2124 GPST=262821 SNR=0
prn=194 GPSW=2124 GPST=262822 SNR=37
prn=195 GPSW=2124 GPST=262822 SNR=43
prn=199 GPSW=2124 GPST=262822 SNR=42
prn=193 GPSW=2124 GPST=262822 SNR=0
prn=194 GPSW=2124 GPST=262823 SNR=37
prn=195 GPSW=2124 GPST=262823 SNR=43
prn=199 GPSW=2124 GPST=262823 SNR=42
prn=193 GPSW=2124 GPST=262823 SNR=0
prn=194 GPSW=2124 GPST=262824 SNR=37
prn=195 GPSW=2124 GPST=262824 SNR=43
prn=199 GPSW=2124 GPST=262824 SNR=41
prn=193 GPSW=2124 GPST=262824 SNR=0
prn=194 GPSW=2124 GPST=262825 SNR=37
prn=195 GPSW=2124 GPST=262825 SNR=43
prn=199 GPSW=2124 GPST=262825 SNR=42
prn=193 GPSW=2124 GPST=262825 SNR=0
prn=194 GPSW=2124 GPST=262826 SNR=37
prn=195 GPSW=2124 GPST=262826 SNR=43
prn=199 GPSW=2124 GPST=262826 SNR=41
...

GPSW represents the week number of GPS (Global Positioning System), the number of weeks from 0:00 to Coordinated Universal Time (UTC) on January 6, 1980, and `` GPST Represents GPS time, which is the number of seconds from January 1st of the year to that time, not including leap seconds.

The L6 file generated in this way was dumped using the dump option of the CLASLIB ssr2obs command.

$ ./ssr2obs -k obs.conf -dump 20200923a.l6
$ ls parse_cssr_type*
parse_cssr_type1.csv        parse_cssr_type2.csv  parse_cssr_type6.csv
parse_cssr_type11.csv       parse_cssr_type3.csv  parse_cssr_type7.csv
parse_cssr_type12_grid.csv  parse_cssr_type4.csv  parse_cssr_type8.csv
parse_cssr_type12_stec.csv  parse_cssr_type5.csv  parse_cssr_type9.csv
$

Please refer to the article Using the Quasi-Zenith Satellite Michibiki Positioning Library CLASLIB (Part 3 VRS-RTK Positioning by ssr2obs for the configuration file obs.conf and the compilation of ssr2obs.

The contents of the file parse_cssr_type12_grid.csv was as follows:

Message Number,Message Sub Type ID,GNSS Epoch Time 1s,SSR Update Interval,Multiple Message Indicator,IOD SSR,Compact Network ID,Network SV Mask,No. of Grids,[Grid Number],Troposphere Hydro-Static Vertical Delay,Troposphere Wet Vertical Delay,[GNSS ID],[Satellite Number],STEC Residual Correction[TECU]
4073, 12, 259170, 5, 0, 8, 12, 0x1f7eb, 2, 1, 2.560, 0.264, 0, 3, 33.2300
,,,,,,,,,,,, 0, 4, 31.0300
,,,,,,,,,,,, 0, 9, 37.1700
,,,,,,,,,,,, 0, 17, 20.9600
,,,,,,,,,,,, 0, 19, 18.6000
,,,,,,,,,,,, 0, 28, 19.4600
,,,,,,,,,,,, 2, 4, 19.8400
,,,,,,,,,,,, 2, 11, 16.6600
,,,,,,,,,,,, 2, 12, 9.8300
,,,,,,,,,,,, 2, 19, 16.2700
,,,,,,,,,,,, 2, 24, 76.1100
,,,,,,,,,,,, 2, 33, 13.8900
,,,,,,,,,,,, 4, 195, 19.9400
,,,,,,,,,,,, 4, 199, 8.3500
,,,,,,,,, 2, 2.556, 0.260, 0, 3, 33.0700
,,,,,,,,,,,, 0, 4, 31.2700
,,,,,,,,,,,, 0, 9, 37.2900
,,,,,,,,,,,, 0, 17, 20.3600
,,,,,,,,,,,, 0, 19, 18.2400
,,,,,,,,,,,, 0, 28, 18.7400
,,,,,,,,,,,, 2, 4, 19.3200
,,,,,,,,,,,, 2, 11, 15.9400
,,,,,,,,,,,, 2, 12, 9.6300
,,,,,,,,,,,, 2, 19, 16.0700
,,,,,,,,,,,, 2, 24, 76.2300
,,,,,,,,,,,, 2, 33, 13.8100
,,,,,,,,,,,, 4, 195, 19.8600
,,,,,,,,,,,, 4, 199, 7.9100
4073, 12, 259170, 5, 0, 8, 2, 0x1b5f7, 11, 1, 2.656, 0.272, 0, 3, 22.4400
,,,,,,,,,,,, 0, 4, 21.8000
,,,,,,,,,,,, 0, 17, 8.2500
,,,,,,,,,,,, 0, 19, 5.5400
...

Part of the subtype 12 message could be decoded.


Related article(s):