Ignore:
Timestamp:
Jan 31, 2025, 10:30:08 AM (11 days ago)
Author:
stuerze
Message:

ADDED: consideration of NAV type in all applications

File:
1 edited

Legend:

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

    r10587 r10599  
    7171  _rawFile = rawFile;
    7272
    73   connect(this, SIGNAL(newGPSEph(t_ephGPS)), BNC_CORE,
    74       SLOT(slotNewGPSEph(t_ephGPS)));
    75   connect(this, SIGNAL(newGlonassEph(t_ephGlo)), BNC_CORE,
    76       SLOT(slotNewGlonassEph(t_ephGlo)));
    77   connect(this, SIGNAL(newGalileoEph(t_ephGal)), BNC_CORE,
    78       SLOT(slotNewGalileoEph(t_ephGal)));
    79   connect(this, SIGNAL(newSBASEph(t_ephSBAS)), BNC_CORE,
    80       SLOT(slotNewSBASEph(t_ephSBAS)));
    81   connect(this, SIGNAL(newBDSEph(t_ephBDS)), BNC_CORE,
    82       SLOT(slotNewBDSEph(t_ephBDS)));
     73  connect(this, SIGNAL(newGPSEph(t_ephGPS)),     BNC_CORE, SLOT(slotNewGPSEph(t_ephGPS)));
     74  connect(this, SIGNAL(newGlonassEph(t_ephGlo)), BNC_CORE, SLOT(slotNewGlonassEph(t_ephGlo)));
     75  connect(this, SIGNAL(newGalileoEph(t_ephGal)), BNC_CORE, SLOT(slotNewGalileoEph(t_ephGal)));
     76  connect(this, SIGNAL(newSBASEph(t_ephSBAS)),   BNC_CORE, SLOT(slotNewSBASEph(t_ephSBAS)));
     77  connect(this, SIGNAL(newBDSEph(t_ephBDS)),     BNC_CORE, SLOT(slotNewBDSEph(t_ephBDS)));
    8378
    8479  _MessageSize = _SkipBytes = _BlockSize = _NeedBytes = 0;
     
    134129
    135130    GETBITS(sv, 6)
    136     if (sv < 40)
    137       CurrentObs._prn.set('G', sv);
    138     else
    139       CurrentObs._prn.set('S', sv - 20);
     131    char sys;
     132    int num, flag;
     133    if (sv < 40) {
     134      sys = 'G';
     135      num = sv;
     136    }
     137    else {
     138      sys = 'S';
     139      num = sv - 20;
     140    }
     141    flag = t_corrSSR::getSsrNavTypeFlag(sys, num);
     142    CurrentObs._prn.set(sys, num, flag);
    140143
    141144    t_frqObs *frqObs = new t_frqObs;
     
    706709            /* next satellite */
    707710            ;
    708           if (CurrentObs._obs.size() > 0)
     711          if (CurrentObs._obs.size() > 0) {
     712            char sys = CurrentObs._prn.system();
     713            int  num = CurrentObs._prn.number();
     714            int flag = t_corrSSR::getSsrNavTypeFlag(sys, num);
     715            CurrentObs._prn.setFlag(flag);
    709716            _CurrentObsList.push_back(CurrentObs);
     717          }
    710718          CurrentObs.clear();
    711719          CurrentObs._time = CurrentObsTime;
     
    882890      }
    883891      if (CurrentObs._obs.size() > 0) {
     892        char sys = CurrentObs._prn.system();
     893        int  num = CurrentObs._prn.number();
     894        int flag = t_corrSSR::getSsrNavTypeFlag(sys, num);
     895        CurrentObs._prn.setFlag(flag);
    884896        _CurrentObsList.push_back(CurrentObs);
    885897      }
     
    939951
    940952    GETBITS(sv, 6)
    941     CurrentObs._prn.set('R', sv);
     953    char sys = 'R';
     954    int flag = t_corrSSR::getSsrNavTypeFlag(sys, sv);
     955    CurrentObs._prn.set(sys, sv, flag);
    942956    GETBITS(code, 1)
    943957    GETBITS(freq, 5)
     
    11351149    eph._TOT = 0.9999e9;
    11361150    eph._type = t_eph::LNAV;
     1151    eph._prn.setFlag(eph._type);
    11371152
    11381153    emit newGPSEph(eph);
     
    13131328    _gloFrq = QString("%1 %2").arg(eph._prn.toString().c_str()).arg(eph._frq_num, 2, 'f', 0);
    13141329
    1315     eph._type = t_eph::FDMA;
     1330    if (eph.validMdata()) {
     1331      eph._type = t_eph::FDMA_M;
     1332    }
     1333    else {
     1334      eph._type = t_eph::FDMA;
     1335    }
     1336    eph._prn.setFlag(eph._type);
    13161337    eph._healthflags_unknown = false;
    13171338    eph._statusflags_unknown = false;
     
    15681589    eph._TOT = 0.9999e9;
    15691590    eph._type = t_eph::LNAV;
     1591    eph._prn.setFlag(eph._type);
    15701592
    15711593    emit newGPSEph(eph);
     
    16431665    eph._health = 0;
    16441666    eph._type = t_eph::SBASL1;
     1667    eph._prn.setFlag(eph._type);
    16451668
    16461669    emit newSBASEph(eph);
     
    16611684  GETBITS(i, 12)
    16621685
    1663   if ((i == 1046 && size == 61) || (i == 1045 && size == 60)) {
     1686  if ((i == 1046 && size == 61) ||
     1687      (i == 1045 && size == 60)) {
    16641688    t_ephGal eph;
    16651689    eph._receptDateTime = currentDateAndTimeGPS();
     
    16791703      return false;
    16801704    }
    1681     eph._prn.set('E', i, eph._inav ? 1 : 0);
     1705    eph._prn.set('E', i, eph._inav ? t_eph::INAV : t_eph::FNAV);
    16821706
    16831707    GETBITS(week, 12) //FIXME: roll-over after week 4095!!
     
    17411765    GETFLOATSIGN(eph._BGD_1_5A, 10, 1.0 / (double )(1 << 30) / (double )(1 << 2))
    17421766    if (eph._inav) {
     1767      eph._type = t_eph::INAV;
    17431768      /* set unused F/NAV values */
    17441769      eph._E5a_HS = 0.0;
     
    17671792        return false;
    17681793      }
    1769       eph._type = t_eph::INAV;
    17701794    }
    17711795    else {
     1796      eph._type = t_eph::FNAV;
    17721797      /* set unused I/NAV values */
    17731798      eph._BGD_1_5B = 0.0;
     
    17791804      GETBITS(eph._E5a_HS, 2)
    17801805      GETBITS(eph._E5a_DataInvalid, 1)
    1781       eph._type = t_eph::FNAV;
    17821806    }
    17831807    eph._TOT = 0.9999e9;
     
    19081932      eph._type = t_eph::D2;
    19091933    }
     1934    eph._prn.setFlag(eph._type);
    19101935
    19111936    emit newBDSEph(eph);
Note: See TracChangeset for help on using the changeset viewer.