Changeset 10116 in ntrip for trunk/BNC/src


Ignore:
Timestamp:
Jul 3, 2023, 11:30:51 PM (11 months ago)
Author:
stuerze
Message:

minor changes

Location:
trunk/BNC/src/combination
Files:
2 edited

Legend:

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

    r10109 r10116  
    174174      newAC->name         = hlp[1];
    175175      newAC->weightFactor = hlp[2].toDouble();
     176      newAC->isAPC = (newAC->mountPoint.mid(0,4) =="SSRA");
    176177      QMapIterator<char, unsigned> itSys(_cmbSysPrn);
    177178      // init
     
    179180        itSys.next();
    180181        char sys = itSys.key();
    181         if (_masterOrbitAC.isEmpty()) {
     182        if (!_masterOrbitAC.contains(sys)) {
    182183          _masterOrbitAC[sys] = newAC->name;
     184          _masterIsAPC[sys]   = newAC->isAPC;
    183185        }
    184186      }
     
    465467    // ----------------------
    466468    QString acName;
     469    bool isAPC;
    467470    QString staID(newClk->_staID.c_str());
    468471    QListIterator<cmbAC*> icAC(_ACs);
     
    471474      if (AC->mountPoint == staID) {
    472475        acName = AC->name;
     476        isAPC  = AC->isAPC;
    473477        break;
    474478      }
    475479    }
    476     if (acName.isEmpty()) {
     480    if (acName.isEmpty() || isAPC != _masterIsAPC[sys]) {
    477481      delete newClk;
    478482      continue;
     
    482486    // ----------------------------
    483487    if ((newClk->_time >= currentTime) ||        // future time stamp
    484         (currentTime - newClk->_time) > 120.0) {  // very old data sets
     488        (currentTime - newClk->_time) > 120.0) { // very old data sets
    485489#ifdef BNC_DEBUG_CMB
    486490      emit newMessage("bncComb: very old data sets: " + acName.toLatin1() + " " + newClk->_prn.toString().c_str() +
     
    833837              << epoTime.timestr().c_str()    << "\n";
    834838          _masterOrbitAC[sys] = AC->name;
     839          _masterIsAPC[sys]   = AC->isAPC;
    835840          break;
    836841        }
     
    10611066    // Correction Phase Center --> CoM
    10621067    // -------------------------------
     1068
    10631069    ColumnVector dx(3); dx = 0.0;
     1070    ColumnVector apc(3); apc = 0.0;
     1071    ColumnVector com(3); com = 0.0;
     1072    bool masterIsAPC = true;
    10641073    if (_antex) {
    10651074      double Mjd = epoTime.mjd() + epoTime.daysec()/86400.0;
     1075      char sys = corr->_eph->prn().system();
     1076      masterIsAPC = _masterIsAPC[sys];
    10661077      if (_antex->satCoMcorrection(corr->_prn, Mjd, xc.Rows(1,3), dx) != success) {
    10671078        dx = 0;
    10681079        _log += "antenna not found " + corr->_prn.mid(0,3).toLatin1() + '\n';
    10691080      }
     1081    }
     1082    if (masterIsAPC) {
     1083      apc(1) = xc(1);
     1084      apc(2) = xc(2);
     1085      apc(3) = xc(3);
     1086      com(1) = xc(1)-dx(1);
     1087      com(2) = xc(2)-dx(2);
     1088      com(3) = xc(3)-dx(3);
     1089    }
     1090    else {
     1091      com(1) = xc(1);
     1092      com(2) = xc(2);
     1093      com(3) = xc(3);
     1094      apc(1) = xc(1)+dx(1);
     1095      apc(2) = xc(2)+dx(2);
     1096      apc(3) = xc(3)+dx(3);
    10701097    }
    10711098
     
    10761103                  " Vel 3 %15.4f %15.4f %15.4f"
    10771104                  " CoM 3 %15.4f %15.4f %15.4f",
    1078                   xc(1), xc(2), xc(3),
     1105                  apc(1), apc(2), apc(3),
    10791106                  xc(4) *  t_CST::c,
    10801107                  vv(1), vv(2), vv(3),
    1081                   xc(1)-dx(1), xc(2)-dx(2), xc(3)-dx(3));
     1108                  com(1), com(2), com(3));
    10821109    outLines += hlp;
    10831110    hlp.clear();
  • trunk/BNC/src/combination/bnccomb.h

    r10096 r10116  
    8585      numObs['S']  = 0;
    8686      numObs['I']  = 0;
     87      isAPC = false;
    8788    }
    8889    ~cmbAC() {}
     
    9091    QString  name;
    9192    double   weightFactor;
     93    bool     isAPC;
    9294    QMap<char, unsigned> numObs;
    9395  };
     
    256258  QMap<char, QString>                        _masterOrbitAC;
    257259  QMap<char, unsigned>                       _masterMissingEpochs;
     260  QMap<char, bool>                           _masterIsAPC;
    258261  e_method                                   _method;
    259262  int                                        _cmbSampl;
Note: See TracChangeset for help on using the changeset viewer.