Changeset 4978 in ntrip for trunk/BNC/src/combination
- Timestamp:
- Mar 10, 2013, 4:25:58 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/combination/bnccomb.cpp
r4889 r4978 680 680 double dT = 60.0; 681 681 682 for (int iTime = 1; iTime <= 2; iTime++) { 683 684 bncTime time12 = (iTime == 1) ? _resTime : _resTime + dT; 685 686 ColumnVector xc(4); 687 ColumnVector vv(3); 688 corr->eph->position(time12.gpsw(), time12.gpssec(), 689 xc.data(), vv.data()); 690 bncPPPclient::applyCorr(time12, corr, xc, vv); 691 692 // Relativistic Correction 693 // ----------------------- 694 double relCorr = - 2.0 * DotProduct(xc.Rows(1,3),vv) / t_CST::c / t_CST::c; 695 xc(4) -= relCorr; 696 697 // Code Biases 698 // ----------- 699 double dcbP1C1 = 0.0; 700 double dcbP1P2 = 0.0; 701 702 // Correction Phase Center --> CoM 703 // ------------------------------- 704 ColumnVector dx(3); dx = 0.0; 705 if (_antex) { 706 double Mjd = time12.mjd() + time12.daysec()/86400.0; 707 if (_antex->satCoMcorrection(corr->prn, Mjd, xc.Rows(1,3), dx) == success) { 708 xc(1) -= dx(1); 709 xc(2) -= dx(2); 710 xc(3) -= dx(3); 711 } 712 else { 713 cout << "antenna not found" << endl; 714 } 715 } 716 717 if (iTime == 1) { 718 out << 'P' << corr->prn.toAscii().data() 719 << setw(14) << setprecision(6) << xc(1) / 1000.0 720 << setw(14) << setprecision(6) << xc(2) / 1000.0 721 << setw(14) << setprecision(6) << xc(3) / 1000.0 722 << setw(14) << setprecision(6) << xc(4) * 1e6 723 << setw(14) << setprecision(6) << relCorr * 1e6 724 << setw(8) << setprecision(3) << dx(1) 725 << setw(8) << setprecision(3) << dx(2) 726 << setw(8) << setprecision(3) << dx(3) 727 << setw(8) << setprecision(3) << dcbP1C1 728 << setw(8) << setprecision(3) << dcbP1P2 729 << setw(6) << setprecision(1) << dT; 730 731 QString line; 732 int messageType = COTYPE_GPSCOMBINED; 733 int updateInt = 0; 734 line.sprintf("%d %d %d %.1f %s" 735 " %3d" 736 " %8.3f %8.3f %8.3f %8.3f" 737 " %10.5f %10.5f %10.5f %10.5f" 738 " %10.5f %10.5f %10.5f %10.5f INTERNAL", 739 messageType, updateInt, time12.gpsw(), time12.gpssec(), 740 corr->prn.toAscii().data(), 741 corr->iod, 742 corr->dClk * t_CST::c, 743 corr->rao[0], 744 corr->rao[1], 745 corr->rao[2], 746 corr->dotDClk * t_CST::c, 747 corr->dotRao[0], 748 corr->dotRao[1], 749 corr->dotRao[2], 750 corr->dotDotDClk * t_CST::c, 751 corr->dotDotRao[0], 752 corr->dotDotRao[1], 753 corr->dotDotRao[2]); 754 corrLines << line; 682 ColumnVector xc(4); 683 ColumnVector vv(3); 684 corr->eph->position(_resTime.gpsw(), _resTime.gpssec(), 685 xc.data(), vv.data()); 686 bncPPPclient::applyCorr(_resTime, corr, xc, vv); 687 688 // Relativistic Correction 689 // ----------------------- 690 double relCorr = - 2.0 * DotProduct(xc.Rows(1,3),vv) / t_CST::c / t_CST::c; 691 xc(4) -= relCorr; 692 693 // Code Biases 694 // ----------- 695 double dcbP1C1 = 0.0; 696 double dcbP1P2 = 0.0; 697 698 // Correction Phase Center --> CoM 699 // ------------------------------- 700 ColumnVector dx(3); dx = 0.0; 701 if (_antex) { 702 double Mjd = _resTime.mjd() + _resTime.daysec()/86400.0; 703 if (_antex->satCoMcorrection(corr->prn, Mjd, xc.Rows(1,3), dx) == success) { 704 xc(1) -= dx(1); 705 xc(2) -= dx(2); 706 xc(3) -= dx(3); 755 707 } 756 708 else { 757 out << setw(14) << setprecision(6) << xc(1) / 1000.0 758 << setw(14) << setprecision(6) << xc(2) / 1000.0 759 << setw(14) << setprecision(6) << xc(3) / 1000.0 << endl; 760 } 761 } 709 cout << "antenna not found" << endl; 710 } 711 } 712 713 out << 'P' << corr->prn.toAscii().data() 714 << setw(14) << setprecision(6) << xc(1) / 1000.0 715 << setw(14) << setprecision(6) << xc(2) / 1000.0 716 << setw(14) << setprecision(6) << xc(3) / 1000.0 717 << setw(14) << setprecision(6) << xc(4) * 1e6 718 << setw(14) << setprecision(6) << relCorr * 1e6 719 << setw(8) << setprecision(3) << dx(1) 720 << setw(8) << setprecision(3) << dx(2) 721 << setw(8) << setprecision(3) << dx(3) 722 << setw(8) << setprecision(3) << dcbP1C1 723 << setw(8) << setprecision(3) << dcbP1P2 724 << setw(6) << setprecision(1) << dT 725 << setw(14) << setprecision(6) << (xc(1) + vv(1) * dT) / 1000.0 726 << setw(14) << setprecision(6) << (xc(2) + vv(2) * dT) / 1000.0 727 << setw(14) << setprecision(6) << (xc(3) + vv(3) * dT) / 1000.0 << endl; 728 729 QString line; 730 int messageType = COTYPE_GPSCOMBINED; 731 int updateInt = 0; 732 line.sprintf("%d %d %d %.1f %s" 733 " %3d" 734 " %8.3f %8.3f %8.3f %8.3f" 735 " %10.5f %10.5f %10.5f %10.5f" 736 " %10.5f %10.5f %10.5f %10.5f INTERNAL", 737 messageType, updateInt, _resTime.gpsw(), _resTime.gpssec(), 738 corr->prn.toAscii().data(), 739 corr->iod, 740 corr->dClk * t_CST::c, 741 corr->rao[0], 742 corr->rao[1], 743 corr->rao[2], 744 corr->dotDClk * t_CST::c, 745 corr->dotRao[0], 746 corr->dotRao[1], 747 corr->dotRao[2], 748 corr->dotDotDClk * t_CST::c, 749 corr->dotDotRao[0], 750 corr->dotDotRao[1], 751 corr->dotDotRao[2]); 752 corrLines << line; 762 753 763 754 delete corr;
Note:
See TracChangeset
for help on using the changeset viewer.