Ignore:
Timestamp:
Nov 3, 2021, 4:05:36 PM (2 years ago)
Author:
stuerze
Message:

code biases added to use them later on

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/combination/bnccomb.cpp

    r9296 r9529  
    355355}
    356356
    357 // Process clock corrections
    358 ////////////////////////////////////////////////////////////////////////////
    359 void bncComb::slotNewClkCorrections(QList<t_clkCorr> clkCorrections) {
     357// Remember satllite code biases
     358////////////////////////////////////////////////////////////////////////////
     359void bncComb::slotNewCodeBiases(QList<t_satCodeBias> codeBiases) {
    360360  QMutexLocker locker(&_mutex);
    361361
    362   bncTime lastTime;
    363 
    364   for (int ii = 0; ii < clkCorrections.size(); ii++) {
    365     t_clkCorr& clkCorr = clkCorrections[ii];
    366     QString    staID(clkCorr._staID.c_str());
    367     QString    prn(clkCorr._prn.toInternalString().c_str());
    368     char       sys = clkCorr._prn.system();
     362  for (int ii = 0; ii < codeBiases.size(); ii++) {
     363    t_satCodeBias& codeBias = codeBiases[ii];
     364    QString    staID(codeBias._staID.c_str());
     365    QString    prn(codeBias._prn.toInternalString().c_str());
     366    char       sys = codeBias._prn.system();
    369367
    370368    if (!_cmbSysPrn.contains(sys)){
    371369      continue;
    372     }
    373 
    374     // Set the last time
    375     // -----------------
    376     if (lastTime.undef() || clkCorr._time > lastTime) {
    377       lastTime = clkCorr._time;
    378370    }
    379371
     
    393385    }
    394386
     387    // Store the correction
     388    // --------------------
     389    QMap<t_prn, t_satCodeBias>& storage = _satCodeBiases[acName];
     390    storage[codeBias._prn] = codeBias;
     391  }
     392}
     393
     394// Process clock corrections
     395////////////////////////////////////////////////////////////////////////////
     396void bncComb::slotNewClkCorrections(QList<t_clkCorr> clkCorrections) {
     397  QMutexLocker locker(&_mutex);
     398
     399  bncTime lastTime;
     400
     401  for (int ii = 0; ii < clkCorrections.size(); ii++) {
     402    t_clkCorr& clkCorr = clkCorrections[ii];
     403    QString    staID(clkCorr._staID.c_str());
     404    QString    prn(clkCorr._prn.toInternalString().c_str());
     405    char       sys = clkCorr._prn.system();
     406
     407    if (!_cmbSysPrn.contains(sys)){
     408      continue;
     409    }
     410
     411    // Set the last time
     412    // -----------------
     413    if (lastTime.undef() || clkCorr._time > lastTime) {
     414      lastTime = clkCorr._time;
     415    }
     416
     417    // Find/Check the AC Name
     418    // ----------------------
     419    QString acName;
     420    QListIterator<cmbAC*> icAC(_ACs);
     421    while (icAC.hasNext()) {
     422      cmbAC* AC = icAC.next();
     423      if (AC->mountPoint == staID) {
     424        acName = AC->name;
     425        break;
     426      }
     427    }
     428    if (acName.isEmpty()) {
     429      continue;
     430    }
     431
    395432    // Check Modulo Time
    396433    // -----------------
     
    431468      else {
    432469        newCorr->_orbCorr = storage[clkCorr._prn];
     470      }
     471    }
     472
     473    // Check satellite code biases
     474    // ----------------------------
     475    if (!_satCodeBiases.contains(acName)) {
     476      delete newCorr;
     477      continue;
     478    }
     479    else {
     480      QMap<t_prn, t_satCodeBias>& storage = _satCodeBiases[acName];
     481      if (!storage.contains(clkCorr._prn)) {
     482        delete newCorr;
     483        continue;
     484      }
     485      else {
     486        newCorr->_satCodeBias = storage[clkCorr._prn];
    433487      }
    434488    }
Note: See TracChangeset for help on using the changeset viewer.