Changeset 10599 in ntrip for trunk/BNC


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

ADDED: consideration of NAV type in all applications

Location:
trunk/BNC/src
Files:
20 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/PPP/pppClient.h

    r10583 r10599  
    7070  bncAntex*                 _antex;
    7171  t_pppFilter*              _filter;
    72   double                    _offGps;
    73   double                    _offGlo;
    74   double                    _offGal;
    75   double                    _offBds;
    7672  std::vector<t_pppSatObs*> _obsRover;
    7773  std::ostringstream*       _log;
  • trunk/BNC/src/PPP/pppSatObs.cpp

    r10582 r10599  
    141141    _channel = 0;
    142142  }
    143   if (_prn.system() == 'E') {
    144     // force I/NAV usage
    145     _prn.setFlags(1);
    146   }
    147 
    148 
    149143
    150144  // Compute Satellite Coordinates at Time of Transmission
  • trunk/BNC/src/PPP_SSR_I/pppClient.cpp

    r9481 r10599  
    8686    const t_satObs* obs     = satObs[ii];
    8787    t_prn prn = obs->_prn;
    88     if (prn.system() == 'E') {prn.setFlags(1);} // force I/NAV usage
    8988    t_satData*   satData = new t_satData();
    9089
  • trunk/BNC/src/RTCM/RTCM2Decoder.cpp

    r9088 r10599  
    134134        for (int iSat = 0; iSat < _ObsBlock.nSat; iSat++) {
    135135          t_satObs obs;
     136          char sys;
     137          int num, flag;
    136138          if (_ObsBlock.PRN[iSat] > 100) {
    137             obs._prn.set('R', _ObsBlock.PRN[iSat] % 100);
    138           } else {
    139             obs._prn.set('G', _ObsBlock.PRN[iSat]);
     139            sys = 'R';
     140            num = _ObsBlock.PRN[iSat] % 100;
    140141          }
    141           char sys = obs._prn.system();
     142          else {
     143            sys = 'G';
     144            num = _ObsBlock.PRN[iSat];
     145          }
     146          flag = t_corrSSR::getSsrNavTypeFlag(sys, num);
     147          obs._prn.set(sys, num, flag);
    142148          obs._time.set(epochWeek, epochSecs);
    143149
     
    283289    // end test
    284290
    285     QString prn;
     291    t_prn prn;
    286292    char sys;
     293    int num, flag;
    287294    if (corr->PRN < 200) {
    288295      sys = 'G';
    289       prn = sys + QString("%1_0").arg(corr->PRN, 2, 10, QChar('0'));
    290     } else {
     296      num = corr->PRN;
     297    }
     298    else {
    291299      sys = 'R';
    292       prn = sys + QString("%1_0").arg(corr->PRN - 200, 2, 10, QChar('0'));
    293     }
     300      num = corr->PRN - 200;
     301    }
     302    flag = t_corrSSR::getSsrNavTypeFlag(sys, num);
     303    prn.set(sys, num, flag);
    294304
    295305    double L1 = 0;
     
    353363
    354364      // Select corresponding ephemerides
    355       const t_eph* ephLast = _ephUser.ephLast(prn);
    356       const t_eph* ephPrev = _ephUser.ephPrev(prn);
     365      QString prnInternalStr(prn.toInternalString().c_str());
     366      const t_eph* ephLast = _ephUser.ephLast(prnInternalStr);
     367      const t_eph* ephPrev = _ephUser.ephPrev(prnInternalStr);
    357368      if (ephLast && ephLast->IOD() == IODcorr) {
    358369        eph = ephLast;
     
    376387        if (*obsVal == 0)
    377388          *obsVal = ZEROVALUE;
    378 
     389        char sys;
     390        int num, flag;
    379391        if (corr->PRN < 200) {
    380           new_obs._prn.set('G', corr->PRN);
    381         } else {
    382           new_obs._prn.set('R', corr->PRN - 200);
     392          sys = 'G';
     393          num = corr->PRN;
    383394        }
     395        else {
     396          sys = 'R';
     397          num = corr->PRN - 200;
     398        }
     399        flag = t_corrSSR::getSsrNavTypeFlag(sys, num);
     400        new_obs._prn.set(sys, num, flag);
    384401        new_obs._time.set(GPSWeek_rcv, GPSWeeks_rcv);
    385402
     
    432449
    433450      errmsg.push_back(
    434           "missing eph for " + string(prn.toLatin1().data()) + " , IODs "
     451          "missing eph for " + prn.toString() + " , IODs "
    435452              + missingIODstr.str());
    436453    }
  • 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);
  • trunk/BNC/src/RTCM3/RTCM3coDecoder.cpp

    r10572 r10599  
    243243      continue;
    244244    }
    245     char sysCh = ' ';
    246     int flag = 0;
     245    char sys = ' ';
     246    int  num  = _clkOrb.Sat[ii].ID;
     247    int  flag = 0;  // to force NAV type usage according SSR standard
    247248    if      (ii < _clkOrb.NumberOfSat[CLOCKORBIT_SATGPS]) {
    248       sysCh = 'G';
     249      sys = 'G';
     250      flag = t_eph::LNAV;
    249251    }
    250252    else if (ii >= CLOCKORBIT_OFFSETGLONASS &&
    251253        ii < CLOCKORBIT_OFFSETGLONASS + _clkOrb.NumberOfSat[CLOCKORBIT_SATGLONASS]) {
    252       sysCh = 'R';
     254      sys = 'R';
     255      flag = t_eph::FDMA_M;
    253256    }
    254257    else if (ii >= CLOCKORBIT_OFFSETGALILEO &&
    255258        ii < CLOCKORBIT_OFFSETGALILEO + _clkOrb.NumberOfSat[CLOCKORBIT_SATGALILEO]) {
    256       sysCh = 'E';
    257       flag = 1; // I/NAV clock has been chosen as reference clock for Galileo SSR corrections
     259      sys = 'E';
     260      flag = t_eph::INAV;
    258261    }
    259262    else if (ii >= CLOCKORBIT_OFFSETQZSS &&
    260263        ii < CLOCKORBIT_OFFSETQZSS + _clkOrb.NumberOfSat[CLOCKORBIT_SATQZSS]) {
    261       sysCh = 'J';
     264      sys = 'J';
     265      flag = t_eph::LNAV;
    262266    }
    263267    else if (ii >= CLOCKORBIT_OFFSETSBAS &&
    264268        ii < CLOCKORBIT_OFFSETSBAS + _clkOrb.NumberOfSat[CLOCKORBIT_SATSBAS]) {
    265       sysCh = 'S';
     269      sys = 'S';
     270      flag = t_eph::SBASL1;
    266271    }
    267272    else if (ii >= CLOCKORBIT_OFFSETBDS &&
    268273        ii < CLOCKORBIT_OFFSETBDS + _clkOrb.NumberOfSat[CLOCKORBIT_SATBDS]) {
    269       sysCh = 'C';
     274      sys = 'C';
     275      if (num < 6) {// GEO
     276        flag = t_eph::D2;
     277      }
     278      else if (num > 58 && num < 63) { // GEO
     279        flag = t_eph::D2;
     280      }
     281      else {
     282        flag = t_eph::D1;
     283      }
    270284    }
    271285    else {
     
    289303
    290304      t_orbCorr orbCorr;
    291       orbCorr._prn.set(sysCh, _clkOrb.Sat[ii].ID, flag);
     305      orbCorr._prn.set(sys, num, flag);
    292306      orbCorr._staID     = _staID.toStdString();
    293307      orbCorr._iod       = _clkOrb.Sat[ii].IOD;
    294308      orbCorr._time      = _lastTime;
    295309      orbCorr._updateInt = _clkOrb.UpdateInterval;
    296       orbCorr._system    = sysCh;
     310      orbCorr._system    = sys;
    297311      orbCorr._xr[0]     = _clkOrb.Sat[ii].Orbit.DeltaRadial;
    298312      orbCorr._xr[1]     = _clkOrb.Sat[ii].Orbit.DeltaAlongTrack;
     
    323337
    324338      t_clkCorr clkCorr;
    325       clkCorr._prn.set(sysCh, _clkOrb.Sat[ii].ID, flag);
     339      clkCorr._prn.set(sys, _clkOrb.Sat[ii].ID, flag);
    326340      clkCorr._staID      = _staID.toStdString();
    327341      clkCorr._time       = _lastTime;
     
    347361         _clkOrb.messageType == _ssrCorr->COTYPE_SBASHR ||
    348362         _clkOrb.messageType == _ssrCorr->COTYPE_BDSHR) {
    349       t_prn prn(sysCh, _clkOrb.Sat[ii].ID, flag);
     363      t_prn prn(sys, _clkOrb.Sat[ii].ID, flag);
    350364      if (_lastClkCorrections.contains(prn)) {
    351365        t_clkCorr clkCorr;
     
    371385                            + _codeBias.NumberOfSat[CLOCKORBIT_SATBDS];
    372386    ii++) {
    373     char sysCh = ' ';
     387    char sys = ' ';
     388    int  num =  _codeBias.Sat[ii].ID;
     389    int flag = 0;
    374390    if      (ii < _codeBias.NumberOfSat[CLOCKORBIT_SATGPS]) {
    375       sysCh = 'G';
     391      sys = 'G';
     392      flag = t_eph::LNAV;
    376393    }
    377394    else if (ii >= CLOCKORBIT_OFFSETGLONASS &&
    378395        ii < CLOCKORBIT_OFFSETGLONASS + _codeBias.NumberOfSat[CLOCKORBIT_SATGLONASS]) {
    379       sysCh = 'R';
     396      sys = 'R';
     397      flag = t_eph::FDMA_M;
    380398    }
    381399    else if (ii >= CLOCKORBIT_OFFSETGALILEO &&
    382400        ii < CLOCKORBIT_OFFSETGALILEO + _codeBias.NumberOfSat[CLOCKORBIT_SATGALILEO]) {
    383       sysCh = 'E';
     401      sys = 'E';
     402      flag = t_eph::INAV;
    384403    }
    385404    else if (ii >= CLOCKORBIT_OFFSETQZSS &&
    386405        ii < CLOCKORBIT_OFFSETQZSS + _codeBias.NumberOfSat[CLOCKORBIT_SATQZSS]) {
    387       sysCh = 'J';
     406      sys = 'J';
     407      flag = t_eph::LNAV;
    388408    }
    389409    else if (ii >= CLOCKORBIT_OFFSETSBAS &&
    390410        ii < CLOCKORBIT_OFFSETSBAS + _codeBias.NumberOfSat[CLOCKORBIT_SATSBAS]) {
    391       sysCh = 'S';
     411      sys = 'S';
     412      flag = t_eph::SBASL1;
    392413    }
    393414    else if (ii >= CLOCKORBIT_OFFSETBDS &&
    394415        ii < CLOCKORBIT_OFFSETBDS + _codeBias.NumberOfSat[CLOCKORBIT_SATBDS]) {
    395       sysCh = 'C';
     416      sys = 'C';
     417      if (num < 6) {// GEO
     418        flag = t_eph::D2;
     419      }
     420      else if (num > 58 && num < 63) { // GEO
     421        flag = t_eph::D2;
     422      }
     423      else {
     424        flag = t_eph::D1;
     425      }
    396426    }
    397427    else {
     
    399429    }
    400430    t_satCodeBias satCodeBias;
    401     satCodeBias._prn.set(sysCh, _codeBias.Sat[ii].ID);
     431    satCodeBias._prn.set(sys, num, flag);
    402432    satCodeBias._staID     = _staID.toStdString();
    403433    satCodeBias._time      = _lastTime;
     
    406436      const SsrCorr::CodeBias::BiasSat::CodeBiasEntry& biasEntry = _codeBias.Sat[ii].Biases[jj];
    407437      t_frqCodeBias frqCodeBias;
    408       frqCodeBias._rnxType2ch.assign(_ssrCorr->codeTypeToRnxType(sysCh, biasEntry.Type));
     438      frqCodeBias._rnxType2ch.assign(_ssrCorr->codeTypeToRnxType(sys, biasEntry.Type));
    409439      frqCodeBias._value      = biasEntry.Bias;
    410440      if (!frqCodeBias._rnxType2ch.empty()) {
     
    424454                            + _phaseBias.NumberOfSat[CLOCKORBIT_SATBDS];
    425455    ii++) {
    426     char sysCh = ' ';
     456    char sys = ' ';
     457    int num = _phaseBias.Sat[ii].ID;
     458    int flag = 0;
    427459    if      (ii < _phaseBias.NumberOfSat[CLOCKORBIT_SATGPS]) {
    428       sysCh = 'G';
     460      sys = 'G';
     461      flag = t_eph::LNAV;
    429462    }
    430463    else if (ii >= CLOCKORBIT_OFFSETGLONASS &&
    431464        ii < CLOCKORBIT_OFFSETGLONASS + _phaseBias.NumberOfSat[CLOCKORBIT_SATGLONASS]) {
    432       sysCh = 'R';
     465      sys = 'R';
     466      flag = t_eph::FDMA_M;
    433467    }
    434468    else if (ii >= CLOCKORBIT_OFFSETGALILEO &&
    435469        ii < CLOCKORBIT_OFFSETGALILEO + _phaseBias.NumberOfSat[CLOCKORBIT_SATGALILEO]) {
    436       sysCh = 'E';
     470      sys = 'E';
     471      flag = t_eph::INAV;
    437472    }
    438473    else if (ii >= CLOCKORBIT_OFFSETQZSS &&
    439474        ii < CLOCKORBIT_OFFSETQZSS + _phaseBias.NumberOfSat[CLOCKORBIT_SATQZSS]) {
    440       sysCh = 'J';
     475      sys = 'J';
     476      flag = t_eph::LNAV;
    441477    }
    442478    else if (ii >= CLOCKORBIT_OFFSETSBAS &&
    443479        ii < CLOCKORBIT_OFFSETSBAS + _phaseBias.NumberOfSat[CLOCKORBIT_SATSBAS]) {
    444       sysCh = 'S';
     480      sys = 'S';
     481      flag = t_eph::SBASL1;
    445482    }
    446483    else if (ii >= CLOCKORBIT_OFFSETBDS &&
    447484        ii < CLOCKORBIT_OFFSETBDS + _phaseBias.NumberOfSat[CLOCKORBIT_SATBDS]) {
    448       sysCh = 'C';
     485      sys = 'C';
     486      if (num < 6) {// GEO
     487        flag = t_eph::D2;
     488      }
     489      else if (num > 58 && num < 63) { // GEO
     490        flag = t_eph::D2;
     491      }
     492      else {
     493        flag = t_eph::D1;
     494      }
    449495    }
    450496    else {
     
    452498    }
    453499    t_satPhaseBias satPhaseBias;
    454     satPhaseBias._prn.set(sysCh, _phaseBias.Sat[ii].ID);
     500    satPhaseBias._prn.set(sys, num, flag);
    455501    satPhaseBias._staID      = _staID.toStdString();
    456502    satPhaseBias._time       = _lastTime;
     
    463509      const SsrCorr::PhaseBias::PhaseBiasSat::PhaseBiasEntry& biasEntry = _phaseBias.Sat[ii].Biases[jj];
    464510      t_frqPhaseBias frqPhaseBias;
    465       frqPhaseBias._rnxType2ch.assign(_ssrCorr->codeTypeToRnxType(sysCh, biasEntry.Type));
     511      frqPhaseBias._rnxType2ch.assign(_ssrCorr->codeTypeToRnxType(sys, biasEntry.Type));
    466512      frqPhaseBias._value                = biasEntry.Bias;
    467513      frqPhaseBias._fixIndicator         = biasEntry.SignalIntegerIndicator;
  • trunk/BNC/src/RTCM3/RTCM3coDecoder.h

    r10572 r10599  
    3333#include "../RTCM3/clock_and_orbit/clock_orbit_igs.h"
    3434#include "../RTCM3/clock_and_orbit/clock_orbit_rtcm.h"
     35#include "ephemeris.h"
    3536
    3637  class RTCM3coDecoder : public QObject, public GPSDecoder {
  • trunk/BNC/src/bncutils.cpp

    r10587 r10599  
    10231023}
    10241024
    1025 // Extracts k bits from position p and returns the extracted value as integer
    1026 ////////////////////////////////////////////////////////////////////////////
    1027 int bitExtracted(int number, int k, int p) {
    1028   return (((1 << k) - 1) & (number >> (p - 1)));
     1025// Extracts k bits from position pos and returns the extracted value as unsigned int
     1026////////////////////////////////////////////////////////////////////////////
     1027unsigned bitExtracted(unsigned number, unsigned k, unsigned pos) {
     1028  // Right shift 'num' by 'pos' bits
     1029  unsigned shifted = number >> pos;
     1030
     1031  // Create a mask with 'k' bits set to 1
     1032  unsigned mask = (1 << k) - 1;
     1033
     1034  // Apply the mask to the shifted number
     1035  return shifted & mask;
    10291036}
    10301037
  • trunk/BNC/src/bncutils.h

    r10587 r10599  
    169169// Extracts k bits from position p and returns the extracted value as integer
    170170///////////////////////////////////////////////////////////////////
    171 int bitExtracted(int number, int k, int p);
     171unsigned bitExtracted(unsigned number, unsigned k, unsigned p);
    172172
    173173
  • trunk/BNC/src/combination/bnccomb.cpp

    r10548 r10599  
    238238      int nextPar = 0;
    239239      char sys = itSys.key();
    240       unsigned maxPrn = itSys.value();
    241       unsigned flag = 0;
    242       if (sys == 'E') {
    243         flag = 1;
    244       }
     240      int maxPrn = itSys.value();
    245241      // AC
    246242      QListIterator<cmbAC*> itAc(_ACs);
     
    248244        cmbAC* AC = itAc.next();
    249245        _params[sys].push_back(new cmbParam(cmbParam::offACgnss, ++nextPar, AC->name, ""));
    250         for (unsigned iGnss = 1; iGnss <= maxPrn; iGnss++) {
     246        for (int iGnss = 1; iGnss <= maxPrn; iGnss++) {
     247          int flag = t_corrSSR::getSsrNavTypeFlag(sys, iGnss);
    251248          QString prn = QString("%1%2_%3").arg(sys).arg(iGnss, 2, 10, QChar('0')).arg(flag);
    252249          _params[sys].push_back(new cmbParam(cmbParam::offACSat, ++nextPar, AC->name, prn));
    253250        }
    254251      }
    255       for (unsigned iGnss = 1; iGnss <= maxPrn; iGnss++) {
     252      for (int iGnss = 1; iGnss <= maxPrn; iGnss++) {
     253        int flag = t_corrSSR::getSsrNavTypeFlag(sys, iGnss);
    256254        QString prn = QString("%1%2_%3").arg(sys).arg(iGnss, 2, 10, QChar('0')).arg(flag);
    257255        _params[sys].push_back(new cmbParam(cmbParam::clkSat, ++nextPar, "", prn));
     
    680678    const t_clkCorr& clkCorr = clkCorrVec[ii];
    681679    QString    staID(clkCorr._staID.c_str());
    682     QString    prn(clkCorr._prn.toInternalString().c_str());
     680    QString    prnStr(clkCorr._prn.toInternalString().c_str());
    683681    char       sys = clkCorr._prn.system();
    684682
     
    700698    // ---------------------
    701699    _newCorr                = new cmbCorr();
    702     _newCorr->_prn          = prn;
     700    _newCorr->_prn          = prnStr;
    703701    _newCorr->_time         = clkCorr._time;
    704702    _newCorr->_iod          = clkCorr._iod;
     
    727725    // Check the Ephemeris
    728726    //--------------------
    729     t_eph* ephLast = _ephUser.ephLast(prn);
    730     t_eph* ephPrev = _ephUser.ephPrev(prn);
     727    t_eph* ephLast = _ephUser.ephLast(prnStr);
     728    t_eph* ephPrev = _ephUser.ephPrev(prnStr);
    731729    if (ephLast == 0) {
    732730#ifdef BNC_DEBUG_CMB
    733       emit newMessage("bncComb: eph not found for "  + prn.mid(0,3).toLatin1(), true);
     731      emit newMessage("bncComb: eph not found for "  + prnStr.mid(0,3).toLatin1(), true);
    734732#endif
    735733      delete _newCorr; _newCorr = 0;
     
    741739             ephLast->checkState() == t_eph::unhealthy) {
    742740#ifdef BNC_DEBUG_CMB
    743       emit newMessage("bncComb: ephLast not ok (checkState: " +  ephLast->checkStateToString().toLatin1() + ") for "  + prn.mid(0,3).toLatin1(), true);
     741      emit newMessage("bncComb: ephLast not ok (checkState: " +  ephLast->checkStateToString().toLatin1() + ") for "  + prnStr.mid(0,3).toLatin1(), true);
    744742#endif
    745743      delete _newCorr; _newCorr = 0;
     
    759757      else {
    760758#ifdef BNC_DEBUG_CMB
    761         emit newMessage("bncComb: eph not found for "  + prn.mid(0,3).toLatin1() +
     759        emit newMessage("bncComb: eph not found for "  + prnStr.mid(0,3).toLatin1() +
    762760                        QString(" with IOD %1").arg(_newCorr->_iod).toLatin1(), true);
    763761#endif
     
    806804    bool available = false;
    807805    while (itCorr.hasNext()) {
    808       cmbCorr* corr = itCorr.next();
    809       QString  prn  = corr->_prn;
     806      cmbCorr* corr   = itCorr.next();
     807      QString  prnStr = corr->_prn;
    810808      QString  acName = corr->_acName;
    811809      if (_newCorr->_acName == acName &&
    812           _newCorr->_prn == prn) {
     810          _newCorr->_prn == prnStr) {
    813811        available = true;
    814812      }
     
    12631261      }
    12641262    }
    1265     unsigned flag = 0;
    1266     if (sys == 'E') {
    1267       flag = 1;
    1268     }
    12691263//    if (sys == 'R') {
    12701264//      return success;
     
    12731267    // GNSS
    12741268    for (unsigned iGnss = 1; iGnss <= _cmbSysPrn[sys]; iGnss++) {
     1269      int flag = t_corrSSR::getSsrNavTypeFlag(sys, iGnss);
    12751270      QString prn = QString("%1%2_%3").arg(sys).arg(iGnss, 2, 10, QChar('0')).arg(flag);
    12761271      ++iCond;
     
    13111306    QMutableVectorIterator<cmbCorr*> it(corrs(sys));
    13121307    while (it.hasNext()) {
    1313       cmbCorr* corr = it.next();
    1314       QString  prn  = corr->_prn;
     1308      cmbCorr* corr    = it.next();
     1309      QString  prnStr  = corr->_prn;
    13151310      bool foundMaster = false;
    13161311      QVectorIterator<cmbCorr*> itHlp(corrs(sys));
     
    13191314        QString  prnHlp  = corrHlp->_prn;
    13201315        QString  ACHlp   = corrHlp->_acName;
    1321         if (ACHlp == _masterOrbitAC[sys] && prn == prnHlp) {
     1316        if (ACHlp == _masterOrbitAC[sys] && prnStr == prnHlp) {
    13221317          foundMaster = true;
    13231318          break;
     
    16381633  while (it.hasNext()) {
    16391634    string prnStr = it.next().toLatin1().data();
    1640     if (prnStr == prn.toString() || prnStr == prn.toString().substr(0,1)) {
     1635    if (prnStr == prn.toString() ||              // prn
     1636        prnStr == prn.toString().substr(0,1)) {  // sys
    16411637      return true;
    16421638    }
  • trunk/BNC/src/ephemeris.cpp

    r10587 r10599  
    109109//
    110110//////////////////////////////////////////////////////////////////////////////
    111 void t_eph::setType(QString typeStr) {
    112 
    113   if (typeStr == "LNAV") {
    114     _type = t_eph::LNAV;
    115   } else if (typeStr == "FDMA") {
    116     _type = t_eph::FDMA;
    117   } else if (typeStr == "FNAV") {
    118     _type = t_eph::FNAV;
    119   } else if (typeStr == "INAV") {
    120     _type = t_eph::INAV;
    121   } else if (typeStr == "D1") {
    122     _type = t_eph::D1;
    123   } else if (typeStr == "D2") {
    124     _type = t_eph::D2;
    125   } else if (typeStr == "SBAS") {
    126     _type = t_eph::SBASL1;
    127   } else if (typeStr == "CNAV") {
    128     _type = t_eph::CNAV;
    129   } else if (typeStr == "CNV1") {
    130     _type = t_eph::CNV1;
    131   } else if (typeStr == "CNV2") {
    132     _type = t_eph::CNV2;
    133   } else if (typeStr == "CNV3") {
    134     _type = t_eph::CNV3;
    135   } else if (typeStr == "L1NV") {
    136     _type = t_eph::L1NV;
    137   } else if (typeStr == "L1OC") {
    138     _type = t_eph::L1OC;
    139   } else if (typeStr == "L3OC") {
    140     _type = t_eph::L3OC;
    141   } else {
    142     _type = t_eph::undefined;
    143   }
    144 
    145 }
    146 
    147 //
    148 //////////////////////////////////////////////////////////////////////////////
    149111QString t_eph::typeStr(e_type type, const t_prn &prn, double version) {
    150112  QString typeStr = "";
     
    173135      break;
    174136    case FDMA:
     137    case FDMA_M:
    175138      typeStr = epochStart + ephStr + "FDMA" + eolStr;
    176139      break;
     
    317280      }
    318281
    319       in >> year >> month >> day >> hour >> min >> sec;
    320282      if (       prnStr.at(0) == 'G') {
    321283        _prn.set('G', prnStr.mid(1).toInt());
     
    327289        _prn.set('G', prnStr.toInt());
    328290      }
     291      _prn.setFlag(type());
     292
     293      in >> year >> month >> day >> hour >> min >> sec;
    329294
    330295      if (year < 80) {
     
    577542          _flags_unknown = false;
    578543          // Bit 0:
    579           _intSF      = double(bitExtracted(int(statusflags), 1, 0));
     544          _intSF      = double(bitExtracted(unsigned(statusflags), 1, 0));
    580545          // Bit 1:
    581           _L2Cphasing = double(bitExtracted(int(statusflags), 1, 1));
     546          _L2Cphasing = double(bitExtracted(unsigned(statusflags), 1, 1));
    582547          // Bit 2:
    583           _alert      = double(bitExtracted(int(statusflags), 1, 2));
     548          _alert      = double(bitExtracted(unsigned(statusflags), 1, 2));
    584549        }
    585550      }
     
    10991064        prnStr.append(n);
    11001065      }
    1101       in >> year >> month >> day >> hour >> min >> sec;
     1066
    11021067      if (prnStr.at(0) == 'R') {
    11031068        _prn.set('R', prnStr.mid(1).toInt());
     
    11061071      }
    11071072
     1073      in >> year >> month >> day >> hour >> min >> sec;
    11081074      if (year < 80) {
    11091075        year += 2000;
     
    11421108    // =====================
    11431109    else if (iLine == 2) {
    1144       if (type() == t_eph::FDMA ||
    1145           type() == t_eph::undefined) {
     1110      if (type() == t_eph::FDMA) {
    11461111        if (   readDbl(line, pos[0], fieldLen, _y_pos)
    11471112            || readDbl(line, pos[1], fieldLen, _y_vel)
     
    11671132    // =====================
    11681133    else if (iLine == 3) {
    1169       if (type() == t_eph::FDMA ||
    1170           type() == t_eph::undefined) {
     1134      if (type() == t_eph::FDMA) {
    11711135        if (   readDbl(line, pos[0], fieldLen, _z_pos)
    11721136            || readDbl(line, pos[1], fieldLen, _z_vel)
     
    12001164    // =====================
    12011165    else if (iLine == 4) {
    1202       if (type() == t_eph::FDMA ||
    1203           type() == t_eph::undefined){
     1166      if (type() == t_eph::FDMA) {
    12041167        if (readDbl(line, pos[0], fieldLen, statusflags)) {
    12051168          //status flags BLK, do nothing
     
    12351198            _M_delta_tau = 0.0;
    12361199          }
     1200          else {
     1201            _type = t_eph::FDMA_M;
     1202          }
    12371203        }
    12381204        if (   readDbl(line, pos[1], fieldLen, _M_delta_tau)
     
    13351301  }
    13361302
     1303  _prn.setFlag(type());
     1304
    13371305  // Initialize status vector
    13381306  // ------------------------
     
    14331401  // BROADCAST ORBIT - 2
    14341402  // =====================
    1435   if (type() == t_eph::FDMA) {
     1403  if (type() == t_eph::FDMA ||
     1404      type() == t_eph::FDMA_M) {
    14361405    out
    14371406        << QString(fmt)
     
    14521421  // BROADCAST ORBIT - 3
    14531422  // =====================
    1454   if (type() == t_eph::FDMA) {
     1423  if (type() == t_eph::FDMA ||
     1424      type() == t_eph::FDMA_M) {
    14551425    out
    14561426        << QString(fmt)
     
    14801450    // BROADCAST ORBIT - 4
    14811451    // =====================
    1482     if (type() == t_eph::FDMA){
     1452    if (type() == t_eph::FDMA ||
     1453        type() == t_eph::FDMA_M){
    14831454      int statusflags = 0;
    14841455      int healthflags = 0;
     
    16811652//////////////////////////////////////////////////////////////////////////////
    16821653t_ephGal::t_ephGal(double rnxVersion, const QStringList &lines) {
    1683   int year, month, day, hour, min;
    1684   double sec;
    1685   QString prnStr;
     1654
    16861655  const int nLines = 8;
     1656
    16871657  if (lines.size() != nLines) {
    16881658    _checkState = bad;
     
    17091679    if (iLine == 0) {
    17101680      QTextStream in(line.left(pos[1]).toLatin1());
    1711       QString n;
     1681
     1682      int year, month, day, hour, min;
     1683      double sec;
     1684
     1685      QString prnStr, n;
    17121686      in >> prnStr;
    17131687      if (prnStr.size() == 1 && prnStr[0] == 'E') {
     
    17151689        prnStr.append(n);
    17161690      }
     1691      if (prnStr.at(0) == 'E') {
     1692        _prn.set('E', prnStr.mid(1).toInt());
     1693      } else {
     1694        _prn.set('E', prnStr.toInt());
     1695      }
     1696
    17171697      in >> year >> month >> day >> hour >> min >> sec;
    17181698      if (year < 80) {
     
    17901770      }
    17911771      else {
    1792         if (bitExtracted(int(datasource), 1, 8)) {
     1772        if (bitExtracted(unsigned(datasource), 1, 8)) {
    17931773          _fnav = true;
     1774          _type = t_eph::FNAV;
    17941775          _inav = false;
    17951776          /* set unused I/NAV values */
     
    17981779          _E1B_DataInvalid = false;
    17991780          _E5b_DataInvalid = false;
    1800           // Source RINEX version < 4
    1801           if (type() == t_eph::undefined) {
    1802             _type = t_eph::FNAV;
    1803           }
    1804         }
    1805         if (bitExtracted(int(datasource), 1, 9)) {
     1781        }
     1782        if (bitExtracted(unsigned(datasource), 1, 9)) {
    18061783          _fnav = false;
    18071784          _inav = true;
     1785          _type = t_eph::INAV;
    18081786          /* set unused F/NAV values */
    18091787          _E5a_HS = 0.0;
    18101788          _E5a_DataInvalid = false;
    1811           // Source RINEX version < 4
    1812           if (type() == t_eph::undefined) {
    1813             _type = t_eph::INAV;
    1814           }
    18151789        }
    18161790        // GAL week # in RINEX is aligned/identical to continuous GPS week # used in RINEX
     
    18451819          _BGD_1_5B = 0.0;
    18461820        }
    1847         if (prnStr.at(0) == 'E') {
    1848           _prn.set('E', prnStr.mid(1).toInt(), _inav ? 1 : 0);
    1849         }
    18501821      }
    18511822    }
     
    18601831    }
    18611832  }
     1833  _prn.setFlag(type());
    18621834}
    18631835
     
    21742146        prnStr.append(n);
    21752147      }
    2176       in >> year >> month >> day >> hour >> min >> sec;
    21772148      if (prnStr.at(0) == 'S') {
    21782149        _prn.set('S', prnStr.mid(1).toInt());
     
    21802151        _prn.set('S', prnStr.toInt());
    21812152      }
     2153      _prn.setFlag(type());
     2154
     2155      in >> year >> month >> day >> hour >> min >> sec;
    21822156
    21832157      if (year < 80) {
     
    24172391        prnStr.append(n);
    24182392      }
    2419       in >> year >> month >> day >> hour >> min >> sec;
    24202393      if (prnStr.at(0) == 'C') {
    24212394        _prn.set('C', prnStr.mid(1).toInt());
     
    24242397      }
    24252398
     2399      in >> year >> month >> day >> hour >> min >> sec;
    24262400      if (year < 80) {
    24272401        year += 2000;
     
    26542628    }
    26552629  }
     2630  _prn.setFlag(type());
    26562631
    26572632  _TOE.setBDS(int(_BDTweek), _TOEsec);
  • trunk/BNC/src/ephemeris.h

    r10587 r10599  
    1818  enum e_system {unknown, GPS, QZSS, GLONASS, Galileo, SBAS, BDS, IRNSS};
    1919  enum e_checkState {unchecked, ok, bad, outdated, unhealthy};
    20   enum e_type {undefined, LNAV, FDMA, FNAV, INAV, D1, D2, SBASL1, CNAV, CNV1, CNV2, CNV3, L1NV, L1OC, L3OC};
     20  enum e_type {undefined, LNAV, FDMA, FDMA_M, FNAV, INAV, D1, D2, SBASL1, CNAV, CNV1, CNV2, CNV3, L1NV, L1OC, L3OC};
    2121
    2222  t_eph();
     
    4343  }
    4444  e_type type() const {return _type;}
    45   void setType(QString typeStr);
    46 
    47   t_prn prn() const {return _prn;}
     45  t_prn  prn()  const {return _prn;}
    4846  t_irc getCrd(const bncTime& tt, ColumnVector& xc, ColumnVector& vv, bool useCorr) const;
    4947  void setOrbCorr(const t_orbCorr* orbCorr);
     
    292290  virtual unsigned int isUnhealthy() const;
    293291  virtual int slotNum() const {return int(_frq_num);}
    294 
     292  virtual bool validMdata() const {return (_M_M ? true : false);}
    295293 private:
    296294  virtual t_irc position(int GPSweek, double GPSweeks, double* xc, double* vv) const;
    297295  static ColumnVector glo_deriv(double /* tt */, const ColumnVector& xv, double* acc);
    298296
    299   mutable bncTime      _tt;   // time
    300   mutable ColumnVector _xv;   // status vector (position, velocity) at time _tt
     297  mutable bncTime      _tt;    // time
     298  mutable ColumnVector _xv;    // status vector (position, velocity) at time _tt
    301299
    302300  double  _gps_utc;            // [s]
  • trunk/BNC/src/rinex/corrfile.cpp

    r8204 r10599  
    3535 * Created:    12-Feb-2012
    3636 *
    37  * Changes:   
     37 * Changes:
    3838 *
    3939 * -----------------------------------------------------------------------*/
     
    9898      while (it.hasNext()) {
    9999        const t_orbCorr& corr = it.next();
    100         _corrIODs[QString(corr._prn.toInternalString().c_str())] = corr._iod;
     100        QString corrPrn = QString(corr._prn.toInternalString().c_str());
     101        _corrIODs[corrPrn] = corr._iod;
    101102      }
    102103      emit newOrbCorrections(orbCorrList);
  • trunk/BNC/src/rinex/rnxnavfile.cpp

    r10587 r10599  
    303303
    304304    if (eph) {
    305       eph->setType(navType);
    306305      _ephs.push_back(eph);
    307306    }
     
    321320    while (itIOD.hasNext()) {
    322321      itIOD.next();
    323       QString prn = itIOD.key();
    324       unsigned int iod = itIOD.value();
     322      QString      corrPrn = itIOD.key();
     323      unsigned int corrIod = itIOD.value();
    325324      vector<t_eph*>::iterator it = _ephs.begin();
    326325      while (it != _ephs.end()) {
    327326        t_eph* eph = *it;
    328327        double dt = eph->TOC() - tt;
    329         if (dt < 8*3600.0 && QString(eph->prn().toInternalString().c_str()) == prn && eph->IOD() == iod) {
     328        QString      ephPrn = QString(eph->prn().toInternalString().c_str());
     329        unsigned int ephIod = eph->IOD();
     330        if (dt < 8*3600.0 &&
     331            ephPrn == corrPrn &&
     332            ephIod == corrIod) {
    330333          it = _ephs.erase(it);
    331334          return eph;
     
    343346      t_eph* eph = *it;
    344347      double dt = eph->TOC() - tt;
    345       if (dt < 2*3600.0) {
     348      char sys = eph->prn().system();
     349      int  num = eph->prn().number();
     350      int ssrNavType = t_corrSSR::getSsrNavTypeFlag(sys, num);
     351      if (dt < 2*3600.0 && eph->type() == ssrNavType) {
    346352        it = _ephs.erase(it);
    347353        return eph;
  • trunk/BNC/src/rinex/rnxobsfile.cpp

    r10561 r10599  
    12241224      line = _stream->readLine();
    12251225      t_prn prn; prn.set(line.left(3).toLatin1().data());
     1226      char sys = prn.system();
     1227      int num  = prn.number();
     1228      int flag = t_corrSSR::getSsrNavTypeFlag(sys, num);
     1229      prn.setFlag(flag);
    12261230      _currEpo.rnxSat[iSat].prn = prn;
    1227       char sys = prn.system();
    12281231      for (int iType = 0; iType < _header.nTypes(sys); iType++) {
    12291232        int pos = 3 + 16*iType;
     
    13091312        sys = 'G';
    13101313      }
    1311       int satNum; readInt(line, pos + 1, 2, satNum);
    1312       _currEpo.rnxSat[iSat].prn.set(sys, satNum);
     1314      int num; readInt(line, pos + 1, 2, num);
     1315      int flag = t_corrSSR::getSsrNavTypeFlag(sys, num);
     1316      t_prn prn;
     1317      prn.set(sys, num, flag);
     1318      _currEpo.rnxSat[iSat].prn = prn;
    13131319
    13141320      pos += 3;
     
    15931599                                 const t_rnxObsFile::t_rnxSat& rnxSat, t_satObs& obs) {
    15941600  obs._staID = rnxObsFile->markerName().toLatin1().constData();
     1601  obs._time  = epo->tt;
    15951602  obs._prn   = rnxSat.prn;
    1596   obs._time  = epo->tt;
    1597 
    1598   char sys   = rnxSat.prn.system();
     1603
     1604  char sys  = obs._prn.system();
     1605  int  num  = obs._prn.number();
     1606  int  flag = t_corrSSR::getSsrNavTypeFlag(sys, num);
     1607  obs._prn.setFlag(flag);
    15991608
    16001609  QChar addToL2;
  • trunk/BNC/src/satObs.cpp

    r10565 r10599  
    6464
    6565    in >> corr._prn >> corr._iod >> corr._dClk >> corr._dotDClk >> corr._dotDotDClk;
    66     if (corr._prn.system() == 'E') {
    67       corr._prn.setFlags(1);// I/NAV
    68     }
     66
     67    char sys = corr._prn.system();
     68    int num  = corr._prn.number();
     69    int flag = t_corrSSR::getSsrNavTypeFlag(sys, num);
     70    corr._prn.setFlag(flag);
     71
    6972    corr._dClk       /= (t_CST::c);
    7073    corr._dotDClk    /= (t_CST::c * 1.e3);
     
    137140       >> corr._dotXr[0] >> corr._dotXr[1] >> corr._dotXr[2];
    138141
     142    char sys = corr._prn.system();
     143    int num  = corr._prn.number();
     144    int flag = t_corrSSR::getSsrNavTypeFlag(sys, num);
     145    corr._prn.setFlag(flag);
     146
    139147    corr._dotXr[0] /= 1.e3; // mm/s => m/s
    140148    corr._dotXr[1] /= 1.e3; // mm/s => m/s
    141149    corr._dotXr[2] /= 1.e3; // mm/s => m/s
    142150
    143     if (corr._prn.system() == 'E') {
    144       corr._prn.setFlags(1);// I/NAV
    145     }
    146151    corrList.push_back(corr);
    147152  }
     
    201206    in >> corr._prn >> corr._iod >> corr._ura;
    202207
     208    char sys = corr._prn.system();
     209    int num  = corr._prn.number();
     210    int flag = t_corrSSR::getSsrNavTypeFlag(sys, num);
     211    corr._prn.setFlag(flag);
     212
    203213    corrList.push_back(corr);
    204214  }
     
    255265    int numBias;
    256266    in >> satCodeBias._prn >> numBias;
     267
     268    char sys = satCodeBias._prn.system();
     269    int num  = satCodeBias._prn.number();
     270    int flag = t_corrSSR::getSsrNavTypeFlag(sys, num);
     271    satCodeBias._prn.setFlag(flag);
    257272
    258273    while (in.good()) {
     
    338353    satPhaseBias._yaw = yawDeg * M_PI / 180.0;
    339354    satPhaseBias._yawRate = yawDegRate * M_PI / 180.0;
     355
     356    char sys = satPhaseBias._prn.system();
     357    int num  = satPhaseBias._prn.number();
     358    int flag = t_corrSSR::getSsrNavTypeFlag(sys, num);
     359    satPhaseBias._prn.setFlag(flag);
    340360
    341361    while (in.good()) {
     
    460480  return unknown;
    461481}
     482
     483// Set NAV type to force NAVtype usage according SSR standard
     484/////////////////////////////////////////////////////////////
     485t_eph::e_type  t_corrSSR::getSsrNavTypeFlag(char sys, int num) {
     486
     487  t_eph::e_type flag = t_eph::undefined;
     488
     489  switch (sys) {
     490    case 'G':
     491    case 'J':
     492      flag = t_eph::LNAV;
     493      break;
     494    case 'R':
     495      flag = t_eph::FDMA_M;
     496      break;
     497    case 'E':
     498      flag = t_eph::INAV;
     499      break;
     500    case 'C':
     501      if (num < 6) {// GEO
     502        flag = t_eph::D2;
     503      }
     504      else if (num > 58 && num < 63) { // GEO
     505        flag = t_eph::D2;
     506      }
     507      else {
     508        flag = t_eph::D1;
     509      }
     510      break;
     511    case 'S':
     512      flag = t_eph::SBASL1;
     513      break;
     514  }
     515
     516  return flag;
     517}
  • trunk/BNC/src/satObs.h

    r10228 r10599  
    1111#include "bnctime.h"
    1212#include "t_prn.h"
     13#include "ephemeris.h"
    1314
    1415class t_frqObs  {
     
    8586  t_prn                  _prn;
    8687  bncTime                _time;
    87   int                    _type;
     88  int                    _type; // MT
    8889  std::vector<t_frqObs*> _obs;
    8990};
     
    220221  static e_type readEpoLine(const std::string& line, bncTime& epoTime,
    221222                            unsigned int& updateInt, int& numEntries, std::string& staID);
    222 };
    223 
     223  static t_eph::e_type getSsrNavTypeFlag(char sys, int num);
     224};
    224225#endif
  • trunk/BNC/src/t_prn.cpp

    r8168 r10599  
    4646string t_prn::toInternalString() const {
    4747  stringstream ss;
    48   ss << _system << setfill('0') << setw(2) << _number << '_' << _flags;
     48  ss << _system << setfill('0') << setw(2) << _number << '_' << _flag;
    4949  return ss.str();
    5050}
  • trunk/BNC/src/t_prn.h

    r10518 r10599  
    1717
    1818  t_prn() :
    19       _system('G'), _number(0), _flags(0) {
     19      _system('G'), _number(0), _flag(0) {
    2020  }
    2121  t_prn(char system, int number) :
    22       _system(system), _number(number), _flags(0) {
     22      _system(system), _number(number), _flag(0) {
    2323  }
    2424
    25   t_prn(char system, int number, int flags) :
    26       _system(system), _number(number), _flags(flags) {
     25  t_prn(char system, int number, int flag) :
     26      _system(system), _number(number), _flag(flag) {
    2727  }
    2828
     
    3333    _system = system;
    3434    _number = number;
    35     _flags  = 0;
     35    _flag  = 0;
    3636  }
    3737
    38   void set(char system, int number, int flags) {
     38  void set(char system, int number, int flag) {
    3939    _system = system;
    4040    _number = number;
    41     _flags  = flags;
     41    _flag  = flag;
    4242  }
    4343
    44   void setFlags(int flags) {
    45     _flags  = flags;
     44  void setFlag(int flag) {
     45    _flag  = flag;
    4646  }
    4747
     
    5454    return _number;
    5555  }
    56   int flags() const {
    57     return _flags;
     56  int flag() const {
     57    return _flag;
    5858  }
    5959  int toInt() const;
     
    6464    if (_system == prn2._system &&
    6565        _number == prn2._number &&
    66         _flags  == prn2._flags) {
     66        _flag   == prn2._flag) {
    6767      return true;
    6868    }
     
    7878    _system = 'G';
    7979    _number = 0;
    80     _flags = 0;
     80    _flag = 0;
    8181  }
    8282
     
    8787private:
    8888  char _system;
    89   int _number;
    90   int _flags;
     89  int  _number;
     90  int  _flag;
    9191};
    9292
  • trunk/BNC/src/upload/bncrtnetuploadcaster.cpp

    r10548 r10599  
    461461  }
    462462
    463 
    464463  struct SsrCorr::CodeBias bias;
    465464  memset(&bias, 0, sizeof(bias));
     
    526525    ColumnVector rtnClk; rtnClk.ReSize(3); rtnClk = 0.0;          // [m, m/s, m/s²]
    527526    ColumnVector rtnClkSig; rtnClkSig.ReSize(3); rtnClkSig = 0.0; // [m, m/s, m/s²]
    528     t_prn prn;
    529527
    530528    QTextStream in(epochLines[ii].toLatin1());
     
    560558    }
    561559    // satellite specific parameters
     560    t_prn prn;
    562561    char sys = key.mid(0, 1).at(0).toLatin1();
    563     int number = key.mid(1, 2).toInt();
    564     int flags = 0;
    565     if (sys == 'E') { // I/NAV
    566       flags = 1;
    567     }
    568     if (number == 0) {
     562    int  num = key.mid(1, 2).toInt();
     563    int flag = t_corrSSR::getSsrNavTypeFlag(sys, num);
     564    if (!num) {
    569565      continue;
    570566    }
    571     prn.set(sys, number, flags);
     567    prn.set(sys, num, flag);
    572568    QString prnInternalStr = QString::fromStdString(prn.toInternalString());
    573     QString prnStr = QString::fromStdString(prn.toString());
     569    QString prnStr         = QString::fromStdString(prn.toString());
    574570
    575571    const t_eph* ephLast = _ephUser->ephLast(prnInternalStr);
Note: See TracChangeset for help on using the changeset viewer.