Changeset 6062 in ntrip
- Timestamp:
- Sep 7, 2014, 9:37:01 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/PPP_free/bncmodel.cpp
r6061 r6062 501 501 // Add New Ambiguities if necessary 502 502 // -------------------------------- 503 if (_opt-> usePhase) {503 if (_opt->ambLCs('G').size() || _opt->ambLCs('R').size() || _opt->ambLCs('E').size()) { 504 504 505 505 // Make a copy of QQ and xx, set parameter indices … … 559 559 bncParam* par = _params[ii-1]; 560 560 if (par->index_old == 0) { 561 _QQ(par->index, par->index) = _opt-> sigAmb0 * _opt->sigAmb0;561 _QQ(par->index, par->index) = _opt->_aprSigAmb * _opt->_aprSigAmb; 562 562 } 563 563 par->index_old = par->index; … … 576 576 _time = epoData->tt; // current epoch time 577 577 578 if (_opt-> pppMode) {578 if (_opt->useOrbClkCorr()) { 579 579 _log += "Precise Point Positioning of Epoch " 580 580 + QByteArray(_time.timestr(1).c_str()) + … … 659 659 // NEU Output 660 660 // ---------- 661 if (_opt-> refCrdSet()) {662 newPos->xnt[0] = x() - _opt-> refCrd[0];663 newPos->xnt[1] = y() - _opt-> refCrd[1];664 newPos->xnt[2] = z() - _opt-> refCrd[2];661 if (_opt->xyzAprRoverSet()) { 662 newPos->xnt[0] = x() - _opt->_xyzAprRover[0]; 663 newPos->xnt[1] = y() - _opt->_xyzAprRover[1]; 664 newPos->xnt[2] = z() - _opt->_xyzAprRover[2]; 665 665 666 666 double ellRef[3]; 667 xyz2ell(_opt-> refCrd, ellRef);667 xyz2ell(_opt->_xyzAprRover.data(), ellRef); 668 668 xyz2neu(ellRef, newPos->xnt, &newPos->xnt[3]); 669 669 … … 677 677 _pppClient->emitNewMessage(QByteArray(strC.str().c_str()), true); 678 678 679 if (_opt->pppAverage == 0.0) { 680 delete newPos; 681 } 682 else { 683 684 _posAverage.push_back(newPos); 685 686 // Compute the Mean 687 // ---------------- 688 ColumnVector mean(7); mean = 0.0; 689 690 QMutableVectorIterator<pppPos*> it(_posAverage); 691 while (it.hasNext()) { 692 pppPos* pp = it.next(); 693 if ( (epoData->tt - pp->time) >= _opt->pppAverage ) { 694 delete pp; 695 it.remove(); 696 } 697 else { 698 for (int ii = 0; ii < 7; ++ii) { 699 mean[ii] += pp->xnt[ii]; 700 } 701 } 702 } 703 704 int nn = _posAverage.size(); 705 706 if (nn > 0) { 707 708 mean /= nn; 709 710 // Compute the Deviation 711 // --------------------- 712 ColumnVector std(7); std = 0.0; 713 QVectorIterator<pppPos*> it2(_posAverage); 714 while (it2.hasNext()) { 715 pppPos* pp = it2.next(); 716 for (int ii = 0; ii < 7; ++ii) { 717 std[ii] += (pp->xnt[ii] - mean[ii]) * (pp->xnt[ii] - mean[ii]); 718 } 719 } 720 for (int ii = 0; ii < 7; ++ii) { 721 std[ii] = sqrt(std[ii] / nn); 722 } 723 724 if (_opt->refCrdSet()) { 725 ostringstream strD; strD.setf(ios::fixed); 726 strD << _staID.data() << " AVE-XYZ " 727 << epoData->tt.timestr(1) << " " 728 << setw(13) << setprecision(3) << mean[0] + _opt->refCrd[0] << " +- " 729 << setw(6) << setprecision(3) << std[0] << " " 730 << setw(14) << setprecision(3) << mean[1] + _opt->refCrd[1] << " +- " 731 << setw(6) << setprecision(3) << std[1] << " " 732 << setw(14) << setprecision(3) << mean[2] + _opt->refCrd[2] << " +- " 733 << setw(6) << setprecision(3) << std[2]; 734 _pppClient->emitNewMessage(QByteArray(strD.str().c_str()), true); 735 736 ostringstream strE; strE.setf(ios::fixed); 737 strE << _staID.data() << " AVE-NEU " 738 << epoData->tt.timestr(1) << " " 739 << setw(13) << setprecision(3) << mean[3] << " +- " 740 << setw(6) << setprecision(3) << std[3] << " " 741 << setw(14) << setprecision(3) << mean[4] << " +- " 742 << setw(6) << setprecision(3) << std[4] << " " 743 << setw(14) << setprecision(3) << mean[5] << " +- " 744 << setw(6) << setprecision(3) << std[5]; 745 _pppClient->emitNewMessage(QByteArray(strE.str().c_str()), true); 746 747 if (_opt->estTropo) { 748 ostringstream strF; strF.setf(ios::fixed); 749 strF << _staID.data() << " AVE-TRP " 750 << epoData->tt.timestr(1) << " " 751 << setw(13) << setprecision(3) << mean[6] << " +- " 752 << setw(6) << setprecision(3) << std[6] << endl; 753 _pppClient->emitNewMessage(QByteArray(strF.str().c_str()), true); 754 } 755 } 756 } 757 } 679 delete newPos; 758 680 759 681 _lastTimeOK = _time; // remember time of last successful update
Note:
See TracChangeset
for help on using the changeset viewer.