- Timestamp:
- Dec 16, 2007, 4:27:13 PM (17 years ago)
- Location:
- trunk/BNC
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/RTCM/GPSDecoder.h
r621 r622 29 29 #include <QList> 30 30 31 class Observation : public QObject{ 32 public: 33 Observation() { 34 flags = 0; 35 StatID[0] = '\0'; 36 satSys = 'G'; 37 satNum = 0; 38 slot = 0; 39 GPSWeek = 0; 40 GPSWeeks = 0.0; 41 C1 = 0.0; 42 C2 = 0.0; 43 P1 = 0.0; 44 P2 = 0.0; 45 L1 = 0.0; 46 L2 = 0.0; 47 S1 = 0.0; 48 S2 = 0.0; 49 SNR1 = 0; 50 SNR2 = 0; 51 } 31 class t_obsInternal { 32 public: 52 33 int flags; 53 34 char StatID[20+1];// Station ID … … 69 50 }; 70 51 71 typedef QPointer<Observation> p_obs; 52 class t_obs : public QObject{ 53 public: 54 55 t_obs() { 56 _o.flags = 0; 57 _o.StatID[0] = '\0'; 58 _o.satSys = 'G'; 59 _o.satNum = 0; 60 _o.slot = 0; 61 _o.GPSWeek = 0; 62 _o.GPSWeeks = 0.0; 63 _o.C1 = 0.0; 64 _o.C2 = 0.0; 65 _o.P1 = 0.0; 66 _o.P2 = 0.0; 67 _o.L1 = 0.0; 68 _o.L2 = 0.0; 69 _o.S1 = 0.0; 70 _o.S2 = 0.0; 71 _o.SNR1 = 0; 72 _o.SNR2 = 0; 73 } 74 75 t_obsInternal _o; 76 }; 77 78 typedef QPointer<t_obs> p_obs; 72 79 73 80 class GPSDecoder { 74 public: 75 virtual void Decode(char* buffer, int bufLen) = 0; 76 virtual ~GPSDecoder() {} 77 QList<p_obs> _obsList; 81 public: 82 virtual void Decode(char* buffer, int bufLen) = 0; 83 84 virtual ~GPSDecoder() { 85 QListIterator<p_obs> it(_obsList); 86 while (it.hasNext()) { 87 delete it.next(); 88 } 89 } 90 91 QList<p_obs> _obsList; 78 92 }; 79 93 -
trunk/BNC/RTCM/RTCM2Decoder.cpp
r621 r622 58 58 59 59 RTCM2Decoder::~RTCM2Decoder() { 60 QListIterator<p_obs> it(_obsList);61 while (it.hasNext()) {62 delete it.next();63 }64 _obsList.clear();65 60 } 66 61 … … 91 86 92 87 for (int iSat=0; iSat < _ObsBlock.nSat; iSat++) { 93 Observation* obs = new Observation();88 p_obs obs = new t_obs(); 94 89 if (_ObsBlock.PRN[iSat] > 100) { 95 obs-> satNum = _ObsBlock.PRN[iSat] % 100;96 obs-> satSys = 'R';90 obs->_o.satNum = _ObsBlock.PRN[iSat] % 100; 91 obs->_o.satSys = 'R'; 97 92 } 98 93 else { 99 obs-> satNum = _ObsBlock.PRN[iSat];100 obs-> satSys = 'G';94 obs->_o.satNum = _ObsBlock.PRN[iSat]; 95 obs->_o.satSys = 'G'; 101 96 } 102 obs-> GPSWeek = epochWeek;103 obs-> GPSWeeks = epochSecs;104 obs-> C1 = _ObsBlock.rng_C1[iSat];105 obs-> P1 = _ObsBlock.rng_P1[iSat];106 obs-> P2 = _ObsBlock.rng_P2[iSat];107 obs-> L1 = _ObsBlock.resolvedPhase_L1(iSat);108 obs-> L2 = _ObsBlock.resolvedPhase_L2(iSat);97 obs->_o.GPSWeek = epochWeek; 98 obs->_o.GPSWeeks = epochSecs; 99 obs->_o.C1 = _ObsBlock.rng_C1[iSat]; 100 obs->_o.P1 = _ObsBlock.rng_P1[iSat]; 101 obs->_o.P2 = _ObsBlock.rng_P2[iSat]; 102 obs->_o.L1 = _ObsBlock.resolvedPhase_L1(iSat); 103 obs->_o.L2 = _ObsBlock.resolvedPhase_L2(iSat); 109 104 110 105 _obsList.push_back(obs); -
trunk/BNC/RTCM3/RTCM3Decoder.cpp
r621 r622 84 84 //////////////////////////////////////////////////////////////////////////// 85 85 RTCM3Decoder::~RTCM3Decoder() { 86 QListIterator<p_obs> it(_obsList);87 while (it.hasNext()) {88 delete it.next();89 }90 _obsList.clear();91 86 } 92 87 … … 116 111 117 112 for (int ii = 0; ii < _Parser.Data.numsats; ii++) { 118 Observation* obs = new Observation();113 p_obs obs = new t_obs(); 119 114 if (_Parser.Data.satellites[ii] <= PRN_GPS_END) { 120 obs-> satSys = 'G';121 obs-> satNum = _Parser.Data.satellites[ii];115 obs->_o.satSys = 'G'; 116 obs->_o.satNum = _Parser.Data.satellites[ii]; 122 117 } 123 118 else if (_Parser.Data.satellites[ii] <= PRN_GLONASS_END) { 124 obs-> satSys = 'R';125 obs-> satNum = _Parser.Data.satellites[ii] - PRN_GLONASS_START + 1;119 obs->_o.satSys = 'R'; 120 obs->_o.satNum = _Parser.Data.satellites[ii] - PRN_GLONASS_START + 1; 126 121 } 127 122 else { 128 obs-> satSys = 'S';129 obs-> satNum = _Parser.Data.satellites[ii] - PRN_WAAS_START + 20;123 obs->_o.satSys = 'S'; 124 obs->_o.satNum = _Parser.Data.satellites[ii] - PRN_WAAS_START + 20; 130 125 } 131 obs-> GPSWeek = _Parser.Data.week;132 obs-> GPSWeeks = _Parser.Data.timeofweek / 1000.0;126 obs->_o.GPSWeek = _Parser.Data.week; 127 obs->_o.GPSWeeks = _Parser.Data.timeofweek / 1000.0; 133 128 134 129 for (int jj = 0; jj < _Parser.numdatatypesGPS; jj++) { … … 155 150 { 156 151 if (_Parser.dataflag[jj] & GNSSDF_C1DATA) { 157 obs-> C1 = _Parser.Data.measdata[ii][_Parser.datapos[jj]];152 obs->_o.C1 = _Parser.Data.measdata[ii][_Parser.datapos[jj]]; 158 153 } 159 154 else if (_Parser.dataflag[jj] & GNSSDF_C2DATA) { 160 obs-> C2 = _Parser.Data.measdata[ii][_Parser.datapos[jj]];155 obs->_o.C2 = _Parser.Data.measdata[ii][_Parser.datapos[jj]]; 161 156 } 162 157 else if (_Parser.dataflag[jj] & GNSSDF_P1DATA) { 163 obs-> P1 = _Parser.Data.measdata[ii][_Parser.datapos[jj]];158 obs->_o.P1 = _Parser.Data.measdata[ii][_Parser.datapos[jj]]; 164 159 } 165 160 else if (_Parser.dataflag[jj] & GNSSDF_P2DATA) { 166 obs-> P2 = _Parser.Data.measdata[ii][_Parser.datapos[jj]];161 obs->_o.P2 = _Parser.Data.measdata[ii][_Parser.datapos[jj]]; 167 162 } 168 163 else if (df & (GNSSDF_L1CDATA|GNSSDF_L1PDATA)) { 169 obs-> L1 = _Parser.Data.measdata[ii][pos];170 obs-> SNR1 = _Parser.Data.snrL1[ii];164 obs->_o.L1 = _Parser.Data.measdata[ii][pos]; 165 obs->_o.SNR1 = _Parser.Data.snrL1[ii]; 171 166 } 172 167 else if (df & (GNSSDF_L2CDATA|GNSSDF_L2PDATA)) { 173 obs-> L2 = _Parser.Data.measdata[ii][pos];174 obs-> SNR2 = _Parser.Data.snrL2[ii];168 obs->_o.L2 = _Parser.Data.measdata[ii][pos]; 169 obs->_o.SNR2 = _Parser.Data.snrL2[ii]; 175 170 } 176 171 else if (df & (GNSSDF_S1CDATA|GNSSDF_S1PDATA)) { 177 obs-> S1 = _Parser.Data.measdata[ii][pos];172 obs->_o.S1 = _Parser.Data.measdata[ii][pos]; 178 173 } 179 174 else if (df & (GNSSDF_S2CDATA|GNSSDF_S2PDATA)) { 180 obs-> S2 = _Parser.Data.measdata[ii][pos];175 obs->_o.S2 = _Parser.Data.measdata[ii][pos]; 181 176 } 182 177 } -
trunk/BNC/RTIGS/RTIGSDecoder.cpp
r621 r622 55 55 //////////////////////////////////////////////////////////////////////////// 56 56 RTIGSDecoder::~RTIGSDecoder() { 57 QListIterator<p_obs> it(_obsList);58 while (it.hasNext()) {59 delete it.next();60 }61 _obsList.clear();62 57 } 63 58 … … 109 104 110 105 for (short ii = 0; ii < numObs; ii++) { 111 Observation* obs = new Observation();112 obs-> satSys = 'G';113 obs-> satNum = _GPSTrans.DecObs.Obs[ii].sat_prn;114 obs-> GPSWeek = _GPSTrans.DecObs.Obs[ii].GPSTime / (7 * 86400);115 obs-> GPSWeeks = _GPSTrans.DecObs.Obs[ii].GPSTime % (7 * 86400);116 obs-> C1 = _GPSTrans.DecObs.Obs[ii].l1_pseudo_range;117 obs-> P1 = _GPSTrans.DecObs.Obs[ii].p1_pseudo_range;118 obs-> P2 = _GPSTrans.DecObs.Obs[ii].p2_pseudo_range;119 obs-> L1 = _GPSTrans.DecObs.Obs[ii].p1_phase;120 obs-> L2 = _GPSTrans.DecObs.Obs[ii].p2_phase;121 obs-> S1 = _GPSTrans.DecObs.Obs[ii].l1_sn;122 obs-> S2 = _GPSTrans.DecObs.Obs[ii].l2_sn;123 obs-> SNR1 = int(ceil(_GPSTrans.DecObs.Obs[ii].l1_sn / 60.0 * 9.0));124 obs-> SNR2 = int(ceil(_GPSTrans.DecObs.Obs[ii].l2_sn / 60.0 * 9.0));106 p_obs obs = new t_obs(); 107 obs->_o.satSys = 'G'; 108 obs->_o.satNum = _GPSTrans.DecObs.Obs[ii].sat_prn; 109 obs->_o.GPSWeek = _GPSTrans.DecObs.Obs[ii].GPSTime / (7 * 86400); 110 obs->_o.GPSWeeks = _GPSTrans.DecObs.Obs[ii].GPSTime % (7 * 86400); 111 obs->_o.C1 = _GPSTrans.DecObs.Obs[ii].l1_pseudo_range; 112 obs->_o.P1 = _GPSTrans.DecObs.Obs[ii].p1_pseudo_range; 113 obs->_o.P2 = _GPSTrans.DecObs.Obs[ii].p2_pseudo_range; 114 obs->_o.L1 = _GPSTrans.DecObs.Obs[ii].p1_phase; 115 obs->_o.L2 = _GPSTrans.DecObs.Obs[ii].p2_phase; 116 obs->_o.S1 = _GPSTrans.DecObs.Obs[ii].l1_sn; 117 obs->_o.S2 = _GPSTrans.DecObs.Obs[ii].l2_sn; 118 obs->_o.SNR1 = int(ceil(_GPSTrans.DecObs.Obs[ii].l1_sn / 60.0 * 9.0)); 119 obs->_o.SNR2 = int(ceil(_GPSTrans.DecObs.Obs[ii].l2_sn / 60.0 * 9.0)); 125 120 126 121 _obsList.push_back(obs); -
trunk/BNC/bnccaster.cpp
r605 r622 83 83 } 84 84 85 _epochs = new QMultiMap<long, Observation*>;85 _epochs = new QMultiMap<long, p_obs>; 86 86 87 87 _lastDumpSec = 0; … … 109 109 delete _sockets; 110 110 if (_epochs) { 111 QListIterator< Observation*> it(_epochs->values());111 QListIterator<p_obs> it(_epochs->values()); 112 112 while (it.hasNext()) { 113 113 delete it.next(); … … 119 119 // New Observations 120 120 //////////////////////////////////////////////////////////////////////////// 121 void bncCaster::newObs(const QByteArray staID, bool firstObs, 122 Observation* obs) { 121 void bncCaster::newObs(const QByteArray staID, bool firstObs, p_obs obs) { 123 122 124 123 QMutexLocker locker(&_mutex); 125 124 126 long iSec = long(floor(obs-> GPSWeeks+0.5));127 long newTime = obs-> GPSWeek * 7*24*3600 + iSec;125 long iSec = long(floor(obs->_o.GPSWeeks+0.5)); 126 long newTime = obs->_o.GPSWeek * 7*24*3600 + iSec; 128 127 129 128 // Rename the Station 130 129 // ------------------ 131 strncpy(obs-> StatID, staID.constData(),sizeof(obs->StatID));132 obs-> StatID[sizeof(obs->StatID)-1] = '\0';130 strncpy(obs->_o.StatID, staID.constData(),sizeof(obs->_o.StatID)); 131 obs->_o.StatID[sizeof(obs->_o.StatID)-1] = '\0'; 133 132 134 133 // First time, set the _lastDumpSec immediately … … 174 173 //////////////////////////////////////////////////////////////////////////// 175 174 void bncCaster::addGetThread(bncGetThread* getThread) { 176 connect(getThread, SIGNAL(newObs(const QByteArray, bool, Observation*)),177 this, SLOT(newObs(const QByteArray, bool, Observation*)));175 connect(getThread, SIGNAL(newObs(const QByteArray, bool, p_obs)), 176 this, SLOT(newObs(const QByteArray, bool, p_obs))); 178 177 179 178 connect(getThread, SIGNAL(error(const QByteArray)), … … 208 207 209 208 bool first = true; 210 QList< Observation*> allObs = _epochs->values(sec);211 QListIterator< Observation*> it(allObs);209 QList<p_obs> allObs = _epochs->values(sec); 210 QListIterator<p_obs> it(allObs); 212 211 while (it.hasNext()) { 213 Observation*obs = it.next();212 p_obs obs = it.next(); 214 213 215 214 if (_samplingRate == 0 || sec % _samplingRate == 0) { … … 221 220 _out->setFieldWidth(1); *_out << begEpoch << endl;; 222 221 } 223 _out->setFieldWidth(0); *_out << obs-> StatID;224 _out->setFieldWidth(1); *_out << " " << obs-> satSys;222 _out->setFieldWidth(0); *_out << obs->_o.StatID; 223 _out->setFieldWidth(1); *_out << " " << obs->_o.satSys; 225 224 _out->setPadChar('0'); 226 _out->setFieldWidth(2); *_out << obs-> satNum;225 _out->setFieldWidth(2); *_out << obs->_o.satNum; 227 226 _out->setPadChar(' '); 228 227 _out->setFieldWidth(1); *_out << " "; 229 _out->setFieldWidth(4); *_out << obs-> GPSWeek;230 _out->setFieldWidth(1); *_out << " "; 231 _out->setFieldWidth(14); _out->setRealNumberPrecision(7); *_out << obs-> GPSWeeks;232 _out->setFieldWidth(1); *_out << " "; 233 _out->setFieldWidth(14); _out->setRealNumberPrecision(3); *_out << obs-> C1;234 _out->setFieldWidth(1); *_out << " "; 235 _out->setFieldWidth(14); _out->setRealNumberPrecision(3); *_out << obs-> C2;236 _out->setFieldWidth(1); *_out << " "; 237 _out->setFieldWidth(14); _out->setRealNumberPrecision(3); *_out << obs-> P1;238 _out->setFieldWidth(1); *_out << " "; 239 _out->setFieldWidth(14); _out->setRealNumberPrecision(3); *_out << obs-> P2;240 _out->setFieldWidth(1); *_out << " "; 241 _out->setFieldWidth(14); _out->setRealNumberPrecision(3); *_out << obs-> L1;242 _out->setFieldWidth(1); *_out << " "; 243 _out->setFieldWidth(14); _out->setRealNumberPrecision(3); *_out << obs-> L2;244 _out->setFieldWidth(1); *_out << " "; 245 _out->setFieldWidth(14); _out->setRealNumberPrecision(3); *_out << obs-> S1;246 _out->setFieldWidth(1); *_out << " "; 247 _out->setFieldWidth(14); _out->setRealNumberPrecision(3); *_out << obs-> S2;228 _out->setFieldWidth(4); *_out << obs->_o.GPSWeek; 229 _out->setFieldWidth(1); *_out << " "; 230 _out->setFieldWidth(14); _out->setRealNumberPrecision(7); *_out << obs->_o.GPSWeeks; 231 _out->setFieldWidth(1); *_out << " "; 232 _out->setFieldWidth(14); _out->setRealNumberPrecision(3); *_out << obs->_o.C1; 233 _out->setFieldWidth(1); *_out << " "; 234 _out->setFieldWidth(14); _out->setRealNumberPrecision(3); *_out << obs->_o.C2; 235 _out->setFieldWidth(1); *_out << " "; 236 _out->setFieldWidth(14); _out->setRealNumberPrecision(3); *_out << obs->_o.P1; 237 _out->setFieldWidth(1); *_out << " "; 238 _out->setFieldWidth(14); _out->setRealNumberPrecision(3); *_out << obs->_o.P2; 239 _out->setFieldWidth(1); *_out << " "; 240 _out->setFieldWidth(14); _out->setRealNumberPrecision(3); *_out << obs->_o.L1; 241 _out->setFieldWidth(1); *_out << " "; 242 _out->setFieldWidth(14); _out->setRealNumberPrecision(3); *_out << obs->_o.L2; 243 _out->setFieldWidth(1); *_out << " "; 244 _out->setFieldWidth(14); _out->setRealNumberPrecision(3); *_out << obs->_o.S1; 245 _out->setFieldWidth(1); *_out << " "; 246 _out->setFieldWidth(14); _out->setRealNumberPrecision(3); *_out << obs->_o.S2; 248 247 _out->setFieldWidth(1); 249 *_out << " " << obs-> SNR1 << " " << obs->SNR2 << endl;248 *_out << " " << obs->_o.SNR1 << " " << obs->_o.SNR2 << endl; 250 249 if (!it.hasNext()) { 251 250 _out->setFieldWidth(1); *_out << endEpoch << endl; … … 257 256 // ---------------------- 258 257 if (_sockets) { 259 int numBytes = sizeof( *obs);258 int numBytes = sizeof(obs->_o); 260 259 QListIterator<QTcpSocket*> is(*_sockets); 261 260 while (is.hasNext()) { … … 266 265 } 267 266 sock->write(&begObs, 1); 268 sock->write((char*) obs, numBytes);267 sock->write((char*) &obs->_o, numBytes); 269 268 if (!it.hasNext()) { 270 269 sock->write(&endEpoch, 1); -
trunk/BNC/bnccaster.h
r464 r622 44 44 45 45 public slots: 46 void newObs(const QByteArray staID, bool firstObs, Observation*obs);46 void newObs(const QByteArray staID, bool firstObs, p_obs obs); 47 47 48 48 signals: … … 57 57 void dumpEpochs(long minTime, long maxTime); 58 58 59 QFile* 60 int 61 QTextStream* 62 QMultiMap<long, Observation*>* _epochs;63 long 64 QTcpServer* 65 QList<QTcpSocket*>* 66 QList<QByteArray> 67 QList<bncGetThread*> 68 int 69 long 70 QMutex 59 QFile* _outFile; 60 int _port; 61 QTextStream* _out; 62 QMultiMap<long, p_obs>* _epochs; 63 long _lastDumpSec; 64 QTcpServer* _server; 65 QList<QTcpSocket*>* _sockets; 66 QList<QByteArray> _staIDs; 67 QList<bncGetThread*> _threads; 68 int _samplingRate; 69 long _waitTime; 70 QMutex _mutex; 71 71 }; 72 72 -
trunk/BNC/bncgetthread.cpp
r621 r622 417 417 const double maxDt = 600.0; 418 418 419 if (week < obs-> GPSWeek) {419 if (week < obs->_o.GPSWeek) { 420 420 week += 1; 421 421 sec -= secPerWeek; 422 422 } 423 if (week > obs-> GPSWeek) {423 if (week > obs->_o.GPSWeek) { 424 424 week -= 1; 425 425 sec += secPerWeek; 426 426 } 427 double dt = fabs(sec - obs-> GPSWeeks);428 if (week != obs-> GPSWeek || dt > maxDt) {427 double dt = fabs(sec - obs->_o.GPSWeeks); 428 if (week != obs->_o.GPSWeek || dt > maxDt) { 429 429 emit( newMessage("Wrong observation epoch") ); 430 430 delete obs; … … 435 435 // ------------ 436 436 if (_rnx) { 437 long iSec = long(floor(obs-> GPSWeeks+0.5));438 long newTime = obs-> GPSWeek * 7*24*3600 + iSec;437 long iSec = long(floor(obs->_o.GPSWeeks+0.5)); 438 long newTime = obs->_o.GPSWeek * 7*24*3600 + iSec; 439 439 if (_samplingRate == 0 || iSec % _samplingRate == 0) { 440 440 _rnx->deepCopy(obs); -
trunk/BNC/bncgetthread.h
r464 r622 52 52 signals: 53 53 void newBytes(const QByteArray staID, double nbyte); 54 void newObs(const QByteArray staID, bool firstObs, Observation*obs);54 void newObs(const QByteArray staID, bool firstObs, p_obs obs); 55 55 void error(const QByteArray staID); 56 56 void newMessage(const QByteArray msg); -
trunk/BNC/bncrinex.cpp
r607 r622 96 96 //////////////////////////////////////////////////////////////////////////// 97 97 bncRinex::~bncRinex() { 98 QListIterator< Observation*> it(_obs);98 QListIterator<p_obs> it(_obs); 99 99 while (it.hasNext()) { 100 100 delete it.next(); … … 466 466 // Stores Observation into Internal Array 467 467 //////////////////////////////////////////////////////////////////////////// 468 void bncRinex::deepCopy(const Observation*obs) {469 Observation* newObs = new Observation();468 void bncRinex::deepCopy(const p_obs obs) { 469 p_obs newObs = new t_obs(); 470 470 memcpy(newObs, obs, sizeof(*obs)); 471 471 _obs.push_back(newObs); … … 478 478 // Select observations older than maxTime 479 479 // -------------------------------------- 480 QList< Observation*> dumpList;481 QMutableListIterator< Observation*> mIt(_obs);480 QList<p_obs> dumpList; 481 QMutableListIterator<p_obs> mIt(_obs); 482 482 while (mIt.hasNext()) { 483 Observation* ob= mIt.next();484 if (ob ->GPSWeek * 7*24*3600 + ob->GPSWeeks < maxTime - 0.05) {485 dumpList.push_back(ob );483 p_obs obs = mIt.next(); 484 if (obs->_o.GPSWeek * 7*24*3600 + obs->_o.GPSWeeks < maxTime - 0.05) { 485 dumpList.push_back(obs); 486 486 mIt.remove(); 487 487 } … … 496 496 // Time of Epoch 497 497 // ------------- 498 Observation*fObs = *dumpList.begin();499 QDateTime datTim = dateAndTimeFromGPSweek(fObs-> GPSWeek, fObs->GPSWeeks);500 QDateTime datTimNom = dateAndTimeFromGPSweek(fObs-> GPSWeek,501 floor(fObs-> GPSWeeks+0.5));498 p_obs fObs = *dumpList.begin(); 499 QDateTime datTim = dateAndTimeFromGPSweek(fObs->_o.GPSWeek, fObs->_o.GPSWeeks); 500 QDateTime datTimNom = dateAndTimeFromGPSweek(fObs->_o.GPSWeek, 501 floor(fObs->_o.GPSWeeks+0.5)); 502 502 503 503 // Close the file … … 514 514 } 515 515 516 double sec = double(datTim.time().second()) + fmod(fObs-> GPSWeeks,1.0);516 double sec = double(datTim.time().second()) + fmod(fObs->_o.GPSWeeks,1.0); 517 517 518 518 // RINEX Version 3 … … 523 523 << " " << 0 << setw(3) << dumpList.size() << endl; 524 524 525 QListIterator< Observation*> it(dumpList);525 QListIterator<p_obs> it(dumpList); 526 526 while (it.hasNext()) { 527 Observation* ob= it.next();528 _out << ob ->satSys529 << setw(2) << setfill('0') << ob ->satNum << setfill(' ')530 << setw(14) << setprecision(3) << ob ->C1 << " "531 << setw(14) << setprecision(3) << ob ->L1 << " "532 << setw(1) << ob ->SNR1533 << setw(14) << setprecision(3) << ob ->S1 << " "534 << setw(14) << setprecision(3) << ob ->P2 << " "535 << setw(14) << setprecision(3) << ob ->L2 << " "536 << setw(1) << ob ->SNR2537 << setw(14) << setprecision(3) << ob ->S2527 p_obs obs = it.next(); 528 _out << obs->_o.satSys 529 << setw(2) << setfill('0') << obs->_o.satNum << setfill(' ') 530 << setw(14) << setprecision(3) << obs->_o.C1 << " " 531 << setw(14) << setprecision(3) << obs->_o.L1 << " " 532 << setw(1) << obs->_o.SNR1 533 << setw(14) << setprecision(3) << obs->_o.S1 << " " 534 << setw(14) << setprecision(3) << obs->_o.P2 << " " 535 << setw(14) << setprecision(3) << obs->_o.L2 << " " 536 << setw(1) << obs->_o.SNR2 537 << setw(14) << setprecision(3) << obs->_o.S2 538 538 << endl; 539 delete ob ;539 delete obs; 540 540 } 541 541 } … … 548 548 << " " << 0 << setw(3) << dumpList.size(); 549 549 550 QListIterator< Observation*> it(dumpList); int iSat = 0;550 QListIterator<p_obs> it(dumpList); int iSat = 0; 551 551 while (it.hasNext()) { 552 552 iSat++; 553 Observation* ob= it.next();554 _out << ob ->satSys << setw(2) << ob->satNum;553 p_obs obs = it.next(); 554 _out << obs->_o.satSys << setw(2) << obs->_o.satNum; 555 555 if (iSat == 12 && it.hasNext()) { 556 556 _out << endl << " "; … … 562 562 it.toFront(); 563 563 while (it.hasNext()) { 564 Observation* ob= it.next();564 p_obs obs = it.next(); 565 565 566 566 char lli = ' '; 567 567 char snr = ' '; 568 _out << setw(14) << setprecision(3) << ob ->C1 << lli << snr;569 _out << setw(14) << setprecision(3) << ob ->C2 << lli << snr;570 _out << setw(14) << setprecision(3) << ob ->P1 << lli << snr;571 _out << setw(14) << setprecision(3) << ob ->P2 << lli << snr;572 _out << setw(14) << setprecision(3) << ob ->L1 << lli573 << setw(1) << ob ->SNR1 << endl;574 _out << setw(14) << setprecision(3) << ob ->L2 << lli575 << setw(1) << ob ->SNR2;576 _out << setw(14) << setprecision(3) << ob ->S1 ;577 _out << setw(16) << setprecision(3) << ob ->S2 ;568 _out << setw(14) << setprecision(3) << obs->_o.C1 << lli << snr; 569 _out << setw(14) << setprecision(3) << obs->_o.C2 << lli << snr; 570 _out << setw(14) << setprecision(3) << obs->_o.P1 << lli << snr; 571 _out << setw(14) << setprecision(3) << obs->_o.P2 << lli << snr; 572 _out << setw(14) << setprecision(3) << obs->_o.L1 << lli 573 << setw(1) << obs->_o.SNR1 << endl; 574 _out << setw(14) << setprecision(3) << obs->_o.L2 << lli 575 << setw(1) << obs->_o.SNR2; 576 _out << setw(14) << setprecision(3) << obs->_o.S1 ; 577 _out << setw(16) << setprecision(3) << obs->_o.S2 ; 578 578 _out << endl; 579 579 580 delete ob ;580 delete obs; 581 581 } 582 582 } -
trunk/BNC/bncrinex.h
r539 r622 41 41 const QByteArray& longitude, const QByteArray& nmea); 42 42 ~bncRinex(); 43 void deepCopy(const Observation*obs);43 void deepCopy(const p_obs obs); 44 44 void dumpEpoch(long maxTime); 45 45 void setReconnectFlag(bool flag){_reconnectFlag = flag;} … … 52 52 t_irc downloadSkeleton(); 53 53 54 QByteArray 55 QByteArray 56 QList< Observation*>_obs;57 std::ofstream 58 QStringList 59 bool 60 QDateTime 61 QString 62 QUrl 63 QString 64 QString 65 QString 66 QByteArray 67 QByteArray 68 QByteArray 69 QByteArray 70 bool 71 QDate 72 QMutex 73 int 54 QByteArray _statID; 55 QByteArray _fName; 56 QList<p_obs> _obs; 57 std::ofstream _out; 58 QStringList _headerLines; 59 bool _headerWritten; 60 QDateTime _nextCloseEpoch; 61 QString _rnxScriptName; 62 QUrl _mountPoint; 63 QString _pgmName; 64 QString _userName; 65 QString _sklName; 66 QByteArray _format; 67 QByteArray _latitude; 68 QByteArray _longitude; 69 QByteArray _nmea; 70 bool _reconnectFlag; 71 QDate _skeletonDate; 72 QMutex _mutex; 73 int _rinexVers; 74 74 }; 75 75
Note:
See TracChangeset
for help on using the changeset viewer.