- Timestamp:
- Aug 6, 2014, 3:42:49 PM (10 years ago)
- Location:
- trunk/BNC/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/PPP/pppThread.cpp
r5836 r5838 278 278 if (messageType == COTYPE_GPSCOMBINED || messageType == COTYPE_GLONASSCOMBINED || 279 279 messageType == COTYPE_GPSORBIT || messageType == COTYPE_GLONASSORBIT ) { 280 orbCorr.push_back(new t_orbCorr()); 280 t_orbCorr* cc = new t_orbCorr(); 281 orbCorr.push_back(cc); 282 cc->_prn.set(corr.prn.toAscii().data()); 283 cc->_iod = corr.iod; 284 cc->_time = corr.tRao; 285 cc->_system = 'R'; 286 cc->_xr[0] = corr.rao[0]; 287 cc->_xr[1] = corr.rao[1]; 288 cc->_xr[2] = corr.rao[2]; 289 cc->_dotXr[0] = corr.dotRao[0]; 290 cc->_dotXr[0] = corr.dotRao[1]; 291 cc->_dotXr[0] = corr.dotRao[2]; 281 292 } 282 293 else if (messageType == COTYPE_GPSCOMBINED || messageType == COTYPE_GLONASSCOMBINED || 283 294 messageType == COTYPE_GPSCLOCK || messageType == COTYPE_GLONASSCLOCK ) { 284 clkCorr.push_back(new t_clkCorr()); 295 t_clkCorr* cc = new t_clkCorr(); 296 clkCorr.push_back(cc); 297 cc->_prn.set(corr.prn.toAscii().data()); 298 cc->_iod = corr.iod; 299 cc->_time = corr.tRao; 300 cc->_dClk = corr.dClk; 301 cc->_dotDClk = corr.dotDClk; 302 cc->_dotDotDClk = corr.dotDotDClk; 303 cc->_clkPartial = 0.0; 285 304 } 286 305 } -
trunk/BNC/src/t_prn.cpp
r5745 r5838 29 29 // Set from string 30 30 //////////////////////////////////////////////////////////////////////////// 31 void t_prn::set Value(const std::string& str) {31 void t_prn::set(const std::string& str) { 32 32 unsigned prn = 0; 33 33 char system = '\x0'; … … 42 42 } 43 43 else { 44 throw "t_prn::set Value: wrong satellite ID: " + str;44 throw "t_prn::set: wrong satellite ID: " + str; 45 45 } 46 46 … … 48 48 prn = strtol(number, &tmpc, 10); 49 49 if ( tmpc == number || *tmpc != '\x0' ) { 50 throw "t_prn::set Value: wrong satellite ID: " + str;50 throw "t_prn::set: wrong satellite ID: " + str; 51 51 } 52 52 53 53 try { 54 this->set Value(system, prn);54 this->set(system, prn); 55 55 } 56 56 catch (string exc) { 57 throw "t_prn::setValue: wrong satellite ID: " + str; 58 } 59 } 60 61 void t_prn::setValue(char system, unsigned prn) { 62 _system = system; 63 _number = prn; 64 int maxprn = 0; 65 switch (system) { 66 case 'G': 67 maxprn = MAXPRN_GPS; 68 break; 69 case 'R': 70 maxprn = MAXPRN_GLONASS; 71 break; 72 default: 73 throw "t_prn::setValue: wrong satellite system identifier"; 74 break; 75 } 76 if (_number > maxprn) { 77 ostringstream msg; 78 msg << "wrong satellite ID, system ID: " << system << " number: " << prn; 79 throw "t_prn::setValue: " + msg.str(); 57 throw "t_prn::set: wrong satellite ID: " + str; 80 58 } 81 59 } … … 97 75 str += str2; 98 76 } 99 prn.set Value(str);77 prn.set(str); 100 78 return in; 101 79 } -
trunk/BNC/src/t_prn.h
r5741 r5838 16 16 17 17 void set(char system, int number) {_system = system; _number = number;} 18 void set(const std::string& str); 18 19 19 20 char system() const {return _system;} … … 36 37 37 38 private: 38 void setValue(const std::string& str);39 void setValue(char system, unsigned prn);40 39 char _system; 41 40 int _number;
Note:
See TracChangeset
for help on using the changeset viewer.