Changeset 3107 in ntrip for trunk


Ignore:
Timestamp:
Mar 22, 2011, 9:58:12 AM (14 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncmodel.cpp

    r3106 r3107  
    143143  _staID   = staID;
    144144
     145  connect(this, SIGNAL(newMessage(QByteArray,bool)),
     146          ((bncApp*)qApp), SLOT(slotMessage(const QByteArray,bool)));
     147
    145148  bncSettings settings;
    146149
     
    189192  }
    190193
    191   connect(this, SIGNAL(newMessage(QByteArray,bool)),
    192           ((bncApp*)qApp), SLOT(slotMessage(const QByteArray,bool)));
    193 
     194  // Several options
     195  // ---------------
    194196  _usePhase = false;
    195197  if ( Qt::CheckState(settings.value("pppUsePhase").toInt()) == Qt::Checked) {
     
    202204  }
    203205
    204   _xcBanc.ReSize(4);  _xcBanc  = 0.0;
    205   _ellBanc.ReSize(3); _ellBanc = 0.0;
    206 
    207   int nextPar = 0;
    208   _params.push_back(new bncParam(bncParam::CRD_X,  ++nextPar, ""));
    209   _params.push_back(new bncParam(bncParam::CRD_Y,  ++nextPar, ""));
    210   _params.push_back(new bncParam(bncParam::CRD_Z,  ++nextPar, ""));
    211   _params.push_back(new bncParam(bncParam::RECCLK, ++nextPar, ""));
    212   if (_estTropo) {
    213     _params.push_back(new bncParam(bncParam::TROPO, ++nextPar, ""));
    214   }
     206  _useGalileo = false;
    215207  if ( Qt::CheckState(settings.value("pppGalileo").toInt()) == Qt::Checked) {
    216     _params.push_back(new bncParam(bncParam::GALILEO_OFFSET, ++nextPar, ""));
     208    _useGalileo = true;
    217209  }
    218210
     
    237229  }
    238230
     231  // Antenna Name, ANTEX File
     232  // ------------------------
    239233  _antex = 0;
    240234  QString antexFileName = settings.value("pppAntex").toString();
     
    248242    else {
    249243      _antennaName = settings.value("pppAntenna").toString();
     244    }
     245  }
     246
     247  // Bancroft Coordinates
     248  // --------------------
     249  _xcBanc.ReSize(4);  _xcBanc  = 0.0;
     250  _ellBanc.ReSize(3); _ellBanc = 0.0;
     251}
     252
     253// Reset
     254////////////////////////////////////////////////////////////////////////////
     255void bncModel::reset() {
     256
     257  for (int iPar = 1; iPar <= _params.size(); iPar++) {
     258    delete _params[iPar-1];
     259  }
     260  _params.clear();
     261
     262  int nextPar = 0;
     263  _params.push_back(new bncParam(bncParam::CRD_X,  ++nextPar, ""));
     264  _params.push_back(new bncParam(bncParam::CRD_Y,  ++nextPar, ""));
     265  _params.push_back(new bncParam(bncParam::CRD_Z,  ++nextPar, ""));
     266  _params.push_back(new bncParam(bncParam::RECCLK, ++nextPar, ""));
     267  if (_estTropo) {
     268    _params.push_back(new bncParam(bncParam::TROPO, ++nextPar, ""));
     269  }
     270  if (_useGalileo) {
     271    _params.push_back(new bncParam(bncParam::GALILEO_OFFSET, ++nextPar, ""));
     272  }
     273
     274  _QQ.ReSize(_params.size());
     275  _QQ = 0.0;
     276  for (int iPar = 1; iPar <= _params.size(); iPar++) {
     277    bncParam* pp = _params[iPar-1];
     278    pp->xx = 0.0;
     279    if      (pp->isCrd()) {
     280      _QQ(iPar,iPar) = _sigCrd0 * _sigCrd0;
     281    }
     282    else if (pp->type == bncParam::RECCLK) {
     283      _QQ(iPar,iPar) = _sigClk0 * _sigClk0;
     284    }
     285    else if (pp->type == bncParam::TROPO) {
     286      _QQ(iPar,iPar) = _sigTrp0 * _sigTrp0;
     287    }
     288    else if (pp->type == bncParam::GALILEO_OFFSET) {
     289      _QQ(iPar,iPar) = _sigGalileoOffset0 * _sigGalileoOffset0;
    250290    }
    251291  }
     
    428468  _time = epoData->tt; // current epoch time
    429469
    430   const double MAXSOLGAP = 60.0;
     470  const double MAXSOLGAP = 10.0;
    431471
    432472  bool firstCrd = false;
     
    434474    firstCrd = true;
    435475    _startTime = epoData->tt;
    436 
    437     unsigned nPar = _params.size();
    438     _QQ.ReSize(nPar);
    439     _QQ = 0.0;
    440     for (int iPar = 1; iPar <= _params.size(); iPar++) {
    441       bncParam* pp = _params[iPar-1];
    442       pp->xx = 0.0;
    443       if      (pp->isCrd()) {
    444         _QQ(iPar,iPar) = _sigCrd0 * _sigCrd0;
    445       }
    446       else if (pp->type == bncParam::RECCLK) {
    447         _QQ(iPar,iPar) = _sigClk0 * _sigClk0;
    448       }
    449       else if (pp->type == bncParam::TROPO) {
    450         _QQ(iPar,iPar) = _sigTrp0 * _sigTrp0;
    451       }
    452       else if (pp->type == bncParam::GALILEO_OFFSET) {
    453         _QQ(iPar,iPar) = _sigGalileoOffset0 * _sigGalileoOffset0;
    454       }
    455     }
     476    reset();
    456477  }
    457478
  • trunk/BNC/bncmodel.h

    r3106 r3107  
    9393
    9494 private:
     95  void   reset();
    9596  void   cmpEle(t_satData* satData);
    9697  void   addAmb(t_satData* satData);
     
    138139  bool                  _usePhase;
    139140  bool                  _estTropo;
     141  bool                  _useGalileo;
    140142  QByteArray            _log;
    141143  QFile*                _nmeaFile;
Note: See TracChangeset for help on using the changeset viewer.