- Timestamp:
- Nov 26, 2009, 2:34:44 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncpppclient.cpp
r2035 r2037 78 78 //////////////////////////////////////////////////////////////////////////// 79 79 void bncPPPclient::putNewObs(p_obs pp) { 80 { 81 QMutexLocker locker(&_mutex); 82 83 t_obsInternal* obs = &(pp->_o); 84 85 t_time tt(obs->GPSWeek, obs->GPSWeeks); 86 87 if (!_dataHlp) { 88 _dataHlp = new t_data(); 89 _dataHlp->tt = tt; 90 } 91 else if (tt != _dataHlp->tt) { 92 _data = _dataHlp; 93 _dataHlp = new t_data(); 94 _dataHlp->tt = tt; 95 } 96 97 ++_dataHlp->numSat; 98 99 if (_dataHlp->numSat > t_data::MAXOBS) { 100 cerr << "putNewObs: numSat > MAXOBS\n"; 101 exit(1); 102 } 103 104 _dataHlp->prn[_dataHlp->numSat] = 105 QString("%1%2").arg(obs->satSys).arg(obs->satNum, 2, 10, QChar('0')); 106 107 _dataHlp->C1[_dataHlp->numSat] = obs->C1; 108 _dataHlp->C2[_dataHlp->numSat] = obs->C2; 109 _dataHlp->P1[_dataHlp->numSat] = obs->P1; 110 _dataHlp->P2[_dataHlp->numSat] = obs->P2; 111 _dataHlp->L1[_dataHlp->numSat] = obs->L1; 112 _dataHlp->L2[_dataHlp->numSat] = obs->L2; 113 } // end of mutex 114 115 processEpoch(); // currently in the same thread as bncgetthread 80 QMutexLocker locker(&_mutex); 81 82 t_obsInternal* obs = &(pp->_o); 83 84 t_time tt(obs->GPSWeek, obs->GPSWeeks); 85 86 if (!_dataHlp) { 87 _dataHlp = new t_data(); 88 _dataHlp->tt = tt; 89 } 90 else if (tt != _dataHlp->tt) { 91 _data = _dataHlp; 92 _dataHlp = new t_data(); 93 _dataHlp->tt = tt; 94 processEpoch(); 95 } 96 97 ++_dataHlp->numSat; 98 99 if (_dataHlp->numSat > t_data::MAXOBS) { 100 cerr << "putNewObs: numSat > MAXOBS\n"; 101 exit(1); 102 } 103 104 _dataHlp->prn[_dataHlp->numSat] = 105 QString("%1%2").arg(obs->satSys).arg(obs->satNum, 2, 10, QChar('0')); 106 107 _dataHlp->C1[_dataHlp->numSat] = obs->C1; 108 _dataHlp->C2[_dataHlp->numSat] = obs->C2; 109 _dataHlp->P1[_dataHlp->numSat] = obs->P1; 110 _dataHlp->P2[_dataHlp->numSat] = obs->P2; 111 _dataHlp->L1[_dataHlp->numSat] = obs->L1; 112 _dataHlp->L2[_dataHlp->numSat] = obs->L2; 116 113 } 117 114 … … 178 175 //////////////////////////////////////////////////////////////////////////// 179 176 void bncPPPclient::processEpoch() { 180 QMutexLocker locker(&_mutex);181 182 177 if (!_data) { 183 178 return;
Note:
See TracChangeset
for help on using the changeset viewer.