Hi, I have been playing with pyspartn a bit more and am now close to result I hope, thus my ability to now find errors deep in the parsing.
When using version 1.0.2 (latest at the time of writing), the parsing of SPARTN-1X-HPAC-GPS satellite mask looks wrong. Too many bits are read.
Field of interest is SF011. Definition is :
So typically, with first 2 bits as "01", 44 bits should be read. However 46 bits are read. 46 is the total field size, however 2 bits are already read.
...
011110000 -> Tropo coeff T00 (I agree with 1.0.2)
100001100 -> Tropo coeff T0 (I agree with 1.0.2)
011111101 -> Tropo coeff T10 (I agree with 1.0.2)
001 -> Iono equation type (I agree with 1.0.2)
01 -> 44 bits to follow (I agree with 1.0.2)
00000000000000000000100000110000100100000110 -> GPS sat mask (error) : I read 44 bits but 1.0.2 reads 46 bits
0000 -> Iono quality (error) : Now we read 2 bits too much and everything is off. Iono quality should be 0, but is read as 2 (see the next 2 bits of the stream)
1011000110... -> ... next bits of the stream
Looks correct, so it's probably in the logic of the SATBITMASKLEN.
I'll take a look and see if I can find the responsible line, and also if OCB messages are affected, as they are using the same parsing logic.
I obviously confused BDS with GPS, so the field parsing is correct =)
There is still a bug later in the chain (maybe on my side ?), but the parsing is absolutely right on this field
Hi, I have been playing with pyspartn a bit more and am now close to result I hope, thus my ability to now find errors deep in the parsing.
When using version 1.0.2 (latest at the time of writing), the parsing of SPARTN-1X-HPAC-GPS satellite mask looks wrong. Too many bits are read. Field of interest is SF011. Definition is :
So typically, with first 2 bits as "01", 44 bits should be read. However 46 bits are read. 46 is the total field size, however 2 bits are already read.
To Reproduce
With debug enabled, this produces (look offset 85) :
And here is how I log the parsing :
Expected Behaviour
Manual parsing gives :
Additional context
Looks correct, so it's probably in the logic of the SATBITMASKLEN. I'll take a look and see if I can find the responsible line, and also if OCB messages are affected, as they are using the same parsing logic.
Have a good day