Changeset 2083 in ntrip
- Timestamp:
- Dec 5, 2009, 4:06:24 PM (15 years ago)
- Location:
- trunk/BNC
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncmodel.cpp
r2081 r2083 125 125 _xx = 0.0; 126 126 127 bncSettings settings; 128 127 129 _static = false; 128 129 bncSettings settings;130 130 if ( Qt::CheckState(settings.value("pppStatic").toInt()) == Qt::Checked) { 131 131 _static = true; 132 } 133 134 _usePhase = false; 135 if ( Qt::CheckState(settings.value("pppUsePhase").toInt()) == Qt::Checked) { 136 _usePhase = true; 132 137 } 133 138 } … … 256 261 void bncModel::predict(t_epoData* epoData) { 257 262 258 // Make a copy of QQ and xx, set parameter indices 259 // ----------------------------------------------- 260 SymmetricMatrix QQ_old = _QQ; 261 ColumnVector xx_old = _xx; 262 263 for (int iPar = 1; iPar <= _params.size(); iPar++) { 264 _params[iPar-1]->index_old = _params[iPar-1]->index; 265 _params[iPar-1]->index = 0; 266 } 267 268 // Remove Ambiguity Parameters without observations 269 // ------------------------------------------------ 270 int iPar = 0; 271 QMutableVectorIterator<bncParam*> it(_params); 272 while (it.hasNext()) { 273 bncParam* par = it.next(); 274 bool removed = false; 275 if (par->type == bncParam::AMB_L3) { 276 if (epoData->satData.find(par->prn) == epoData->satData.end()) { 277 removed = true; 278 delete par; 279 it.remove(); 280 } 281 } 282 if (! removed) { 283 ++iPar; 284 par->index = iPar; 285 } 286 } 287 288 // Add new ambiguity parameters 289 // ---------------------------- 290 QMapIterator<QString, t_satData*> itObs(epoData->satData); 291 while (itObs.hasNext()) { 292 itObs.next(); 293 QString prn = itObs.key(); 294 bool found = false; 263 if (_usePhase) { 264 265 // Make a copy of QQ and xx, set parameter indices 266 // ----------------------------------------------- 267 SymmetricMatrix QQ_old = _QQ; 268 ColumnVector xx_old = _xx; 269 295 270 for (int iPar = 1; iPar <= _params.size(); iPar++) { 296 if (_params[iPar-1]->type == bncParam::AMB_L3 && 297 _params[iPar-1]->prn == prn) { 298 found = true; 299 break; 300 } 301 } 302 if (!found) { 303 bncParam* par = new bncParam(bncParam::AMB_L3, _params.size()+1, prn); 304 _params.push_back(par); 305 } 306 } 307 308 int nPar = _params.size(); 309 _xx.ReSize(nPar); _xx = 0.0; 310 _QQ.ReSize(nPar); _QQ = 0.0; 311 for (int i1 = 1; i1 <= nPar; i1++) { 312 bncParam* p1 = _params[i1-1]; 313 if (p1->index_old != 0) { 314 _xx(p1->index) = xx_old(p1->index_old); 315 _QQ(p1->index, p1->index) = QQ_old(p1->index_old, p1->index_old); 316 for (int i2 = 1; i2 <= nPar; i2++) { 317 bncParam* p2 = _params[i2-1]; 318 if (p2->index_old != 0) { 319 _QQ(p1->index, p2->index) = QQ_old(p1->index_old, p2->index_old); 271 _params[iPar-1]->index_old = _params[iPar-1]->index; 272 _params[iPar-1]->index = 0; 273 } 274 275 // Remove Ambiguity Parameters without observations 276 // ------------------------------------------------ 277 int iPar = 0; 278 QMutableVectorIterator<bncParam*> it(_params); 279 while (it.hasNext()) { 280 bncParam* par = it.next(); 281 bool removed = false; 282 if (par->type == bncParam::AMB_L3) { 283 if (epoData->satData.find(par->prn) == epoData->satData.end()) { 284 removed = true; 285 delete par; 286 it.remove(); 320 287 } 321 288 } 322 } 323 } 324 325 for (int ii = 1; ii <= nPar; ii++) { 326 bncParam* par = _params[ii-1]; 327 if (par->index_old == 0) { 328 _QQ(par->index, par->index) = sig_amb_0 * sig_amb_0; 329 } 330 par->index_old = par->index; 289 if (! removed) { 290 ++iPar; 291 par->index = iPar; 292 } 293 } 294 295 // Add new ambiguity parameters 296 // ---------------------------- 297 QMapIterator<QString, t_satData*> itObs(epoData->satData); 298 while (itObs.hasNext()) { 299 itObs.next(); 300 QString prn = itObs.key(); 301 bool found = false; 302 for (int iPar = 1; iPar <= _params.size(); iPar++) { 303 if (_params[iPar-1]->type == bncParam::AMB_L3 && 304 _params[iPar-1]->prn == prn) { 305 found = true; 306 break; 307 } 308 } 309 if (!found) { 310 bncParam* par = new bncParam(bncParam::AMB_L3, _params.size()+1, prn); 311 _params.push_back(par); 312 } 313 } 314 315 int nPar = _params.size(); 316 _xx.ReSize(nPar); _xx = 0.0; 317 _QQ.ReSize(nPar); _QQ = 0.0; 318 for (int i1 = 1; i1 <= nPar; i1++) { 319 bncParam* p1 = _params[i1-1]; 320 if (p1->index_old != 0) { 321 _xx(p1->index) = xx_old(p1->index_old); 322 _QQ(p1->index, p1->index) = QQ_old(p1->index_old, p1->index_old); 323 for (int i2 = 1; i2 <= nPar; i2++) { 324 bncParam* p2 = _params[i2-1]; 325 if (p2->index_old != 0) { 326 _QQ(p1->index, p2->index) = QQ_old(p1->index_old, p2->index_old); 327 } 328 } 329 } 330 } 331 332 for (int ii = 1; ii <= nPar; ii++) { 333 bncParam* par = _params[ii-1]; 334 if (par->index_old == 0) { 335 _QQ(par->index, par->index) = sig_amb_0 * sig_amb_0; 336 } 337 par->index_old = par->index; 338 } 331 339 } 332 340 … … 390 398 391 399 unsigned nPar = _params.size(); 392 unsigned nObs = 2 *epoData->size();400 unsigned nObs = _usePhase ? 2 * epoData->size() : epoData->size(); 393 401 394 402 // Create First-Design Matrix … … 414 422 } 415 423 416 ++iObs; 417 ll(iObs) = satData->L3 - rhoCmp; 418 PP(iObs,iObs) = 1.0 / (sig_L3 * sig_L3); 419 for (int iPar = 1; iPar <= _params.size(); iPar++) { 420 if (_params[iPar-1]->type == bncParam::AMB_L3 && 421 _params[iPar-1]->prn == prn) { 422 ll(iObs) -= _params[iPar-1]->x0; 423 } 424 AA(iObs, iPar) = _params[iPar-1]->partial(satData, prn); 424 if (_usePhase) { 425 ++iObs; 426 ll(iObs) = satData->L3 - rhoCmp; 427 PP(iObs,iObs) = 1.0 / (sig_L3 * sig_L3); 428 for (int iPar = 1; iPar <= _params.size(); iPar++) { 429 if (_params[iPar-1]->type == bncParam::AMB_L3 && 430 _params[iPar-1]->prn == prn) { 431 ll(iObs) -= _params[iPar-1]->x0; 432 } 433 AA(iObs, iPar) = _params[iPar-1]->partial(satData, prn); 434 } 425 435 } 426 436 } -
trunk/BNC/bncmodel.h
r2080 r2083 75 75 ColumnVector _ellBanc; 76 76 bool _static; 77 bool _usePhase; 77 78 }; 78 79 -
trunk/BNC/bncwindow.cpp
r2078 r2083 305 305 _pppStaticCheckBox->setCheckState(Qt::CheckState( 306 306 settings.value("pppStatic").toInt())); 307 _pppUsePhaseCheckBox = new QCheckBox(); 308 _pppUsePhaseCheckBox->setCheckState(Qt::CheckState( 309 settings.value("pppUsePhase").toInt())); 307 310 308 311 // Streams … … 729 732 QGridLayout* pppLayout = new QGridLayout; 730 733 pppLayout->setColumnMinimumWidth(0,14*ww); 731 pppLayout->addWidget(new QLabel("Mountpoint"), 0, 0); 732 pppLayout->addWidget(_pppMountLineEdit, 0, 1, 1,7); 733 pppLayout->addWidget(new QLabel("Static"), 1, 0); 734 pppLayout->addWidget(_pppStaticCheckBox, 1, 1); 734 pppLayout->addWidget(new QLabel("Mountpoint"), 0, 0); 735 pppLayout->addWidget(_pppMountLineEdit, 0, 1, 1, 3); 736 pppLayout->addWidget(new QLabel("Static"), 1, 0); 737 pppLayout->addWidget(_pppStaticCheckBox, 1, 1); 738 pppLayout->addWidget(new QLabel("Use Phase Obs"), 2, 0); 739 pppLayout->addWidget(_pppUsePhaseCheckBox, 2, 1); 735 740 pppgroup->setLayout(pppLayout); 736 741 … … 1039 1044 settings.setValue("pppMount", _pppMountLineEdit->text()); 1040 1045 settings.setValue("pppStatic", _pppStaticCheckBox->checkState()); 1046 settings.setValue("pppUsePhase", _pppUsePhaseCheckBox->checkState()); 1041 1047 settings.setValue("mountPoints", mountPoints); 1042 1048 settings.setValue("obsRate", _obsRateComboBox->currentText()); -
trunk/BNC/bncwindow.h
r2078 r2083 114 114 QLineEdit* _pppMountLineEdit; 115 115 QCheckBox* _pppStaticCheckBox; 116 QCheckBox* _pppUsePhaseCheckBox; 116 117 QCheckBox* _rnxV3CheckBox; 117 118 QCheckBox* _ephV3CheckBox;
Note:
See TracChangeset
for help on using the changeset viewer.