Changeset 3032 in ntrip
- Timestamp:
- Feb 24, 2011, 6:12:38 PM (14 years ago)
- Location:
- trunk/BNC
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncephuser.h
r3029 r3032 69 69 bool dClkSet; 70 70 const t_eph* eph; 71 QString AC;72 71 }; 73 72 -
trunk/BNC/combination/bnccomb.cpp
r3031 r3032 30 30 // Constructor 31 31 //////////////////////////////////////////////////////////////////////////// 32 cmbParam::cmbParam(cmbParam::parType typeIn, int indexIn, 33 const QString& acIn, const QString& prnIn) { 34 type = typeIn; 35 index = indexIn; 36 AC = acIn; 37 prn = prnIn; 32 cmbParam::cmbParam(cmbParam::parType type_, int index_, 33 const QString& ac_, const QString& prn_, 34 double sig_0_, double sig_P_) { 35 36 type = type_; 37 index = index_; 38 AC = ac_; 39 prn = prn_; 40 sig_0 = sig_0_; 41 sig_P = sig_P_; 38 42 xx = 0.0; 39 iod = -1;40 43 } 41 44 … … 47 50 // Partial 48 51 //////////////////////////////////////////////////////////////////////////// 49 double cmbParam::partial(const QString& acIn, t_corr* corr) {52 double cmbParam::partial(const QString& AC_, t_corr* corr) { 50 53 51 54 if (type == AC_offset) { 52 if (AC == acIn) {55 if (AC == AC_) { 53 56 return 1.0; 54 57 } 55 58 } 56 59 else if (type == Sat_offset) { 57 if (AC == acIn&& prn == corr->prn) {60 if (AC == AC_ && prn == corr->prn) { 58 61 return 1.0; 59 62 } … … 94 97 95 98 QStringList combineStreams = settings.value("combineStreams").toStringList(); 99 100 _masterAC = "BKG"; // TODO: make it an option 96 101 97 102 if (combineStreams.size() >= 2) { … … 112 117 ((bncApp*)qApp), SLOT(slotMessage(const QByteArray,bool))); 113 118 114 // Initialize Parameters 115 // --------------------- 119 120 // A Priori Sigmas (in Meters) 121 // --------------------------- 122 double sigAC_0 = 100.0; 123 double sigAC_P = 100.0; 124 double sigSat_0 = 100.0; 125 double sigSat_P = 0.0; 126 double sigClk_0 = 100.0; 127 double sigClk_P = 100.0; 128 129 // Initialize Parameters (model: Clk_Corr = AC_Offset + Sat_Offset + Clk) 130 // ---------------------------------------------------------------------- 116 131 int nextPar = 0; 117 132 QMapIterator<QString, cmbAC*> it(_ACs); 118 it.next(); // skip first AC119 133 while (it.hasNext()) { 120 134 it.next(); 121 135 cmbAC* AC = it.value(); 122 _params.push_back(new cmbParam(cmbParam::AC_offset, ++nextPar, AC->name, "")); 123 } 124 it.toFront(); 125 it.next(); 126 while (it.hasNext()) { 127 it.next(); 128 cmbAC* AC = it.value(); 129 for (int iGps = 1; iGps <= 32; iGps++) { 130 QString prn = QString("G%1").arg(iGps, 2, 10, QChar('0')); 131 _params.push_back(new cmbParam(cmbParam::Sat_offset, ++nextPar, AC->name, prn)); 136 if (AC->name != _masterAC) { 137 _params.push_back(new cmbParam(cmbParam::AC_offset, ++nextPar, 138 AC->name, "", sigAC_0, sigAC_P)); 139 for (int iGps = 1; iGps <= 32; iGps++) { 140 QString prn = QString("G%1").arg(iGps, 2, 10, QChar('0')); 141 _params.push_back(new cmbParam(cmbParam::Sat_offset, ++nextPar, 142 AC->name, prn, sigSat_0, sigSat_P)); 143 } 132 144 } 133 145 } 134 146 for (int iGps = 1; iGps <= 32; iGps++) { 135 147 QString prn = QString("G%1").arg(iGps, 2, 10, QChar('0')); 136 _params.push_back(new cmbParam(cmbParam::clk, ++nextPar, "", prn)); 137 } 138 139 unsigned nPar = _params.size(); 140 _QQ.ReSize(nPar); 148 _params.push_back(new cmbParam(cmbParam::clk, ++nextPar, "", prn, 149 sigClk_0, sigClk_P)); 150 } 151 152 // Initialize Variance-Covariance Matrix 153 // ------------------------------------- 154 _QQ.ReSize(_params.size()); 141 155 _QQ = 0.0; 142 143 // Clk_Corr = AC_Offset + Sat_Offset + Clk144 // ---------------------------------------145 _sigACOff = 100.0; // per analysis center stream and epoch, sigma in meters146 _sigSatOff = 100.0; // per analysis center stream and satellite, sigma in meters147 _sigClk = 100.0; // per satellite and epoch, sigma in meters148 149 156 for (int iPar = 1; iPar <= _params.size(); iPar++) { 150 157 cmbParam* pp = _params[iPar-1]; 151 if (pp->type == cmbParam::AC_offset) { 152 _QQ(iPar,iPar) = _sigACOff * _sigACOff; 153 } 154 else if (pp->type == cmbParam::Sat_offset) { 155 _QQ(iPar,iPar) = _sigSatOff * _sigSatOff; 156 } 157 else if (pp->type == cmbParam::clk) { 158 _QQ(iPar,iPar) = _sigClk * _sigClk; 159 } 158 _QQ(iPar,iPar) = pp->sig_0 * pp->sig_0; 160 159 } 161 160 } … … 192 191 } 193 192 194 newCorr->AC = AC->name;195 196 193 // Reject delayed corrections 197 194 // -------------------------- … … 221 218 } 222 219 } 223 224 220 225 221 // Process all older Epochs (if there are any) … … 397 393 corr->dotRao += dDotRAO; 398 394 corr->dClk -= dC; 399 400 // for (int iPar = 1; iPar <= _params.size(); iPar++) {401 // cmbParam* pp = _params[iPar-1];402 // if (pp->type == cmbParam::Sat_offset &&403 // pp->prn == corr->prn && pp->AC == corr->AC) {404 // if (pp->iod != corr->iod) {405 // pp->xx += dC * t_CST::c;406 // pp->iod = corr->iod;407 // }408 // }409 // }410 395 } 411 396 … … 425 410 for (int iPar = 1; iPar <= _params.size(); iPar++) { 426 411 cmbParam* pp = _params[iPar-1]; 427 if (pp->type == cmbParam::AC_offset || pp->type == cmbParam::clk) {412 if (pp->sig_P != 0.0) { 428 413 pp->xx = 0.0; 429 414 for (int jj = 1; jj <= _params.size(); jj++) { 430 415 _QQ(iPar, jj) = 0.0; 431 416 } 432 } 433 if (pp->type == cmbParam::AC_offset) { 434 _QQ(iPar,iPar) = _sigACOff * _sigACOff; 435 } 436 else if (pp->type == cmbParam::clk) { 437 _QQ(iPar,iPar) = _sigClk * _sigClk; 417 _QQ(iPar,iPar) = pp->sig_P * pp->sig_P; 438 418 } 439 419 } … … 461 441 t_corr* corr = itCorr.value(); 462 442 463 // Switch to newephemeris464 // ----------------------- 443 // Switch to last ephemeris 444 // ------------------------ 465 445 t_eph* lastEph = _eph[corr->prn]->last; 466 446 if (lastEph == corr->eph) { … … 495 475 t_corr* corr = itCorr.value(); 496 476 497 //// beg test 498 if (epo->acName == "BKG") { 477 if (epo->acName == _masterAC) { 499 478 resCorr[corr->prn] = new t_corr(*corr); 500 479 } 501 //// end test502 480 503 481 for (int iPar = 1; iPar <= _params.size(); iPar++) { -
trunk/BNC/combination/bnccomb.h
r3029 r3032 11 11 public: 12 12 enum parType {AC_offset, Sat_offset, clk}; 13 cmbParam(parType type In, int indexIn,14 const QString& acIn, const QString& prnIn);13 cmbParam(parType type_, int index_, const QString& ac_, 14 const QString& prn_, double sig_0_, double sig_P_); 15 15 ~cmbParam(); 16 double partial(const QString& acIn, t_corr* corr);16 double partial(const QString& AC_, t_corr* corr); 17 17 QString toString() const; 18 18 parType type; … … 21 21 QString prn; 22 22 double xx; 23 int iod; 23 double sig_0; 24 double sig_P; 24 25 }; 25 26 … … 78 79 cmbCaster* _caster; 79 80 QVector<cmbParam*> _params; 80 double _sigACOff;81 double _sigSatOff;82 double _sigClk;83 81 SymmetricMatrix _QQ; 84 82 QByteArray _log; 83 QString _masterAC; 85 84 }; 86 85
Note:
See TracChangeset
for help on using the changeset viewer.