Ignore:
Timestamp:
Sep 28, 2026, 11:17:34 AM (12 hours ago)
Author:
stuerze
Message:

updates regarding RTCM-SSR and some ovarall improvements

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/RTCM3/RTCM3Decoder.cpp

    r11043 r11047  
    141141    flag = t_corrSSR::getSsrNavTypeFlag(sys, num);
    142142    CurrentObs._prn.set(sys, num, flag);
     143    checkPrnRange(CurrentObs._prn);
    143144
    144145    t_frqObs *frqObs = new t_frqObs;
    … …  
    723724          else
    724725            CurrentObs._prn.set(sys, RTCM3_MSM_NUMSAT - i);
     726          checkPrnRange(CurrentObs._prn);
    725727          j = RTCM3_MSM_NUMSIG;
    726728          while (!(sigmask & (1 << --j)))
    … …  
    954956    int flag = t_corrSSR::getSsrNavTypeFlag(sys, sv);
    955957    CurrentObs._prn.set(sys, sv, flag);
     958    checkPrnRange(CurrentObs._prn);
    956959    GETBITS(code, 1)
    957960    GETBITS(freq, 5)
    958     GLOFreq[sv - 1] = 100 + freq - 7; /* store frequency for other users (MSM) */
     961    if (sv >= 1) { /* 6-bit slot 1..63 fits GLOFreq[64]; 0 is invalid */
     962      GLOFreq[sv - 1] = 100 + freq - 7; /* store frequency for other users (MSM) */
     963    }
    959964
    960965    t_frqObs *frqObs = new t_frqObs;
    … …  
    10661071    }
    10671072    eph._prn.set('G', i);
     1073    checkPrnRange(eph._prn);
    10681074    GETBITS(week, 10)
    10691075    if (week < 0 || week > 1023) {
    … …  
    11851191    }
    11861192    eph._prn.set('R', sv);
     1193    checkPrnRange(eph._prn);
    11871194
    11881195    GETBITS(i, 5)
    … …  
    13731380    }
    13741381    eph._prn.set('J', i);
     1382    checkPrnRange(eph._prn);
    13751383
    13761384    GETBITS(i, 16)
    … …  
    14931501    }
    14941502    eph._prn.set('I', i);
     1503    checkPrnRange(eph._prn);
    14951504    GETBITS(week, 10)
    14961505    if (week < 0 || week > 1023) {
    … …  
    16271636    }
    16281637    eph._prn.set('S', 20 + i);
     1638    checkPrnRange(eph._prn);
    16291639    GETBITS(eph._IODN, 8)
    16301640    GETBITS(i, 13)
    … …  
    17161726    }
    17171727    eph._prn.set('E', i, eph._inav ? t_eph::INAV : t_eph::FNAV);
     1728    checkPrnRange(eph._prn);
    17181729
    17191730    GETBITS(week, 12) //FIXME: roll-over after week 4095!!
    … …  
    18631874    }
    18641875    eph._prn.set('C', i);
     1876    checkPrnRange(eph._prn);
    18651877
    18661878    GETBITS(week, 13)
    … …  
    24392451}
    24402452
    2441 
    2442 
    2443 
     2453// Satellite numbers on the wire can exceed BNC's supported range (e.g. 6-bit
     2454// IDs up to 63, while t_prn supports G01-G32). They are passed on unchanged,
     2455// but t_prn::toInt() maps them to the unused index 0, so they are not usable
     2456// for per-satellite processing - report that once per satellite.
     2457////////////////////////////////////////////////////////////////////////////
     2458void RTCM3Decoder::checkPrnRange(const t_prn& prn) {
     2459  if (prn.toInt() != 0) {
     2460    return;
     2461  }
     2462  QString prnStr = QString::fromStdString(prn.toString());
     2463  if (!_prnOutOfRangeLogged.contains(prnStr)) {
     2464    _prnOutOfRangeLogged.insert(prnStr);
     2465    emit newMessage(QString("%1: satellite %2 outside the range supported by BNC - not usable for processing")
     2466                    .arg(_staID).arg(prnStr).toLatin1(), true);
     2467  }
     2468}
Note: See TracChangeset for help on using the changeset viewer.