Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
d123cfd
- update ewss data to align the newest icd.
hirokawa Nov 9, 2025
a1a20b7
- apply simplification.
hirokawa Nov 9, 2025
316373f
- disabled multi-ch in qzss clas.
hirokawa Nov 10, 2025
626d11c
- test for multi-ch.
hirokawa Nov 11, 2025
4e0e183
- update to support multi-channel for QZS CLAS.
hirokawa Nov 15, 2025
cc69ef4
added BDS3 64-ary LDPC H-matrix table.
hirokawa Nov 16, 2025
785e5ec
- fixed rtcm decoder to handle msm.
hirokawa Nov 23, 2025
25e34e4
- added config for ppp.
hirokawa Nov 23, 2025
8ace5d1
- added config for ppp-rtk
hirokawa Nov 23, 2025
69e4df2
- fixed time in example.
hirokawa Nov 23, 2025
baf07b5
- added rtcm ssr decoder.
hirokawa Dec 14, 2025
659eb4d
added LuGRE decoder.
hirokawa Jan 1, 2026
f1c762b
- added mode to use L1C/B instead of L1C/A
hirokawa Jan 3, 2026
d3a88af
- updated to test new edition of MT54 messages.
hirokawa Jan 4, 2026
685f761
- added comment.
hirokawa Jan 4, 2026
bc8c11a
- added sc134 test dataset.
hirokawa Jan 4, 2026
e8fb841
- updated MT54.9 sample.
hirokawa Jan 13, 2026
829900f
- cssr to rtcm ssr converter (expemental)
hirokawa Jan 18, 2026
9e1b504
- revert rtcm decoder.
hirokawa Jan 18, 2026
f4710a7
- cssr2rtcm: code clean-up.
hirokawa Jan 25, 2026
373bb16
- updated test dataset for sc134 messages.
hirokawa Jan 28, 2026
d079672
- update comment.
hirokawa Jan 31, 2026
c8e9669
- update config filename for ppp.
hirokawa Feb 1, 2026
becef27
- updated elvation for ar.
hirokawa Feb 1, 2026
df88705
- load config file in test_ppprtk2
hirokawa Feb 2, 2026
1dfa2ff
- log file name changed.
hirokawa Feb 8, 2026
25936d2
- added sc134 ssr test.
hirokawa Feb 11, 2026
2e049e3
- added reference week.
hirokawa Feb 14, 2026
b0c59d9
- added sc134 ssr test dataset
hirokawa Feb 14, 2026
fe7767f
- fixed file length
hirokawa Feb 14, 2026
5aabbf4
- updated QZS signal from L2C -> L5
hirokawa Feb 15, 2026
488dd91
- sc134 test data updated.
hirokawa Feb 23, 2026
6d381de
- added sc134 testcase.
hirokawa Mar 8, 2026
f37fd38
update link urls.
hirokawa Jul 17, 2026
fd3efd7
feat: add script for downloading and extracting IGS data files via FT…
hirokawa Jul 18, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions data/ewss/jma/tab4_1_2_45.txt
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@
830304004400 神田川(東京都)
830304004700 妙正寺川(東京都)
830304006400 入間川流域(埼玉県)
830304006403 入間川中流部(埼玉県)
830305000100 多摩川(東京都・神奈川県)
830305000500 野川・仙川(東京都)
830305002000 浅川(東京都)
Expand Down
1 change: 1 addition & 0 deletions data/ewss/jma/tab4_1_2_6.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
147 沖合で高い津波を観測したため津波警報を切り替えました。
148 沖合で高い津波を観測したため予想される津波の高さを切り替えました。
149 ただちに避難してください。
150 南海トラフ地震臨時情報を発表しています。
201 強い揺れに警戒してください。
211 津波警報等(大津波警報・津波警報あるいは津波注意報 )を発表中です。
212 この地震により、日本の沿岸では若干の海面変動があるかもしれませんが、被害の心配はありません。
Expand Down
6 changes: 3 additions & 3 deletions data/igs_files.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ antex https://files.igs.org/pub/station/general/igs14.atx
antex https://files.igs.org/pub/station/general/pcv_archive/igs20_2353.atx
antex https://www.gsc-europa.eu/sites/default/files/sites/all/files/has14_2345.atx

antex http://ftp.aiub.unibe.ch/CODE_MGEX/CODE/I20.ATX
antex http://ftp.aiub.unibe.ch/CODE_MGEX/CODE/M20.ATX
antex http://ftp.aiub.unibe.ch/CODE_MGEX/CODE/M14.ATX
antex https://www.aiub.unibe.ch/download/CODE_MGEX/CODE/I20.ATX
antex https://www.aiub.unibe.ch/download/CODE_MGEX/CODE/M20.ATX
antex https://www.aiub.unibe.ch/download/CODE_MGEX/CODE/M14.ATX

brdc ftp://gdc.cddis.eosdis.nasa.gov/pub/gnss/data/daily/2023/brdc/BRDC00IGS_R_20231890000_01D_MN.rnx.gz
brdc ftp://gdc.cddis.eosdis.nasa.gov/pub/gnss/data/daily/2023/brdc/BRDC00IGS_R_20231800000_01D_MN.rnx.gz
Expand Down
50 changes: 50 additions & 0 deletions data/ldpc/H_bds_b1c_sf2.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
11 62 102 150 9 60 100 148 0 51 142 197 22 80 116 154
4 90 131 177 47 95 138 191 51 79 146 195 44 75 142 190
13 57 135 198 24 65 120 173 6 88 129 179 7 89 130 176
6 58 106 158 8 60 108 160 44 92 139 188 4 56 104 156
10 61 101 149 39 87 123 168 15 67 105 167 50 78 145 194
17 98 151 187 46 94 137 190 14 66 104 166 7 59 107 159
21 83 119 153 31 87 114 167 2 49 140 199 12 64 106 164
40 53 132 159 19 96 149 185 16 68 112 168 14 58 132 199
34 69 125 162 23 75 119 175 42 96 144 192 8 63 103 151
23 81 117 155 24 93 111 182 20 72 116 172 17 69 113 169
34 82 130 182 1 53 101 153 46 73 140 188 13 65 107 165
2 54 102 154 18 70 114 170 26 67 122 175 29 77 125 177
36 84 120 169 25 94 108 183 39 89 137 185 21 73 117 173
28 76 124 176 36 90 138 186 33 68 124 161 12 56 134 197
29 85 112 165 45 93 136 189 27 64 123 172 28 84 115 164
25 66 121 174 37 85 121 170 3 50 141 196 48 76 147 192
35 70 126 163 32 80 128 180 0 52 100 152 43 52 135 158
35 83 131 183 10 62 110 162 19 71 115 171 15 59 133 196
33 81 129 181 41 54 133 156 20 82 118 152 38 86 122 171
30 78 126 178 9 61 109 161 26 95 109 180 45 72 143 191
1 48 143 198 40 98 146 194 18 99 148 184 5 57 105 157
41 99 147 195 31 79 127 179 3 55 103 155 22 74 118 174
37 91 139 187 5 91 128 178 30 86 113 166 43 97 145 193
16 97 150 186 11 63 111 163 32 71 127 160 42 55 134 157
38 88 136 184 47 74 141 189 49 77 144 193 27 92 110 181
35 13 51 60 1 44 53 24 1 45 15 6 45 15 6 1
1 44 53 24 1 45 15 6 35 46 56 15 6 1 45 15
15 6 1 45 44 53 24 1 24 1 44 30 1 45 15 6
30 24 1 44 24 1 44 30 45 15 6 1 17 38 49 11
24 1 44 30 24 1 44 53 24 1 44 53 30 24 1 44
33 42 14 24 33 42 14 24 45 15 6 1 1 45 15 6
30 24 1 44 24 1 44 53 1 44 30 24 57 25 9 41
1 45 15 6 1 45 15 6 42 36 12 57 6 1 45 15
24 1 44 53 24 1 44 30 1 45 15 6 1 45 15 6
44 53 24 1 30 24 1 44 1 44 30 24 53 24 1 44
1 44 53 24 27 28 30 31 53 24 1 44 24 1 44 30
45 15 6 1 30 24 1 44 1 45 15 6 26 22 14 2
35 13 18 60 45 15 6 1 30 1 44 7 6 1 45 15
6 1 45 15 53 24 1 44 24 1 44 53 30 24 1 44
1 44 30 24 44 53 24 1 53 24 1 44 44 30 24 1
30 24 1 44 1 44 30 24 1 44 30 24 41 16 29 51
1 44 30 24 38 23 22 7 44 53 24 1 1 45 15 6
30 24 1 44 53 24 1 44 6 1 45 15 24 1 44 53
35 46 56 15 5 33 42 14 54 7 38 23 1 45 15 6
44 30 24 1 6 1 45 15 53 24 1 44 44 53 24 1
1 44 53 24 1 44 30 24 44 30 24 1 1 44 53 24
45 15 6 1 6 1 45 15 1 44 53 24 42 47 37 32
51 60 35 13 29 28 30 31 6 1 45 15 24 1 44 53
44 53 24 1 44 30 24 1 38 49 11 17 44 30 24 1
24 1 44 30 24 1 44 30 1 44 53 24 53 24 1 44
22 changes: 22 additions & 0 deletions data/ldpc/H_bds_b1c_sf3.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
14 35 56 70 11 29 55 73 13 39 53 69 15 34 57 71
1 27 45 54 23 41 63 87 2 20 46 68 6 24 50 61
2 26 61 79 9 33 59 77 4 30 48 74 22 42 59 76
12 38 52 68 23 43 58 77 19 21 63 64 11 25 65 82
17 39 44 75 9 35 49 72 19 29 66 84 13 36 56 82
17 43 67 81 22 40 62 86 3 21 47 69 10 24 64 83
0 37 70 86 5 31 49 75 4 40 53 84 5 41 52 85
18 28 67 85 0 26 44 55 10 28 54 72 7 30 50 81
1 36 71 87 16 38 45 74 8 34 48 73 8 32 58 76
12 37 57 83 6 31 51 80 15 33 47 79 16 42 66 80
7 25 51 60 3 27 60 78 14 32 46 78 18 20 62 65
30 24 1 44 24 1 44 30 40 32 61 18 53 24 1 44
51 60 35 13 18 15 32 61 15 6 1 45 30 24 1 44
6 1 45 15 45 15 6 1 1 45 15 6 1 44 53 24
24 1 44 53 44 30 24 1 34 33 45 36 55 9 34 3
1 44 53 24 61 47 20 8 53 24 1 44 15 6 1 45
13 18 60 35 45 15 6 1 24 1 44 53 37 32 52 47
44 53 24 1 39 36 34 33 44 35 31 50 12 25 36 14
15 35 46 56 53 24 1 44 1 44 53 24 24 1 44 30
44 30 24 1 15 6 1 45 30 24 1 44 2 50 22 14
33 42 14 5 34 3 55 9 44 35 61 50 15 6 1 45
45 15 6 1 1 44 30 24 6 1 45 15 1 44 53 24
24 changes: 24 additions & 0 deletions data/ldpc/H_bds_b2a.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
19 46 49 76 5 29 53 71 17 30 64 72 22 36 59 82
22 41 68 94 20 44 54 75 9 41 61 86 6 47 60 89
8 40 60 87 15 26 66 81 19 24 67 95 2 26 50 72
5 38 70 89 16 34 64 92 21 45 55 74 0 24 48 78
23 37 58 83 15 43 56 91 18 47 48 77 14 42 57 90
6 30 54 76 14 27 67 80 17 35 65 93 7 46 61 88
1 25 49 79 12 45 69 79 18 25 66 94 23 40 69 95
8 36 51 84 3 38 56 86 0 29 62 85 2 39 57 87
11 33 59 81 20 43 74 93 13 32 63 91 11 35 52 83
16 31 65 73 4 28 52 70 1 28 63 84 12 33 62 90
21 42 75 92 7 31 55 77 9 37 50 85 10 34 53 82
4 39 71 88 13 44 68 78 3 27 51 73 10 32 58 80
1 45 15 6 1 44 53 24 45 15 6 1 30 24 1 44
18 15 32 61 3 55 9 34 35 31 50 44 45 15 6 1
24 1 44 53 30 24 1 44 32 42 47 37 6 1 45 15
44 53 24 1 39 36 34 33 44 53 24 1 44 53 24 1
45 15 6 1 6 1 45 15 24 1 44 53 9 41 57 58
32 61 18 40 1 45 15 6 22 14 2 50 24 1 44 30
30 24 1 44 15 46 45 44 45 15 6 1 1 44 30 24
24 1 44 53 15 6 1 45 53 24 1 44 7 38 23 54
1 45 15 6 44 53 24 1 57 25 9 41 35 13 51 60
33 45 36 34 6 1 45 15 6 1 45 15 6 1 45 15
44 35 31 50 26 27 37 5 24 1 44 30 33 42 14 5
24 1 44 30 24 1 44 30 1 44 53 24 1 44 30 24
42 changes: 42 additions & 0 deletions data/ldpc/H_bds_b2b.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
19 67 109 130 27 71 85 161 31 78 96 122 2 44 83 125
26 71 104 132 30 39 93 154 4 46 85 127 21 62 111 127
13 42 101 146 18 66 108 129 27 72 100 153 29 70 84 160
23 61 113 126 8 50 89 131 34 74 111 157 12 44 100 145
22 60 112 128 0 49 115 151 6 47 106 144 33 53 82 140
3 45 84 126 38 80 109 147 9 60 96 141 1 43 82 124
20 77 88 158 37 54 122 159 3 65 104 149 5 47 86 128
0 42 81 123 32 79 97 120 35 72 112 158 15 57 93 138
22 75 107 143 24 69 102 133 1 50 116 152 24 57 119 135
17 59 95 140 7 45 107 145 34 51 83 138 14 43 99 144
21 77 106 142 16 58 94 139 20 68 110 131 2 48 114 150
10 52 91 133 25 70 103 134 32 41 95 153 14 56 91 137
33 73 113 156 28 73 101 154 4 63 102 147 6 48 87 129
8 46 105 146 30 80 98 121 41 68 119 150 35 52 81 139
16 63 114 124 13 55 90 136 31 40 94 155 10 61 97 142
36 56 121 161 29 74 99 155 5 64 103 148 18 75 89 156
36 78 110 148 19 76 87 157 15 65 116 123 11 53 92 134
25 58 117 136 39 66 117 151 11 62 98 143 9 51 90 132
38 55 120 160 7 49 88 130 17 64 115 125 0 0 0 0
28 69 86 159 23 76 105 141 12 54 92 135 0 0 0 0
40 67 118 152 37 79 108 149 26 59 118 137 0 0 0 0
46 45 44 15 15 24 50 37 24 50 37 15 15 32 18 61
58 56 60 62 37 53 61 29 46 58 18 6 36 19 3 57
54 7 38 23 51 59 63 47 9 3 43 29 56 8 46 13
26 22 14 2 63 26 41 12 17 32 58 37 38 23 55 22
35 1 31 44 44 51 35 13 30 1 44 7 27 5 2 62
16 63 20 9 27 56 8 43 1 44 30 24 5 26 27 37
42 47 37 32 38 12 25 51 43 34 48 57 39 9 30 48
63 13 54 10 2 46 56 35 47 20 33 26 62 54 56 60
1 21 25 7 43 58 19 49 28 4 52 44 46 44 14 15
41 48 2 27 49 21 7 35 40 21 44 17 24 23 45 11
46 25 22 48 13 29 53 61 52 17 24 61 29 41 10 16
60 24 4 50 32 49 58 19 43 34 48 57 29 7 10 16
25 11 7 1 32 49 58 19 42 14 24 33 39 56 30 48
13 27 56 8 53 40 61 18 8 43 27 56 18 40 32 61
60 48 2 27 50 54 60 62 58 19 32 49 9 3 63 43
53 35 16 13 23 25 30 16 18 6 61 21 15 1 42 45
20 16 63 9 27 37 5 26 29 7 10 16 11 60 6 49
43 47 18 20 42 14 24 33 43 22 41 20 22 15 12 33
9 41 57 58 5 31 51 30 9 3 63 43 0 0 0 0
37 53 61 29 6 45 56 19 33 45 36 34 0 0 0 0
19 24 42 14 1 45 15 6 8 43 27 56 0 0 0 0
Binary file added data/sc134/msg/MT54_10_DFi209=0.bin
Binary file not shown.
Binary file added data/sc134/msg/MT54_10_DFi209=1.bin
Binary file not shown.
Binary file added data/sc134/msg/MT54_10_DFi209=2.bin
Binary file not shown.
Binary file added data/sc134/msg/MT54_9.bin
Binary file not shown.
Binary file added data/sc134/msg/ssr/ROMAMSG.bin
Binary file not shown.
Binary file added data/sc134/msg/ssr/ROVRMSG.bin
Binary file not shown.
Binary file added data/sc134/msg/ssr/SSRTEST_20260206_CORR_v123.bin
Binary file not shown.
179 changes: 179 additions & 0 deletions receiver/cssr2rtcm.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
"""
Compact SSR messages to RTCM 3 messages converter

[1] RTCM Standard 10403.4 Differential GNSS Services -
Version 3 with Amendment 1, November, 2024

@author: Rui Hirokawa
"""

import argparse
from glob import glob
import multiprocessing as mp
import numpy as np
from binascii import unhexlify

from cssrlib.rtcm import rtcme
from cssrlib.cssrlib import cssr, sCType
from cssrlib.gnss import load_config, char2sys

config = load_config('config_ppprtk.yml')


def decode_msg(v, tow, prn_ref, l6_ch=0, prn_ref_ext=0, l6_ch_ext=0):
""" find valid correction message """

msg, msg_e = None, None

vi_ = v[v['tow'] == tow]
vi = vi_[(vi_['type'] == l6_ch) & (vi_['prn'] == prn_ref)]
if len(vi) > 0:
msg = unhexlify(vi['nav'][0])

# load regional STEC info (experimental)
if prn_ref_ext > 0:
vi = vi_[(vi_['type'] == l6_ch_ext) &
(vi_['prn'] == prn_ref_ext)]
if len(vi) > 0:
msg_e = unhexlify(vi['nav'][0])

return msg, msg_e


def encode_msg(cs, re, msgtype, maxlen=1024):
""" encode RTCM message """

k = 0
buff = bytearray(maxlen)
msg = bytearray(maxlen)

re.msgtype = msgtype
re.udi = cs.udi
re.datum = cs.datum
re.nsat_n = cs.nsat_n
re.sat_n = cs.sat_n
re.lc = cs.lc
re.grid = cs.grid
i = re.encode(buff)

len_ = (i+7)//8
if k+len_+6 >= maxlen:
return -1

re.set_body(msg, buff, k, len_)
re.set_sync(msg, k)
re.set_len(msg, k, len_)
re.set_checksum(msg, k)
k += re.dlen

return msg[:k]


def out_ssr(cs, re, fc, sct, sys_t=None, inet=0):
""" output SSR messages """

if cs.lc[inet].cstat & (1 << sct) == 0:
if sct not in [sCType.META, sCType.GRID]:
return

if sys_t is None:
mt = re.sct2mt(sct)
msg = encode_msg(cs, re, mt)
fc.write(msg)
else:
for sys in sys_t:
mt = re.sct2mt(sct, sys)
if mt < 0:
return
msg = encode_msg(cs, re, mt)
fc.write(msg)
cs.lc[inet].cstat ^= (1 << sct)


def process(infile, outfile, args):
dtype = [('wn', 'int'), ('tow', 'int'), ('prn', 'int'),
('type', 'int'), ('len', 'int'), ('nav', 'S500')]
v = np.genfromtxt(args.inpFileName, dtype=dtype)

griddef = config['griddef']

cs = cssr()
cs.monlevel = config['cs']['monlevel']
cs.read_griddef(griddef)

fc = open(outfile, 'wb')
if not fc:
print("RTCM message file cannot open.")

re = rtcme()
re.gtype = 1

re.gid = args.gid
prn_ref = args.prnref
l6_ch = args.l6ch # L6D
tow = v[0]['tow']-1
nep = 3600

re.inet = re.gid
# maxlen = len(cs.buff)

sys_t = char2sys(args.gnss)

for ne in range(nep):
tow += 1
msg_, _ = decode_msg(v, tow, prn_ref, l6_ch)
re.tow = tow
if msg_ is not None:
cs.decode_l6msg(msg_, 0)
if cs.fcnt == 5: # end of sub-frame
cs.decode_cssr(bytes(cs.buff), 0)

if ne == 0:
out_ssr(cs, re, fc, sCType.META)
out_ssr(cs, re, fc, sCType.GRID)

if cs.lc[0].cstat & (1 << sCType.MASK) == 0:
continue

out_ssr(cs, re, fc, sCType.CLOCK, sys_t)
out_ssr(cs, re, fc, sCType.ORBIT, sys_t)
out_ssr(cs, re, fc, sCType.URA, sys_t)
out_ssr(cs, re, fc, sCType.CBIAS, sys_t)
out_ssr(cs, re, fc, sCType.PBIAS, sys_t, inet=re.inet)
out_ssr(cs, re, fc, sCType.TROP, inet=re.inet)
out_ssr(cs, re, fc, sCType.STEC, sys_t, inet=re.inet)

fc.close()


if __name__ == "__main__":

# Parse command line arguments
#
parser = argparse.ArgumentParser(
description="QZS L6 (CSSR) to RTCM SSR converter")

parser.add_argument("inpFileName",
help="Input QZS L6 file(s) (wildcards allowed)")
parser.add_argument("-g", "--gnss", default='GEJ',
help="GNSS [GEJ]")
parser.add_argument("--prnref", type=int, default=199,
help="QZS satellite PRN [193-210] (default:199)")
parser.add_argument("--l6ch", type=int, default=0,
help="QZS satellite L6 channel [0|1] (default:0)")
parser.add_argument("--gid", type=int, default=7,
help="Network ID [1-12] (default:7)")
parser.add_argument("-j", "--jobs", default=int(mp.cpu_count() / 2),
type=int, help='Max. number of parallel processes')

args = parser.parse_args()

# args.inpFileName = '../data/doy2025-233/233h_qzsl6.txt'
foutname = args.inpFileName.removesuffix('.txt')+'.rtcm3'

# process(args.inpFileName, foutname, args)
# Start processing pool
#
with mp.Pool(processes=args.jobs) as pool:
pool.starmap(process, [(f, foutname, args)
for f in glob(args.inpFileName)])
Loading
Loading