Changeset 2711 in ntrip for trunk/BNC/RTCM
- Timestamp:
- Nov 18, 2010, 1:38:51 PM (14 years ago)
- Location:
- trunk/BNC/RTCM
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/RTCM/GPSDecoder.h
r2710 r2711 36 36 class t_obs { 37 37 public: 38 enum t_obs_status {initial, posted, received};39 38 t_obs() { 40 _status = initial;41 39 satSys = 'G'; 42 40 satNum = 0; … … 76 74 double S1() const {return (L1P != 0.0 ? S1P : S1C);} 77 75 double S2() const {return (L2P != 0.0 ? S2P : S2C);} 78 79 t_obs_status _status;80 76 81 77 char StatID[20+1]; // Station ID … … 118 114 virtual t_irc Decode(char* buffer, int bufLen, std::vector<std::string>& errmsg) = 0; 119 115 120 virtual ~GPSDecoder() { 121 QListIterator<t_obs*> it(_obsList); 122 while (it.hasNext()) { 123 t_obs* obs = it.next(); 124 if (obs && obs->_status == t_obs::initial) { 125 delete obs; 126 } 127 } 128 } 116 virtual ~GPSDecoder() {} 129 117 130 118 virtual int corrGPSEpochTime() const {return -1;} … … 149 137 }; 150 138 151 QList<t_obs *>_obsList;139 QList<t_obs> _obsList; 152 140 QList<int> _typeList; // RTCM message types 153 141 QStringList _antType; // RTCM antenna descriptor -
trunk/BNC/RTCM/RTCM2Decoder.cpp
r2710 r2711 140 140 141 141 for (int iSat=0; iSat < _ObsBlock.nSat; iSat++) { 142 t_obs* obs = new t_obs(); 143 _obsList.push_back(obs); 142 t_obs obs; 144 143 if (_ObsBlock.PRN[iSat] > 100) { 145 obs ->satNum = _ObsBlock.PRN[iSat] % 100;146 obs ->satSys = 'R';144 obs.satNum = _ObsBlock.PRN[iSat] % 100; 145 obs.satSys = 'R'; 147 146 } 148 147 else { 149 obs ->satNum = _ObsBlock.PRN[iSat];150 obs ->satSys = 'G';148 obs.satNum = _ObsBlock.PRN[iSat]; 149 obs.satSys = 'G'; 151 150 } 152 obs->GPSWeek = epochWeek; 153 obs->GPSWeeks = epochSecs; 154 obs->C1 = _ObsBlock.rng_C1[iSat]; 155 obs->P1 = _ObsBlock.rng_P1[iSat]; 156 obs->P2 = _ObsBlock.rng_P2[iSat]; 157 obs->L1P = _ObsBlock.resolvedPhase_L1(iSat); 158 obs->L2P = _ObsBlock.resolvedPhase_L2(iSat); 159 obs->slip_cnt_L1 = _ObsBlock.slip_L1[iSat]; 160 obs->slip_cnt_L2 = _ObsBlock.slip_L2[iSat]; 151 obs.GPSWeek = epochWeek; 152 obs.GPSWeeks = epochSecs; 153 obs.C1 = _ObsBlock.rng_C1[iSat]; 154 obs.P1 = _ObsBlock.rng_P1[iSat]; 155 obs.P2 = _ObsBlock.rng_P2[iSat]; 156 obs.L1P = _ObsBlock.resolvedPhase_L1(iSat); 157 obs.L2P = _ObsBlock.resolvedPhase_L2(iSat); 158 obs.slip_cnt_L1 = _ObsBlock.slip_L1[iSat]; 159 obs.slip_cnt_L2 = _ObsBlock.slip_L2[iSat]; 160 161 _obsList.push_back(obs); 161 162 } 162 163 _ObsBlock.clear(); … … 435 436 // Store new observation 436 437 if ( new_obs ) { 437 _obsList.push_back( new_obs ); 438 439 ////ostringstream hasIODstr; 440 ////copy(hasIOD.begin(), hasIOD.end(), ostream_iterator<string>(hasIODstr, " ")); 441 ////errmsg.push_back("decoded PRN " + PRN + " : " + hasIODstr.str()); 442 } 443 } 444 } 438 _obsList.push_back(*new_obs); 439 } 440 } 441 }
Note:
See TracChangeset
for help on using the changeset viewer.