diff --git a/README.md b/README.md index 04297db..82cebac 100644 --- a/README.md +++ b/README.md @@ -224,8 +224,9 @@ without logging out. positions are propagated from the cached ephemeris, then smoothly interpolated at 10 FPS. - The 3D Earth tab includes a `RINEX Guncelle` button for an immediate manual refresh. Its status line shows the system-local time of the last successful download or cache load. -- Complete UART channel snapshots such as `tracked satellites=5 prns=[...]` replace the previous - connected-PRN set, so satellites that were lost no longer remain green. +- Complete UART channel snapshots such as `tracked satellites=5 prn_indices=[...]` replace the + previous connected-PRN set, so satellites that were lost no longer remain green. Firmware + channel indices are zero-based and are normalized for display (`0` is GPS PRN `G01`). - RINEX text is parsed once per download and retained as compact ephemeris records. The static globe is cached between camera changes, reducing CPU and allocation load during orbit animation. - The globe uses an embedded Natural Earth coastline mask with terrain-like land colouring, diff --git a/src/LocationParser.cpp b/src/LocationParser.cpp index f60ff53..ff9940a 100644 --- a/src/LocationParser.cpp +++ b/src/LocationParser.cpp @@ -234,10 +234,11 @@ QSet LocationParser::parseGpsPrns(const QString &line) QSet result; const auto addPrn = [&result](QString value, bool zeroBased = false) { value = value.trimmed().toUpper(); - if (value.startsWith(QLatin1Char('G'))) value.remove(0, 1); + const bool explicitGpsPrn = value.startsWith(QLatin1Char('G')); + if (explicitGpsPrn) value.remove(0, 1); bool ok = false; int number = value.toInt(&ok); - if (ok && zeroBased) ++number; + if (ok && zeroBased && !explicitGpsPrn) ++number; if (ok && number >= 1 && number <= 63) { result.insert(QStringLiteral("G%1").arg(number, 2, 10, QLatin1Char('0'))); } @@ -249,18 +250,31 @@ QSet LocationParser::parseGpsPrns(const QString &line) auto gpsMatches = gpsToken.globalMatch(line); while (gpsMatches.hasNext()) addPrn(gpsMatches.next().captured(QStringLiteral("prn"))); - static const QRegularExpression labeledList( - QStringLiteral(R"((?