- Timestamp:
- Apr 30, 2015, 10:37:30 PM (10 years ago)
- Location:
- trunk/BNC/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/bncephuser.cpp
r6798 r6809 150 150 } 151 151 152 QString prn(newEph->prn().to String().c_str());152 QString prn(newEph->prn().toInternalString().c_str()); 153 153 154 154 const t_eph* ephOld = ephLast(prn); 155 155 156 if (ephOld == 0 || 157 newEph->isNewerThan(ephOld) || 158 newEph->hasOtherFlagsThan(ephOld)) { 156 if (ephOld == 0 || newEph->isNewerThan(ephOld)) { 159 157 deque<t_eph*>& qq = _eph[prn]; 160 158 qq.push_back(newEph); … … 201 199 // ---------------------------------------- 202 200 const double MAXDIFF = 1000.0; 203 QString prn = QString(eph->prn().to String().c_str());201 QString prn = QString(eph->prn().toInternalString().c_str()); 204 202 t_eph* ephL = ephLast(prn); 205 203 if (ephL) { … … 212 210 213 211 if (diff < MAXDIFF) { 214 if(dt != 0.0 || eph->hasOtherFlagsThan(ephL)) {212 if(dt != 0.0) { 215 213 eph->setCheckState(t_eph::ok); 216 214 ephL->setCheckState(t_eph::ok); -
trunk/BNC/src/ephemeris.cpp
r6803 r6809 23 23 _orbCorr = 0; 24 24 _clkCorr = 0; 25 _flags = 0;26 25 } 27 26 … … 798 797 ////////////////////////////////////////////////////////////////////////////// 799 798 t_ephGal::t_ephGal(float rnxVersion, const QStringList& lines) { 800 799 int year, month, day, hour, min; 800 double sec; 801 QString prnStr; 801 802 const int nLines = 8; 802 803 803 if (lines.size() != nLines) { 804 804 _checkState = bad; 805 805 return; 806 806 } 807 _flags = 0; 807 808 808 809 // RINEX Format … … 826 827 QTextStream in(line.left(pos[1]).toAscii()); 827 828 828 int year, month, day, hour, min;829 double sec;830 831 QString prnStr;832 829 in >> prnStr >> year >> month >> day >> hour >> min >> sec; 833 if (prnStr.at(0) == 'E') {834 _prn.set('E', prnStr.mid(1).toInt());835 }836 else {837 _prn.set('E', prnStr.toInt());838 }839 840 830 if (year < 80) { 841 831 year += 2000; … … 936 926 // Bit 7-8 937 927 _E5bHS = double((int(SVhealth) >> 7) & 0x3); 928 929 if (prnStr.at(0) == 'E') { 930 _prn.set('E', prnStr.mid(1,2).toInt(), _flags); 931 } 932 else { 933 _prn.set('E', prnStr.mid(1,2).toInt(), _flags); 934 } 938 935 } 939 936 } … … 954 951 _receptDateTime = currentDateAndTimeGPS(); 955 952 956 _prn.set('E', ee->satellite); 953 _flags = ee->flags; 954 _prn.set('E', ee->satellite, _flags); 957 955 958 956 _TOC.set(ee->Week, ee->TOC); … … 994 992 995 993 _TOT = 0.9999e9; 996 997 _flags = ee->flags;998 994 } 999 995 -
trunk/BNC/src/ephemeris.h
r6798 r6809 34 34 void setCheckState(e_checkState checkState) {_checkState = checkState;} 35 35 t_prn prn() const {return _prn;} 36 int flags() const {return _flags;}37 bool hasOtherFlagsThan(const t_eph* eph) {return differentFlags(eph, this);}38 36 t_irc getCrd(const bncTime& tt, ColumnVector& xc, ColumnVector& vv, bool useCorr) const; 39 37 void setOrbCorr(const t_orbCorr* orbCorr); … … 43 41 static QString rinexDateStr(const bncTime& tt, const QString& prnStr, double version); 44 42 static bool earlierTime(const t_eph* eph1, const t_eph* eph2) {return eph1->_TOC < eph2->_TOC;} 45 static bool differentFlags(const t_eph* eph1, const t_eph* eph2) {return eph1->_flags != eph2->_flags;}46 43 47 44 protected: … … 49 46 t_prn _prn; 50 47 bncTime _TOC; 51 int _flags;52 48 QDateTime _receptDateTime; 53 49 e_checkState _checkState; … … 155 151 friend class t_ephEncoder; 156 152 public: 157 t_ephGal() { }153 t_ephGal() : _flags(0) { }; 158 154 t_ephGal(float rnxVersion, const QStringList& lines); 159 155 virtual ~t_ephGal() {} … … 192 188 193 189 double _IDOT; // [rad/s] 194 double _TOEweek;190 double _TOEweek; 195 191 // spare 196 192 … … 202 198 double _BGD_1_5B; // group delay [s] 203 199 204 double _TOT; // [s] 200 double _TOT; // [s] 201 202 int _flags; // GALEPHF_E5ADINVALID E5aDVS set invalid 203 // GALEPHF_E5BDINVALID E5bDVS set invalid 204 // GALEPHF_INAV INAV data 205 // GALEPHF_FNAV FNAV data 206 // GALEPHF_E1DINVALID E1DVS set invalid 205 207 }; 206 208 -
trunk/BNC/src/rinex/reqcedit.cpp
r6804 r6809 546 546 const t_eph* ephOld = ephs[iOld]; 547 547 if (ephOld->prn() == eph->prn() && 548 ephOld->TOC() == eph->TOC() && 549 ephOld->flags() == eph->flags()) { 548 ephOld->TOC() == eph->TOC()) { 550 549 isNew = false; 551 550 break; -
trunk/BNC/src/t_prn.cpp
r6321 r6809 36 36 stringstream ss; 37 37 ss << _system << setfill('0') << setw(2) << _number; 38 return ss.str(); 39 } 40 41 // 42 ////////////////////////////////////////////////////////////////////////////// 43 string t_prn::toInternalString() const { 44 stringstream ss; 45 ss << _system << setfill('0') << setw(2) << _number << '_' << _flags; 38 46 return ss.str(); 39 47 } -
trunk/BNC/src/t_prn.h
r6321 r6809 5 5 6 6 class t_prn { 7 8 static const unsigned MAXPRN_GPS 7 public: 8 static const unsigned MAXPRN_GPS = 32; 9 9 static const unsigned MAXPRN_GLONASS = 26; 10 10 static const unsigned MAXPRN_GALILEO = 36; 11 static const unsigned MAXPRN_QZSS 12 static const unsigned MAXPRN_SBAS 13 static const unsigned MAXPRN_BDS 14 static const unsigned MAXPRN = MAXPRN_GPS+ MAXPRN_GLONASS + MAXPRN_GALILEO15 + MAXPRN_QZSS + MAXPRN_SBAS+ MAXPRN_BDS;11 static const unsigned MAXPRN_QZSS = 10; 12 static const unsigned MAXPRN_SBAS = 38; 13 static const unsigned MAXPRN_BDS = 37; 14 static const unsigned MAXPRN = MAXPRN_GPS + MAXPRN_GLONASS + MAXPRN_GALILEO 15 + MAXPRN_QZSS + MAXPRN_SBAS + MAXPRN_BDS; 16 16 17 t_prn() : _system('G'), _number(0) {} 18 t_prn(char system, int number) : _system(system), _number(number) {} 17 t_prn() : 18 _system('G'), _number(0), _flags(0) { 19 } 20 t_prn(char system, int number) : 21 _system(system), _number(number), _flags(0) { 22 } 19 23 20 ~t_prn() {}; 24 t_prn(char system, int number, int flags) : 25 _system(system), _number(number), _flags(flags) { 26 } 21 27 22 void set(char system, int number) {_system = system; _number = number;}23 void set(const std::string& str);28 ~t_prn() { 29 } 24 30 25 char system() const {return _system;} 26 int number() const {return _number;} 27 int toInt() const; 31 void set(char system, int number) { 32 _system = system; 33 _number = number; 34 _flags = 0; 35 } 36 37 void set(char system, int number, int flags) { 38 _system = system; 39 _number = number; 40 _flags = flags; 41 } 42 43 void set(const std::string& str); 44 45 char system() const { 46 return _system; 47 } 48 int number() const { 49 return _number; 50 } 51 int flags() const { 52 return _flags; 53 } 54 int toInt() const; 28 55 std::string toString() const; 56 std::string toInternalString() const; 29 57 30 58 bool operator==(const t_prn& prn2) const { 31 if (_system == prn2._system && _number == prn2._number) { 59 if (_system == prn2._system && _number == prn2._number 60 && _flags == prn2._flags) { 32 61 return true; 33 62 } … … 39 68 operator unsigned() const; 40 69 41 friend std::istream& operator >> 70 friend std::istream& operator >>(std::istream& in, t_prn& prn); 42 71 43 72 private: 44 73 char _system; 45 int _number; 74 int _number; 75 int _flags; 46 76 }; 47 77 48 std::istream& operator >> 78 std::istream& operator >>(std::istream& in, t_prn& prn); 49 79 50 80 #endif
Note:
See TracChangeset
for help on using the changeset viewer.