Changeset 5776 in ntrip for trunk/BNC/src
- Timestamp:
- Aug 4, 2014, 11:34:04 AM (10 years ago)
- Location:
- trunk/BNC/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/PPP/ephpool.cpp
r5749 r5776 134 134 t_irc irc = eph->getCrd(tt, xc, vv); 135 135 if (irc == success) { 136 if (eph-> system() == 'R') {136 if (eph->prn().system() == 'R') { 137 137 double age = tt - eph->TOC(); 138 138 if (fabs(age) > 3600.0) { -
trunk/BNC/src/bncephuser.cpp
r5576 r5776 79 79 t_ephGPS* eNew = new t_ephGPS(); eNew->set(&gpseph); 80 80 81 const QString& prn = eNew->prn();81 QString prn(eNew->prn().toString().c_str()); 82 82 83 83 if (_eph.contains(prn)) { … … 106 106 t_ephGlo* eNew = new t_ephGlo(); eNew->set(&gloeph); 107 107 108 const QString& prn = eNew->prn();108 QString prn(eNew->prn().toString().c_str()); 109 109 110 110 if (_eph.contains(prn)) { … … 161 161 } 162 162 163 QString prn = newEph->prn();163 QString prn(newEph->prn().toString().c_str()); 164 164 165 165 t_irc irc = failure; -
trunk/BNC/src/ephemeris.cpp
r5749 r5776 75 75 _receptDateTime = currentDateAndTimeGPS(); 76 76 77 _prn = QString("G%1").arg(ee->satellite, 2, 10, QChar('0'));77 _prn.set('G', ee->satellite); 78 78 79 79 _TOC.set(ee->GPSweek, ee->TOC); … … 276 276 277 277 GPSADDBITS(12, 1019) 278 GPSADDBITS(6,_prn. right((_prn.length()-1)).toInt())278 GPSADDBITS(6,_prn.number()) 279 279 GPSADDBITS(10, _TOC.gpsw()) 280 280 GPSADDBITS(4, _ura) … … 416 416 _receptDateTime = currentDateAndTimeGPS(); 417 417 418 _prn = QString("R%1").arg(ee->almanac_number, 2, 10, QChar('0'));418 _prn.set('R', ee->almanac_number); 419 419 420 420 int ww = ee->GPSWeek; … … 541 541 542 542 GLONASSADDBITS(12, 1020) 543 GLONASSADDBITS(6, _prn. right((_prn.length()-1)).toInt())543 GLONASSADDBITS(6, _prn.number()) 544 544 GLONASSADDBITS(5, 7+_frequency_number) 545 545 GLONASSADDBITS(1, 0) … … 600 600 _receptDateTime = currentDateAndTimeGPS(); 601 601 602 _prn = QString("E%1").arg(ee->satellite, 2, 10, QChar('0'));602 _prn.set('E', ee->satellite); 603 603 604 604 _TOC.set(ee->Week, ee->TOC); … … 749 749 750 750 GALILEOADDBITS(12, inav ? 1046 : 1045) 751 GALILEOADDBITS(6, _prn. right((_prn.length()-1)).toInt())751 GALILEOADDBITS(6, _prn.number()) 752 752 GALILEOADDBITS(12, _TOC.gpsw()) 753 753 GALILEOADDBITS(10, _IODnav) … … 844 844 double sec; 845 845 846 in >> _prn >> year >> month >> day >> hour >> min >> sec; 847 848 if (_prn.at(0) != 'G') { 849 _prn = QString("G%1").arg(_prn.toInt(), 2, 10, QLatin1Char('0')); 850 } 851 846 QString prnStr; 847 in >> prnStr >> year >> month >> day >> hour >> min >> sec; 848 if (prnStr.at(0) == 'G') { 849 _prn.set('G', prnStr.mid(1).toInt()); 850 } 851 else { 852 _prn.set('G', prnStr.toInt()); 853 } 854 852 855 if (year < 80) { 853 856 year += 2000; … … 964 967 double sec; 965 968 966 in >> _prn >> year >> month >> day >> hour >> min >> sec; 967 968 if (_prn.at(0) != 'R') { 969 _prn = QString("R%1").arg(_prn.toInt(), 2, 10, QLatin1Char('0')); 970 } 971 969 QString prnStr; 970 in >> prnStr >> year >> month >> day >> hour >> min >> sec; 971 if (prnStr.at(0) == 'R') { 972 _prn.set('R', prnStr.mid(1).toInt()); 973 } 974 else { 975 _prn.set('R', prnStr.toInt()); 976 } 977 972 978 if (year < 80) { 973 979 year += 2000; … … 1066 1072 double sec; 1067 1073 1068 in >> _prn >> year >> month >> day >> hour >> min >> sec; 1069 1070 if (_prn.at(0) != 'E') { 1071 _prn = QString("E%1").arg(_prn.toInt(), 2, 10, QLatin1Char('0')); 1072 } 1073 1074 QString prnStr; 1075 in >> prnStr >> year >> month >> day >> hour >> min >> sec; 1076 if (prnStr.at(0) == 'E') { 1077 _prn.set('E', prnStr.mid(1).toInt()); 1078 } 1079 else { 1080 _prn.set('E', prnStr.toInt()); 1081 } 1082 1074 1083 if (year < 80) { 1075 1084 year += 2000; … … 1152 1161 // 1153 1162 ////////////////////////////////////////////////////////////////////////////// 1154 QString t_eph::rinexDateStr(const bncTime& tt, const QString& prn, 1155 double version) { 1163 QString t_eph::rinexDateStr(const bncTime& tt, const t_prn& prn, double version) { 1164 QString prnStr(prn.toString().c_str()); 1165 return rinexDateStr(tt, prnStr, version); 1166 } 1167 1168 // 1169 ////////////////////////////////////////////////////////////////////////////// 1170 QString t_eph::rinexDateStr(const bncTime& tt, const QString& prnStr, double version) { 1156 1171 1157 1172 QString datStr; … … 1165 1180 1166 1181 if (version < 3.0) { 1167 QString prnHlp = prn .mid(1,2); if (prnHlp[0] == '0') prnHlp[0] = ' ';1182 QString prnHlp = prnStr.mid(1,2); if (prnHlp[0] == '0') prnHlp[0] = ' '; 1168 1183 out << prnHlp << QString(" %1 %2 %3 %4 %5%6") 1169 1184 .arg(year % 100, 2, 10, QChar('0')) … … 1175 1190 } 1176 1191 else { 1177 out << prn << QString(" %1 %2 %3 %4 %5 %6")1192 out << prnStr << QString(" %1 %2 %3 %4 %5 %6") 1178 1193 .arg(year, 4) 1179 1194 .arg(month, 2, 10, QChar('0')) -
trunk/BNC/src/ephemeris.h
r5749 r5776 8 8 #include "bnctime.h" 9 9 #include "bncconst.h" 10 #include "t_prn.h" 10 11 extern "C" { 11 12 #include "rtcm3torinex.h" … … 41 42 return earlierTime(eph, this); 42 43 } 43 QString prn() const {return _prn;} 44 char system() const {return _prn[0].toAscii();} 44 t_prn prn() const {return _prn;} 45 45 const QDateTime& receptDateTime() const {return _receptDateTime;} 46 46 … … 63 63 virtual int slotNum() const {return 0;} 64 64 65 static QString rinexDateStr(const bncTime& tt, const QString& prn,65 static QString rinexDateStr(const bncTime& tt, const t_prn& prn, 66 66 double version); 67 67 68 static QString rinexDateStr(const bncTime& tt, const QString& prnStr, 69 double version); 70 68 71 protected: 69 QString_prn;72 t_prn _prn; 70 73 bncTime _TOC; 71 74 QDateTime _receptDateTime; -
trunk/BNC/src/rinex/reqcanalyze.cpp
r5368 r5776 247 247 if (obs.satSys == 'R') { 248 248 for (int ie = 0; ie < _ephs.size(); ie++) { 249 if ( _ephs[ie]->prn() == prn) {249 if (QString(_ephs[ie]->prn().toString().c_str()) == prn) { 250 250 ephGlo = dynamic_cast<t_ephGlo*>(_ephs[ie]); 251 251 break; … … 536 536 t_eph* eph = 0; 537 537 for (int ie = 0; ie < _ephs.size(); ie++) { 538 if ( _ephs[ie]->prn() == prn) {538 if (QString(_ephs[ie]->prn().toString().c_str()) == prn) { 539 539 eph = _ephs[ie]; 540 540 break; … … 746 746 t_eph* eph = 0; 747 747 for (int ie = 0; ie < _ephs.size(); ie++) { 748 if ( _ephs[ie]->prn() == prn) {748 if (QString(_ephs[ie]->prn().toString().c_str()) == prn) { 749 749 eph = _ephs[ie]; 750 750 break; -
trunk/BNC/src/rinex/rnxnavfile.cpp
r5738 r5776 208 208 t_eph* eph = *it; 209 209 double dt = eph->TOC() - tt; 210 if (dt < 8*3600.0 && eph->prn() == prn && eph->IOD() == iod) {210 if (dt < 8*3600.0 && QString(eph->prn().toString().c_str()) == prn && eph->IOD() == iod) { 211 211 it = _ephs.erase(it); 212 212 return eph; -
trunk/BNC/src/upload/bncrtnetuploadcaster.cpp
r5672 r5776 690 690 691 691 outLine.sprintf("%d %.1f %s %3d %10.3f %8.3f %8.3f %8.3f\n", 692 GPSweek, GPSweeks, eph->prn().to Ascii().data(),692 GPSweek, GPSweeks, eph->prn().toString().c_str(), 693 693 eph->IOD(), dClk, rsw(1), rsw(2), rsw(3)); 694 694
Note:
See TracChangeset
for help on using the changeset viewer.