Skip to content

Fix BeiDou C39, C49 and C59 names in Sat::GetStr() - #231

Merged
flipflip8952 merged 2 commits into
fixposition:mainfrom
jayden1711:fix/bds-sat-str
Nov 24, 2026
Merged

flipflip8952 merged 2 commits into
fixposition:mainfrom
jayden1711:fix/bds-sat-str

Conversation

@jayden1711

Copy link
Copy Markdown
Contributor

Bug. The BeiDou name table in fpsdk_common/src/gnss.cpp has three wrong entries. The slots for C39, C49 and C59 hold "C30", "C40" and "C50". So these satellites print the wrong name, for example in the UBX-RXM-SFRBX info string. Sat(sat.GetStr()) also gives a different satellite for them.

Fix. Put "C39", "C49" and "C59" in those three slots.

Test. I added the three satellites to GnssTest.SatStr. I also added GnssTest.SatStrRoundtrip, which checks Sat(sat.GetStr()) == sat for every valid satellite of every constellation. The full library needs Linux. So I compiled gnss.cpp, logging.cpp, string.cpp and gnss_test.cpp from a33788a with gtest 1.15.2 on macOS. Before the fix, 10 of 12 tests pass. SatStr gets "C30" for C39, and the round trip fails with "C30 is not BDS 39". With the fix, 12 of 12 pass. clang-format 18.1.8 is clean. I did not run make test in your Linux image.

jayden1711 and others added 2 commits November 23, 2026 15:00
The BDS string table had "C30", "C40" and "C50" in the slots for
C39, C49 and C59, so those satellites printed as the wrong PRN and
Sat(sat.GetStr()) did not round-trip. Add a round-trip test over all
valid satellites of every constellation.
@flipflip8952

Copy link
Copy Markdown
Contributor

Hi Jayden
Good find. Many thanks!
My hand must have slipped from "9" to "0" when typing those.
Running CI now, will merge when good.

@flipflip8952
flipflip8952 merged commit f94f5ea into fixposition:main Nov 24, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants