- Timestamp:
- Feb 3, 2012, 5:34:05 PM (13 years ago)
- Location:
- trunk/BNC
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/RTCM3/ephemeris.cpp
r3538 r3659 99 99 100 100 _TGD = ee->TGD; 101 102 _ok = true; 101 103 } 102 104 … … 492 494 _xv(5) = _y_velocity * 1.e3; 493 495 _xv(6) = _z_velocity * 1.e3; 496 497 _ok = true; 494 498 } 495 499 … … 613 617 _OMEGADOT = ee->OMEGADOT; 614 618 _IDOT = ee->IDOT; 619 620 _ok = true; 615 621 } 616 622 … … 783 789 return size; 784 790 } 791 792 // Constructor 793 ////////////////////////////////////////////////////////////////////////////// 794 t_ephGPS::t_ephGPS(float rnxVersion, const QStringList& lines) { 795 796 _ok = false; 797 } 798 799 // Constructor 800 ////////////////////////////////////////////////////////////////////////////// 801 t_ephGlo::t_ephGlo(float rnxVersion, const QStringList& lines) { 802 803 _ok = false; 804 } 805 806 // Constructor 807 ////////////////////////////////////////////////////////////////////////////// 808 t_ephGal::t_ephGal(float rnxVersion, const QStringList& lines) { 809 810 _ok = false; 811 } -
trunk/BNC/RTCM3/ephemeris.h
r3255 r3659 12 12 class t_eph { 13 13 public: 14 t_eph() {_ok = false;} 14 15 virtual ~t_eph() {}; 15 16 17 bool ok() const {return _ok;} 16 18 bool isNewerThan(const t_eph* eph) const; 17 19 QString prn() const {return _prn;} … … 49 51 double _GPSweeks; 50 52 QDateTime _receptDateTime; 53 bool _ok; 51 54 }; 52 55 … … 55 58 public: 56 59 t_ephGPS() { } 60 t_ephGPS(float rnxVersion, const QStringList& lines); 57 61 virtual ~t_ephGPS() {} 58 62 double TOC() const {return _TOC;} … … 105 109 public: 106 110 t_ephGlo() { _xv.ReSize(6); } 111 t_ephGlo(float rnxVersion, const QStringList& lines); 107 112 108 113 virtual ~t_ephGlo() {} … … 146 151 public: 147 152 t_ephGal() { } 153 t_ephGal(float rnxVersion, const QStringList& lines); 148 154 virtual ~t_ephGal() {} 149 155 double TOC() const {return _TOC;} -
trunk/BNC/rnxnavfile.cpp
r3658 r3659 42 42 #include "rnxnavfile.h" 43 43 #include "bncutils.h" 44 #include "RTCM3/ephemeris.h" 44 45 45 46 using namespace std; … … 49 50 t_rnxNavFile::t_rnxNavHeader::t_rnxNavHeader() { 50 51 _version = 0.0; 52 _glonass = false; 51 53 } 52 54 … … 72 74 QTextStream in(value.toAscii(), QIODevice::ReadOnly); 73 75 in >> _version; 76 if (value.indexOf("GLONASS") != -1) { 77 _glonass = true; 78 } 74 79 } 75 80 } … … 96 101 } 97 102 103 // Read Next Ephemeris 104 //////////////////////////////////////////////////////////////////////////// 105 t_irc t_rnxNavFile::getNextEph(t_eph* eph) { 106 107 while (_stream->status() == QTextStream::Ok && !_stream->atEnd()) { 108 QString line = _stream->readLine(); 109 if (line.isEmpty()) { 110 continue; 111 } 112 QStringList hlp = line.split(QRegExp("\\s+"), QString::SkipEmptyParts); 113 QString prn; 114 if (version() >= 3.0) { 115 prn = hlp.at(0); 116 } 117 else { 118 if (glonass()) { 119 prn = 'R' + QString("%1").arg(hlp.at(0).toInt(), 2, QChar('0')); 120 } 121 else { 122 prn = 'G' + QString("%1").arg(hlp.at(0).toInt(), 2, QChar('0')); 123 } 124 } 125 QStringList lines; lines << line; 126 if (prn[0] == 'G') { 127 for (int ii = 1; ii < 8; ii++) { 128 lines << _stream->readLine(); 129 } 130 eph = new t_ephGPS(version(), lines); 131 } 132 else if (prn[0] == 'R') { 133 for (int ii = 1; ii < 4; ii++) { 134 lines << _stream->readLine(); 135 } 136 eph = new t_ephGlo(version(), lines); 137 } 138 else if (prn[0] == 'E') { 139 for (int ii = 1; ii < 8; ii++) { 140 lines << _stream->readLine(); 141 } 142 eph = new t_ephGal(version(), lines); 143 } 144 else { 145 return failure; 146 } 147 if (!eph->ok()) { 148 delete eph; 149 eph = 0; 150 return failure; 151 } 152 } 153 154 return success; 155 } -
trunk/BNC/rnxnavfile.h
r3658 r3659 31 31 class t_pppOpt; 32 32 class bncPPPclient; 33 class t_eph; 33 34 34 35 class t_rnxNavFile { … … 39 40 ~t_rnxNavHeader(); 40 41 t_irc read(QTextStream* stream); 42 float version() const {return _version;} 43 bool glonass() const {return _glonass;} 41 44 private: 42 45 float _version; 46 bool _glonass; 43 47 }; 44 48 … … 46 50 t_rnxNavFile(QString fileName); 47 51 ~t_rnxNavFile(); 52 t_irc getNextEph(t_eph* eph); 53 float version() const {return _header.version();} 54 bool glonass() const {return _header.glonass();} 48 55 49 56 private:
Note:
See TracChangeset
for help on using the changeset viewer.