@@ -65,46 +65,16 @@ class sRTCM(IntEnum):
6565 SSR_PBIAS_EX = 90
6666
6767
68+ class satAntCorr ():
69+ """ class for satellite antenna corrections """
70+
71+ def __init__ (self , nadc , naddc ):
72+ self .nadc = nadc
73+ self .naddc = naddc
74+
75+
6876class Integrity ():
6977 """ class for integrity information in SC-134 """
70- pid = 0 # augmentation provider id DFi027 (0-4095)
71- vp = 0 # validity period DFi065 (0-15)
72- uri = 0 # update rate interval DFi067 (b16)
73-
74- # placeholder for RTCM SSR
75- pidssr = 0 # SSR provider ID
76- sidssr = 0 # SSR solution type
77- iodssr = 0 # SSR iod
78-
79- tow = 0
80- iod_sys = {} # issue of GNSS satellite mask DFi010 (b2)
81- sts = {} # constellation integrity status DFi029 (b16)
82- mst = {} # constellation monitoring status DFi030 (b16)
83- src = {}
84-
85- nid = {}
86- flag = {}
87- sigmask = {} # GNSS signal mask DFi033 (b32)
88- iod_sig = {} # issue of GNSS signal mask DFi012 (b2)
89- sig_ists = {} # signal integrity status DFi031 (b32)
90- sig_msts = {} # signal monitoring status DFi032 (b32)
91-
92- Paug = 0 # Augmentation System Probability Falut DFi049
93-
94- Pa_sp = {} # Single Satellite PR Message Fault Probability DFi046
95- sig_a = {} # Overbounding stdev of PR Augmentation Meesage DFi036
96- Pa_sc = {} # Single Satellite CP Message Fault Probability DFi048
97- ob_p = {} # Overbounding bias of long-ter PR bias DFi037
98- sig_ob_c = {} # Ovebounding stdev of CP DFi038
99- ob_c = {} # Overbounding bias of long-term CP bias DFi039
100-
101- nsys = 0
102- nsat = {}
103- sys_t = None
104- sat = {}
105- mask_sys = 0
106-
107- mm_param = None
10878
10979 sys_tbl = {0 : uGNSS .GPS , 1 : uGNSS .GLO , 2 : uGNSS .GAL , 3 : uGNSS .BDS ,
11080 4 : uGNSS .QZS , 5 : uGNSS .IRN }
@@ -184,6 +154,45 @@ def __init__(self):
184154 self .sys_r_tbl = {self .sys_tbl [s ]: s for s in self .sys_tbl .keys ()}
185155 self .vp_r_tbl = {s : k for k , s in enumerate (self .vp_tbl )}
186156
157+ self .pid = 0 # augmentation provider id DFi027 (0-4095)
158+ self .vp = 0 # validity period DFi065 (0-15)
159+ self .uri = 0 # update rate interval DFi067 (b16)
160+
161+ # placeholder for RTCM SSR
162+ self .pidssr = 0 # SSR provider ID
163+ self .sidssr = 0 # SSR solution type
164+ self .iodssr = 0 # SSR iod
165+
166+ self .tow = 0
167+ self .iod_sys = {} # issue of GNSS satellite mask DFi010 (b2)
168+ self .sts = {} # constellation integrity status DFi029 (b16)
169+ self .mst = {} # constellation monitoring status DFi030 (b16)
170+ self .src = {}
171+
172+ self .nid = {}
173+ self .flag = {}
174+ self .sigmask = {} # GNSS signal mask DFi033 (b32)
175+ self .iod_sig = {} # issue of GNSS signal mask DFi012 (b2)
176+ self .sig_ists = {} # signal integrity status DFi031 (b32)
177+ self .sig_msts = {} # signal monitoring status DFi032 (b32)
178+
179+ self .Paug = 0 # Augmentation System Probability Falut DFi049
180+
181+ self .Pa_sp = {} # Single Satellite PR Message Fault Probability DFi046
182+ self .sig_a = {} # Overbounding stdev of PR Augmentation Meesage DFi036
183+ self .Pa_sc = {} # Single Satellite CP Message Fault Probability DFi048
184+ self .ob_p = {} # Overbounding bias of long-ter PR bias DFi037
185+ self .sig_ob_c = {} # Ovebounding stdev of CP DFi038
186+ self .ob_c = {} # Overbounding bias of long-term CP bias DFi039
187+
188+ self .nsys = 0
189+ self .nsat = {}
190+ self .sys_t = None
191+ self .sat = {}
192+ self .mask_sys = 0
193+
194+ self .mm_param = None
195+
187196
188197class TropModel ():
189198 """ Tropospheric delay correction model for RTCM SSR """
@@ -233,6 +242,7 @@ def __init__(self, foutname=None):
233242 uGNSS .QZS : 1044 , uGNSS .GAL : 1046
234243 }
235244
245+ self .antc = {}
236246 self .integ = Integrity ()
237247 self .test_mode = False # for interop testing in SC134
238248
@@ -687,8 +697,11 @@ def get_ssr_sys(self, msgtype):
687697 99 : uGNSS .BDS , 100 : uGNSS .QZS }
688698 elif msgtype in [60 , 61 , 95 ]: # METADATA, grid definition, trop
689699 return uGNSS .NONE
700+ elif msgtype in [11 ]: # RTCM SC-134 test messages
701+ return uGNSS .NONE
690702 else :
691703 print (f"definition of { msgtype } is missing" )
704+ # return uGNSS.NONE
692705
693706 return tbl_t [msgtype ]
694707
@@ -1413,8 +1426,7 @@ def out_log(self, obs=None, eph=None, geph=None, seph=None):
14131426 self .fh .write ("\n " )
14141427
14151428 for sys in self .integ .flag .keys ():
1416- self .fh .write (" Network ID:{:3d} Integrity Flag: " .format (
1417- self .integ .nid [sys ]))
1429+ self .fh .write (" NIntegrity Flag: " )
14181430 for sat in self .integ .flag [sys ]:
14191431 self .fh .write (" {:3s}:{:2d}" .format (
14201432 sat2id (sat ), self .integ .flag [sys ][sat ]))
@@ -2176,30 +2188,55 @@ def decode_ssr_metadata(self, msg, i):
21762188
21772189 return i
21782190
2179- def decode_ssr_satant (self , sys , msg , i ):
2191+ def decode_ssr_satant (self , msg , i ):
21802192 """ decode GNSS Satellite Antenna Message (E80,81,82,83,84) """
2193+ sys = self .get_ssr_sys (self .msgtype )
2194+
2195+ # Provider ID
2196+ # Satellite Antenna IOD (DF+10)
2197+ # Phase Center Information Infdicator (DF+11)
2198+ # Group Delay Informatyion Indicator (DF+12)
2199+ # Nadir Angle Dependent Corrections Indicator (DF+13)
21812200 pid , iods , pci , gdi , ndi = bs .unpack_from ('u16u6b1b1b1' , msg , i )
21822201 i += 25
21832202 if ndi :
2184- nmas , nde = bs .unpack_from ('u5u4' , msg , i )
2203+ # Maximum off-nadir angle (DF+14)
2204+ # Nadir angle dependent corrections range extension (DF+15)
2205+ emax , nde = bs .unpack_from ('u5u4' , msg , i )
21852206 i += 9
2186- ssi , satmask = bs .unpack_from ('u1u64' , msg , i )
2207+ # Satellite Set Indicator (DF+16): set if True, else for single
2208+ ssi , satmask = bs .unpack_from ('b1u64' , msg , i )
21872209 i += 65
21882210
2189- prn , nsat = self .decode_mask (satmask , 64 , 1 )
2190- for k in range (nsat ):
2191- fsi , freqmask = bs .unpack_from ('u1u6' , msg , i )
2211+ svids , nsat = self .decode_mask (satmask , 64 , 1 )
2212+ for svid in svids :
2213+ sat = self .svid2sat (sys , svid )
2214+ if sat not in self .antc :
2215+ self .antc [sat ] = {}
2216+ # Frequency Set Indicator (DF+17) Set if True else Single
2217+ # GNSS Frequency Mask (DF+18)
2218+ fsi , freqmask = bs .unpack_from ('b1u6' , msg , i )
21922219 i += 7
2193- freq , nf = self .decode_mask (freqmask , 6 , 0 )
2194- for j in range (nf ):
2220+ freq_ , nf = self .decode_mask (freqmask , 6 , 0 )
2221+ for freq in freq_ : # Frequency part
2222+ # Nadir correction indicator (DF+19)
21952223 nci = bs .unpack_from ('b1' , msg , i )[0 ]
21962224 i += 1
2197- if nci :
2198- nc = bs .unpack_from ('s12' , msg , i )[0 ]
2225+ if nci : # nadir corrections
2226+ nadc_ = bs .unpack_from ('s12' , msg , i )[0 ] # DF+20
21992227 i += 12
2200- if ndi :
2201- ndc = bs .unpack_from ('s' + str (3 + nde ), msg , i )[0 ]
2202- i += 3 + nde
2228+ nadc = self .sval (nadc_ , 12 , 1e-3 ) # [m]
2229+ else :
2230+ nadc = None
2231+ if ndi : # nadir angle dependent corrections (PCVs) (DF+21)
2232+ naddc = np .zeros (nde + 1 )
2233+ for k in range (nde + 1 ):
2234+ naddc_ = bs .unpack_from ('s' + str (3 + nde ), msg , i )[0 ]
2235+ i += 3 + nde
2236+ naddc [k ] = self .sval (naddc_ , 3 + nde , 1e-3 ) # [m]
2237+ else :
2238+ naddc = None
2239+ self .antc [sat ][freq ] = satAntCorr (nadc , naddc )
22032240 return i
22042241
22052242 def decode_ssr_grid (self , msg , i ):
@@ -3595,7 +3632,7 @@ def encode(self, msg, obs=None):
35953632 bs .pack_into ('u12' , msg , i , self .msgtype )
35963633 i += 12
35973634
3598- if self .is_msmtype (self .msgtype , obs ):
3635+ if self .is_msmtype (self .msgtype ):
35993636 self .subtype = sRTCM .MSM
36003637 i = self .encode_msm (msg , obs , i )
36013638
0 commit comments