mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2026-11-24 16:17:22 +00:00
The BeiDou DNAV and GLONASS GNAV decoders find from the sign of the preamble (or time mark) correlation that the carrier loop is locked 180 degrees off and invert the symbols they decode, but they never set Flag_PLL_180_deg_phase_locked, so the flag that reaches the observables is the one the tracking block set. Keep the sign of the last frame that passed its CRC check and, as the GPS and Galileo decoders do, report it in Flag_PLL_180_deg_phase_locked and add half a cycle to the carrier phase while it is set. The new unit tests feed BeiDou D1 subframes and GLONASS strings, normal and inverted, to the decoders and check the reported flag and carrier phase, a polarity change, and a GLONASS string that fails its Hamming check. Signed-off-by: Oleksandr Suvorov <cryosay@gmail.com>