Changeset 3214 in ntrip
- Timestamp:
- Mar 31, 2011, 9:27:28 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/BNC/combination/bnccomb.cpp ¶
r3211 r3214 17 17 #include <newmatio.h> 18 18 #include <iomanip> 19 #include <sstream> 19 20 20 21 #include "bnccomb.h" … … 549 550 } 550 551 552 ostringstream out; out.setf(std::ios::fixed); 553 554 unsigned year, month, day, hour, minute; 555 double sec; 556 resTime.civil_date(year, month, day); 557 resTime.civil_time(hour, minute, sec); 558 559 out << "* " 560 << setw(4) << year << " " 561 << setw(2) << month << " " 562 << setw(2) << day << " " 563 << setw(2) << hour << " " 564 << setw(2) << minute << " " 565 << setw(12) << setprecision(8) << sec << " " 566 << endl; 567 551 568 QMapIterator<QString, t_corr*> it(resCorr); 552 569 while (it.hasNext()) { … … 554 571 t_corr* corr = it.value(); 555 572 556 // // SP3 Output 557 // // ---------- 558 // if (_sp3) { 559 // ColumnVector xc(4); 560 // ColumnVector vv(3); 561 // corr->eph->position(resTime.gpsw(), resTime.gpssec(), 562 // xc.data(), vv.data()); 563 // bncPPPclient::applyCorr(resTime, corr, xc, vv); 564 // 565 // // Relativistic Correction 566 // // ----------------------- 567 // xc(4) += 2.0 * DotProduct(xc.Rows(1,3),vv) / t_CST::c / t_CST::c; 568 // 569 // // Correction Phase Center --> CoM 570 // // ------------------------------- 571 // if (_antex) { 572 // ColumnVector dx(3); dx = 0.0; 573 // double Mjd = resTime.mjd() + resTime.daysec()/86400.0; 574 // if (_antex->satCoMcorrection(corr->prn, Mjd, xc.Rows(1,3), dx) == success) { 575 // xc(1) -= dx(1); 576 // xc(2) -= dx(2); 577 // xc(3) -= dx(3); 578 // } 579 // else { 580 // cout << "antenna not found" << endl; 581 // } 582 // } 583 // _sp3->write(resTime.gpsw(), resTime.gpssec(), corr->prn, xc); 584 // } 585 // 586 // delete corr; 587 // } 573 double dT = 60.0; 574 575 for (int iTime = 1; iTime <= 2; iTime++) { 576 577 bncTime time12 = (iTime == 1) ? resTime : resTime + dT; 578 579 ColumnVector xc(4); 580 ColumnVector vv(3); 581 corr->eph->position(time12.gpsw(), time12.gpssec(), 582 xc.data(), vv.data()); 583 bncPPPclient::applyCorr(time12, corr, xc, vv); 584 585 // Relativistic Correction 586 // ----------------------- 587 double relCorr = - 2.0 * DotProduct(xc.Rows(1,3),vv) / t_CST::c / t_CST::c; 588 xc(4) -= relCorr; 589 590 // Code Biases 591 // ----------- 592 double dcbP1C1 = 0.0; 593 double dcbP1P2 = 0.0; 594 595 // Correction Phase Center --> CoM 596 // ------------------------------- 597 ColumnVector dx(3); dx = 0.0; 598 if (_antex) { 599 double Mjd = time12.mjd() + time12.daysec()/86400.0; 600 if (_antex->satCoMcorrection(corr->prn, Mjd, xc.Rows(1,3), dx) == success) { 601 xc(1) -= dx(1); 602 xc(2) -= dx(2); 603 xc(3) -= dx(3); 604 } 605 else { 606 cout << "antenna not found" << endl; 607 } 608 } 609 610 if (iTime == 1) { 611 out << 'P' << corr->prn.toAscii().data() 612 << setw(14) << setprecision(6) << xc(1) / 1000.0 613 << setw(14) << setprecision(6) << xc(2) / 1000.0 614 << setw(14) << setprecision(6) << xc(3) / 1000.0 615 << setw(14) << setprecision(6) << xc(4) * 1e6 616 << setw(14) << setprecision(6) << relCorr * 1e6 617 << setw(8) << setprecision(3) << dx(1) 618 << setw(8) << setprecision(3) << dx(2) 619 << setw(8) << setprecision(3) << dx(3) 620 << setw(8) << setprecision(3) << dcbP1C1 621 << setw(8) << setprecision(3) << dcbP1P2 622 << setw(6) << setprecision(1) << dT; 623 } 624 else { 625 out << setw(14) << setprecision(6) << xc(1) / 1000.0 626 << setw(14) << setprecision(6) << xc(2) / 1000.0 627 << setw(14) << setprecision(6) << xc(3) / 1000.0 << endl; 628 } 629 } 630 631 delete corr; 632 } 588 633 589 634 // Optionally send new Corrections to PPP … … 603 648 // app->_bncPPPclient->slotNewCorrections(corrLines); 604 649 } 605 } 606 } 650 }
Note:
See TracChangeset
for help on using the changeset viewer.