Changeset 2789 in ntrip
- Timestamp:
- Dec 14, 2010, 1:28:31 PM (14 years ago)
- Location:
- trunk/BNC
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncmodel.cpp
r2787 r2789 319 319 while (iGPS.hasNext()) { 320 320 iGPS.next(); 321 QString prn = iGPS.key();322 321 t_satData* satData = iGPS.value(); 323 324 ColumnVector rr = satData->xx - _xcBanc.Rows(1,3); 325 double rho = rr.norm_Frobenius(); 326 327 double neu[3]; 328 xyz2neu(_ellBanc.data(), rr.data(), neu); 329 330 satData->eleSat = acos( sqrt(neu[0]*neu[0] + neu[1]*neu[1]) / rho ); 331 if (neu[2] < 0) { 332 satData->eleSat *= -1.0; 333 } 334 satData->azSat = atan2(neu[1], neu[0]); 335 322 cmpEle(satData); 336 323 if (satData->eleSat < MINELE_GPS) { 337 324 delete satData; … … 343 330 while (iGlo.hasNext()) { 344 331 iGlo.next(); 345 QString prn = iGlo.key();346 332 t_satData* satData = iGlo.value(); 347 348 ColumnVector rr = satData->xx - _xcBanc.Rows(1,3); 349 double rho = rr.norm_Frobenius(); 350 351 double neu[3]; 352 xyz2neu(_ellBanc.data(), rr.data(), neu); 353 354 satData->eleSat = acos( sqrt(neu[0]*neu[0] + neu[1]*neu[1]) / rho ); 355 if (neu[2] < 0) { 356 satData->eleSat *= -1.0; 357 } 358 satData->azSat = atan2(neu[1], neu[0]); 359 333 cmpEle(satData); 360 334 if (satData->eleSat < MINELE_GLO) { 361 335 delete satData; … … 367 341 while (iGal.hasNext()) { 368 342 iGal.next(); 369 QString prn = iGal.key();370 343 t_satData* satData = iGal.value(); 371 372 ColumnVector rr = satData->xx - _xcBanc.Rows(1,3); 373 double rho = rr.norm_Frobenius(); 374 375 double neu[3]; 376 xyz2neu(_ellBanc.data(), rr.data(), neu); 377 378 satData->eleSat = acos( sqrt(neu[0]*neu[0] + neu[1]*neu[1]) / rho ); 379 if (neu[2] < 0) { 380 satData->eleSat *= -1.0; 381 } 382 satData->azSat = atan2(neu[1], neu[0]); 383 344 cmpEle(satData); 384 345 if (satData->eleSat < MINELE_GAL) { 385 346 delete satData; … … 598 559 QString prn = iGPS.key(); 599 560 t_satData* satData = iGPS.value(); 600 bool found = false; 601 for (int iPar = 1; iPar <= _params.size(); iPar++) { 602 if (_params[iPar-1]->type == bncParam::AMB_L3 && 603 _params[iPar-1]->prn == prn) { 604 found = true; 605 break; 606 } 607 } 608 if (!found) { 609 bncParam* par = new bncParam(bncParam::AMB_L3, _params.size()+1, prn); 610 _params.push_back(par); 611 par->xx = satData->L3 - cmpValue(satData, true); 612 } 561 addAmb(satData); 613 562 } 614 563 … … 616 565 while (iGlo.hasNext()) { 617 566 iGlo.next(); 618 QString prn = iGlo.key();619 567 t_satData* satData = iGlo.value(); 620 bool found = false; 621 for (int iPar = 1; iPar <= _params.size(); iPar++) { 622 if (_params[iPar-1]->type == bncParam::AMB_L3 && 623 _params[iPar-1]->prn == prn) { 624 found = true; 625 break; 626 } 627 } 628 if (!found) { 629 bncParam* par = new bncParam(bncParam::AMB_L3, _params.size()+1, prn); 630 _params.push_back(par); 631 par->xx = satData->L3 - cmpValue(satData, true); 632 } 568 addAmb(satData); 633 569 } 634 570 … … 636 572 while (iGal.hasNext()) { 637 573 iGal.next(); 638 QString prn = iGal.key();639 574 t_satData* satData = iGal.value(); 640 bool found = false; 641 for (int iPar = 1; iPar <= _params.size(); iPar++) { 642 if (_params[iPar-1]->type == bncParam::AMB_L3 && 643 _params[iPar-1]->prn == prn) { 644 found = true; 645 break; 646 } 647 } 648 if (!found) { 649 bncParam* par = new bncParam(bncParam::AMB_L3, _params.size()+1, prn); 650 _params.push_back(par); 651 par->xx = satData->L3 - cmpValue(satData, true); 652 } 575 addAmb(satData); 653 576 } 654 577 … … 1387 1310 return _windUpSum[prn]; 1388 1311 } 1312 1313 // 1314 /////////////////////////////////////////////////////////////////////////// 1315 void bncModel::cmpEle(t_satData* satData) { 1316 ColumnVector rr = satData->xx - _xcBanc.Rows(1,3); 1317 double rho = rr.norm_Frobenius(); 1318 1319 double neu[3]; 1320 xyz2neu(_ellBanc.data(), rr.data(), neu); 1321 1322 satData->eleSat = acos( sqrt(neu[0]*neu[0] + neu[1]*neu[1]) / rho ); 1323 if (neu[2] < 0) { 1324 satData->eleSat *= -1.0; 1325 } 1326 satData->azSat = atan2(neu[1], neu[0]); 1327 } 1328 1329 // 1330 /////////////////////////////////////////////////////////////////////////// 1331 void bncModel::addAmb(t_satData* satData) { 1332 bool found = false; 1333 for (int iPar = 1; iPar <= _params.size(); iPar++) { 1334 if (_params[iPar-1]->type == bncParam::AMB_L3 && 1335 _params[iPar-1]->prn == satData->prn) { 1336 found = true; 1337 break; 1338 } 1339 } 1340 if (!found) { 1341 bncParam* par = new bncParam(bncParam::AMB_L3, 1342 _params.size()+1, satData->prn); 1343 _params.push_back(par); 1344 par->xx = satData->L3 - cmpValue(satData, true); 1345 } 1346 } -
trunk/BNC/bncmodel.h
r2782 r2789 88 88 89 89 private: 90 void cmpEle(t_satData* satData); 91 void addAmb(t_satData* satData); 90 92 double cmpValue(t_satData* satData, bool phase); 91 93 double delay_saast(double Ele);
Note:
See TracChangeset
for help on using the changeset viewer.