Changeset 9797 in ntrip
- Timestamp:
- Aug 10, 2022, 4:52:43 PM (2 years ago)
- Location:
- trunk/BNC/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/bncutils.cpp
r9787 r9797 780 780 781 781 eleSat = acos( sqrt(neu[0]*neu[0] + neu[1]*neu[1]) / rho ); 782 if (neu[2] < 0 ) {782 if (neu[2] < 0.0) { 783 783 eleSat *= -1.0; 784 784 } -
trunk/BNC/src/rinex/reqcanalyze.cpp
r9775 r9797 120 120 121 121 if (_log) { 122 *_log << "QC Format Version : " << QString("%1").arg(QC_FORMAT_VERSION,3,'f',1) << endl << endl;122 *_log << "QC Format Version : " << QString("%1").arg(QC_FORMAT_VERSION,3,'f',1) << '\n' << '\n'; 123 123 } 124 124 … … 203 203 for (unsigned iObs = 0; iObs < _currEpo->rnxSat.size(); iObs++) { 204 204 const t_rnxObsFile::t_rnxSat& rnxSat = _currEpo->rnxSat[iObs]; 205 if (_navFileNames.size() && 206 _numExpObs.find(rnxSat.prn) == _numExpObs.end()) { 205 if (_navFileNames.size() && _numExpObs.find(rnxSat.prn) == _numExpObs.end()) { 207 206 _numExpObs[rnxSat.prn] = 0; 208 207 } … … 231 230 catch (QString str) { 232 231 if (_log) { 233 *_log << "Exception " << str << endl;232 *_log << "Exception " << str << '\n'; 234 233 } 235 234 else { … … 342 341 double rho, eleSat, azSat; 343 342 topos(xyzSta(1), xyzSta(2), xyzSta(3), xc(1), xc(2), xc(3), rho, eleSat, azSat); 344 qcSat._eleSet = true; 345 qcSat._azDeg = azSat * 180.0/M_PI; 346 qcSat._eleDeg = eleSat * 180.0/M_PI; 343 if (round(eleSat * 180.0/M_PI) >= 0.0) { 344 qcSat._eleSet = true; 345 qcSat._azDeg = azSat * 180.0/M_PI; 346 qcSat._eleDeg = eleSat * 180.0/M_PI; 347 } 347 348 } 348 349 if (satObs._prn.system() == 'R') { … … 381 382 t_frequency::type fA = t_frequency::dummy; 382 383 t_frequency::type fB = t_frequency::dummy; 383 char sys 384 char sys = satObs._prn.system(); 384 385 if (_signalTypes.find(sys) != _signalTypes.end()) { 385 386 for (int iSig = 0; iSig < _signalTypes[sys].size(); iSig++) { … … 412 413 for (unsigned jj = 0; jj < satObs._obs.size(); jj++) { 413 414 const t_frqObs* frqObsHlp = satObs._obs[jj]; 414 if (frqObsHlp->_rnxType2ch[0] == t_frequency::toString(fA)[1] && 415 frqObsHlp->_phaseValid) { 415 if (frqObsHlp->_rnxType2ch[0] == t_frequency::toString(fA)[1] && frqObsHlp->_phaseValid) { 416 416 foundA = true; 417 417 L_a = frqObsHlp->_phase * t_CST::c / f_a; 418 418 } 419 else if (frqObsHlp->_rnxType2ch[0] == t_frequency::toString(fB)[1] && 420 frqObsHlp->_phaseValid) { 419 else if (frqObsHlp->_rnxType2ch[0] == t_frequency::toString(fB)[1] && frqObsHlp->_phaseValid) { 421 420 foundB = true; 422 421 L_b = frqObsHlp->_phase * t_CST::c / f_b; 423 422 } 424 423 } 425 if (foundA && foundB ) {424 if (foundA && foundB && C_a) { 426 425 qcFrq._setMP = true; 427 426 qcFrq._rawMP = C_a - L_a - 2.0*f_b*f_b/(f_a*f_a-f_b*f_b) * (L_a - L_b); … … 748 747 // Summary 749 748 // ------- 750 *_log << "Observation File : " << obsFileName << endl751 << "RINEX Version : " << QString("%1").arg(obsFile->version(),4,'f',2) << endl752 << "Marker Name : " << _qcFile._markerName << endl753 << "Marker Number : " << obsFile->markerNumber() << endl754 << "Receiver : " << _qcFile._receiverType << endl755 << "Antenna : " << _qcFile._antennaName << endl749 *_log << "Observation File : " << obsFileName << '\n' 750 << "RINEX Version : " << QString("%1").arg(obsFile->version(),4,'f',2) << '\n' 751 << "Marker Name : " << _qcFile._markerName << '\n' 752 << "Marker Number : " << obsFile->markerNumber() << '\n' 753 << "Receiver : " << _qcFile._receiverType << '\n' 754 << "Antenna : " << _qcFile._antennaName << '\n' 756 755 << "Position XYZ : " << QString("%1 %2 %3").arg(obsFile->xyz()(1), 14, 'f', 4) 757 756 .arg(obsFile->xyz()(2), 14, 'f', 4) 758 .arg(obsFile->xyz()(3), 14, 'f', 4) << endl757 .arg(obsFile->xyz()(3), 14, 'f', 4) << '\n' 759 758 << "Antenna dH/dE/dN : " << QString("%1 %2 %3").arg(obsFile->antNEU()(3), 8, 'f', 4) 760 759 .arg(obsFile->antNEU()(2), 8, 'f', 4) 761 .arg(obsFile->antNEU()(1), 8, 'f', 4) << endl760 .arg(obsFile->antNEU()(1), 8, 'f', 4) << '\n' 762 761 << "Start Time : " << _qcFile._startTime.datestr().c_str() << ' ' 763 << _qcFile._startTime.timestr(1,'.').c_str() << endl762 << _qcFile._startTime.timestr(1,'.').c_str() << '\n' 764 763 << "End Time : " << _qcFile._endTime.datestr().c_str() << ' ' 765 << _qcFile._endTime.timestr(1,'.').c_str() << endl766 << "Interval : " << _qcFile._interval << " sec" << endl;764 << _qcFile._endTime.timestr(1,'.').c_str() << '\n' 765 << "Interval : " << _qcFile._interval << " sec" << '\n'; 767 766 768 767 // Number of systems … … 783 782 *_log << ' ' << itSys.key(); 784 783 } 785 *_log << endl;784 *_log << '\n'; 786 785 787 786 // Observation types per system … … 795 794 *_log << " " << type; 796 795 } 797 *_log << endl;796 *_log << '\n'; 798 797 } 799 798 } … … 804 803 while (itSys.hasNext()) { 805 804 itSys.next(); 806 const QChar& sys= itSys.key();805 const QChar& sys = itSys.key(); 807 806 const QVector<const t_qcSatSum*>& qcSatVec = itSys.value(); 808 807 int numExpectedObs = 0; 809 for(QMap<t_prn, int>::iterator it = _numExpObs.begin(); 810 it != _numExpObs.end(); it++) { 808 for(QMap<t_prn, int>::iterator it = _numExpObs.begin(); it != _numExpObs.end(); it++) { 811 809 if (sys == it.key().system()) { 812 810 numExpectedObs += it.value(); … … 820 818 while (itFrq.hasNext()) { 821 819 itFrq.next(); 822 QString 820 QString frqType = itFrq.key(); if (frqType.length() < 2) frqType += '?'; 823 821 const t_qcFrqSum& qcFrqSum = itFrq.value(); 824 822 frqMap[frqType].push_back(&qcFrqSum); 825 823 } 826 824 } 827 *_log << endl828 << prefixSys << "Satellites: " << qcSatVec.size() << endl825 *_log << '\n' 826 << prefixSys << "Satellites: " << qcSatVec.size() << '\n' 829 827 << prefixSys << "Signals : " << frqMap.size() << " "; 830 828 QMapIterator<QString, QVector<const t_qcFrqSum*> > itFrq(frqMap); … … 834 832 *_log << ' ' << frqType; 835 833 } 836 *_log << endl;834 *_log << '\n'; 837 835 QString prefixSys2 = " " + prefixSys; 838 836 itFrq.toFront(); 839 837 while (itFrq.hasNext()) { 840 838 itFrq.next(); 841 QString 839 QString frqType = itFrq.key(); if (frqType.length() < 2) frqType += '?'; 842 840 const QVector<const t_qcFrqSum*> qcFrqVec = itFrq.value(); 843 841 QString prefixFrq = QString(" ") + frqType + QString(": "); … … 870 868 double ratio = (double(numObs) / double(numExpectedObs)) * 100.0; 871 869 872 *_log << endl870 *_log << '\n' 873 871 << prefixSys2 << prefixFrq << "Observations : "; 874 if(_navFileNames.isEmpty() || _navFileIncomplete.contains(sys.toLatin1())) {872 if(_navFileNames.isEmpty() || numExpectedObs == 0.0 || _navFileIncomplete.contains(sys.toLatin1())) { 875 873 *_log << QString("%1\n").arg(numObs, 6); 876 874 } … … 892 890 return; 893 891 } 894 *_log << endl;892 *_log << '\n'; 895 893 for (int iEpo = 0; iEpo < _qcFile._qcEpo.size(); iEpo++) { 896 894 const t_qcEpo& qcEpo = _qcFile._qcEpo[iEpo]; … … 912 910 *_log << dateStr << QString(" %1").arg(qcEpo._qcSat.size(), 2) 913 911 << QString(" %1").arg(qcEpo._PDOP, 4, 'f', 1) 914 << endl;912 << '\n'; 915 913 916 914 QMapIterator<t_prn, t_qcSat> itSat(qcEpo._qcSat); … … 964 962 } 965 963 } 966 *_log << endl;964 *_log << '\n'; 967 965 } 968 966 } … … 988 986 } 989 987 if (_log) { 990 *_log << "Navigation File(s) : " << navFileName << endl;988 *_log << "Navigation File(s) : " << navFileName << '\n'; 991 989 } 992 990 QStringListIterator it(_navFileNames); … … 1040 1038 } 1041 1039 if (_log) { 1042 *_log << endl;1040 *_log << '\n'; 1043 1041 } 1044 1042 } … … 1047 1045 double interval, const ColumnVector& xyzSta) { 1048 1046 1049 for(QMap<t_prn, int>::iterator it = _numExpObs.begin(); 1050 1047 1048 for(QMap<t_prn, int>::iterator it = _numExpObs.begin(); it != _numExpObs.end(); it++) { 1051 1049 t_eph* eph = 0; 1052 1050 for (int ie = 0; ie < _ephs.size(); ie++) { … … 1060 1058 int numExpObs = 0; 1061 1059 bncTime epoTime; 1062 for (epoTime = startTime - interval; epoTime < endTime; 1063 epoTime = epoTime + interval) { 1060 for (epoTime = startTime - interval; epoTime < endTime; epoTime = epoTime + interval) { 1064 1061 ColumnVector xc(6); 1065 1062 ColumnVector vv(3); … … 1068 1065 double rho, eleSat, azSat; 1069 1066 topos(xyzSta(1), xyzSta(2), xyzSta(3), xc(1), xc(2), xc(3), rho, eleSat, azSat); 1070 if ( (eleSat * 180.0/M_PI) >0.0) {1067 if (round(eleSat * 180.0/M_PI) >= 0.0) { 1071 1068 numExpObs++; 1072 1069 } -
trunk/BNC/src/rinex/reqcedit.cpp
r9770 r9797 680 680 QVector<t_eph*>& ephs) { 681 681 t_rnxNavFile rnxNavFile(fileName, t_rnxNavFile::input); 682 bncEphUser ephUser(false); 682 683 for (unsigned ii = 0; ii < rnxNavFile.ephs().size(); ii++) { 683 684 t_eph* eph = rnxNavFile.ephs()[ii];
Note:
See TracChangeset
for help on using the changeset viewer.