Changeset 5838 in ntrip for trunk


Ignore:
Timestamp:
Aug 6, 2014, 3:42:49 PM (10 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/PPP/pppThread.cpp

    r5836 r5838  
    278278      if      (messageType == COTYPE_GPSCOMBINED || messageType == COTYPE_GLONASSCOMBINED ||
    279279               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];
    281292      }
    282293      else if (messageType == COTYPE_GPSCOMBINED || messageType == COTYPE_GLONASSCOMBINED ||
    283294               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;
    285304      }
    286305    }
  • trunk/BNC/src/t_prn.cpp

    r5745 r5838  
    2929// Set from string
    3030////////////////////////////////////////////////////////////////////////////
    31 void t_prn::setValue(const std::string& str) {
     31void t_prn::set(const std::string& str) {
    3232  unsigned    prn    = 0;
    3333  char        system = '\x0';
     
    4242  }
    4343  else {
    44     throw "t_prn::setValue: wrong satellite ID: " + str;
     44    throw "t_prn::set: wrong satellite ID: " + str;
    4545  }
    4646
     
    4848  prn = strtol(number, &tmpc, 10);
    4949  if ( tmpc == number || *tmpc != '\x0' ) {
    50     throw "t_prn::setValue: wrong satellite ID: " + str;
     50    throw "t_prn::set: wrong satellite ID: " + str;
    5151  }
    5252
    5353  try {
    54     this->setValue(system, prn);
     54    this->set(system, prn);
    5555  }
    5656  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;
    8058  }
    8159}
     
    9775    str += str2;
    9876  }
    99   prn.setValue(str);
     77  prn.set(str);
    10078  return in;
    10179}
  • trunk/BNC/src/t_prn.h

    r5741 r5838  
    1616
    1717  void        set(char system, int number) {_system = system; _number = number;}
     18  void        set(const std::string& str);
    1819
    1920  char        system() const {return _system;}
     
    3637
    3738 private:
    38   void setValue(const std::string& str);
    39   void setValue(char system, unsigned prn);
    4039  char _system;
    4140  int  _number;
Note: See TracChangeset for help on using the changeset viewer.