Galileo HAS(high accuracy service)Part 3
QZS L6 Tool HAS decode crashes
The European positioning satellite Galileo broadcasts the high-precision augmentation signal HAS (HAS). I made it possible to decode with QZS L6 Tool, but for some reason, decode sometimes crashes.
During HAS decoding, the inverse of the Galois field must be calculated depending on the received data. At this time, the cause was that the inverse matrix could not be calculated due to rank drop.
Rank deficiation check
Therefore, I added a check code to the HAS decode code libgale6.py
to display a notification when the rank deficiation occurs.
--- a/python/libgale6.py
+++ b/python/libgale6.py
@@ -382,6 +382,13 @@ class GalE6():
def decode_has_message(self):
d = GF(g[np.array(self.hasindx[:self.ms])-1, :self.ms])
+ if np.linalg.matrix_rank(d) != self.ms:
+ disp_msg = 'decode failure --- ' + \
+ f'rank deficient when solving inverse matrix:\n{d}\n' + \
+ f'the reduced matrix is:\n{d.row_reduce()}'
+ if self.fp_disp:
+ print(disp_msg, file=self.fp_disp)
+ return
w = GF(self.haspage[:self.ms])
m = np.linalg.inv(d) @ w
has_msg = bitstring.ConstBitStream(m.tobytes())
And when I tried to decode Galileo HAS, rank deficiation was detected.
Causes and countermeasures
The reason for my rank dificiation was because I received the same message multiple times. For this MID (message ID) 23, it is necessary to receive messages with 11 different PIDs (encoded page IDs) of MS (message size). During this process, E13
sent PID 3 and 2, E26
sent PID 2 and 3, and E31
and E09
sent PID 155. then, this matrix is rank-deficiate of 3 degrees in total.
Galileo operators have 255 PID choices, so there should be no incentive to broadcast duplicate PIDs. I was careless and did not check for PID duplication in QZS L6 Tool. But why broadcast duplicate PIDs in HAS? This operation reduces the effectiveness of HPVRS (high parity vertical Reed-Solomon). As someone who loves technology, this is very frustrating.
I’ll try to write the code to check for PID duplication and collect different PID messages for avoiding forced termination of the HAS decode.
update on 2023-11-21
The issue is resolved.
Related article(s):
- Galileo HAS(high accuracy service)part 2 20th February 2023
- Galileo HAS(high accuracy service)part 1 7th February 2023