Changeset 7528 in ntrip for trunk/BNC/src


Ignore:
Timestamp:
Oct 20, 2015, 11:26:07 AM (9 years ago)
Author:
stuerze
Message:

bug fixed in RTCM2 decoder

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/RTCM/RTCM2Decoder.cpp

    r7169 r7528  
    3535 * Created:    24-Aug-2006
    3636 *
    37  * Changes:   
     37 * Changes:
    3838 *
    3939 * -----------------------------------------------------------------------*/
     
    5151using namespace rtcm2;
    5252
    53 // 
     53//
    5454// Constructor
    55 // 
     55//
    5656
    5757RTCM2Decoder::RTCM2Decoder(const std::string& ID) : _ephUser(true) {
     
    5959}
    6060
    61 // 
     61//
    6262// Destructor
    63 // 
     63//
    6464
    6565RTCM2Decoder::~RTCM2Decoder() {
     
    290290
    291291    // new observation
    292     t_satObs* new_obs = 0;
     292    t_satObs new_obs;
    293293
    294294    t_frqObs* frqObs1C = new t_frqObs;
    295295    frqObs1C->_rnxType2ch = "1C";
    296     new_obs->_obs.push_back(frqObs1C);
     296    new_obs._obs.push_back(frqObs1C);
    297297
    298298    t_frqObs* frqObs1P = new t_frqObs;
    299299    frqObs1P->_rnxType2ch = (sys == 'G') ? "1W" : "1P";
    300     new_obs->_obs.push_back(frqObs1P);
     300    new_obs._obs.push_back(frqObs1P);
    301301
    302302    t_frqObs* frqObs2P = new t_frqObs;
    303303    frqObs2P->_rnxType2ch = (sys == 'G') ? "2W" : "2P";
    304     new_obs->_obs.push_back(frqObs2P);
     304    new_obs._obs.push_back(frqObs2P);
    305305
    306306    // missing IOD
     
    367367          *obsVal = ZEROVALUE;
    368368
    369         // Allocate new memory
    370         // -------------------
    371         if (!new_obs) {
    372           new_obs = new t_satObs();
    373           if (corr->PRN < 200) {
    374             new_obs->_prn.set('G', corr->PRN);
    375           } else {
    376             new_obs->_prn.set('R', corr->PRN - 200);
    377           }
    378           new_obs->_time.set(GPSWeek_rcv, GPSWeeks_rcv);
     369        if (corr->PRN < 200) {
     370          new_obs._prn.set('G', corr->PRN);
     371        } else {
     372          new_obs._prn.set('R', corr->PRN - 200);
    379373        }
     374        new_obs._time.set(GPSWeek_rcv, GPSWeeks_rcv);
    380375
    381376        // Store estimated measurements
     
    430425
    431426    // Store new observation
    432     if (new_obs) {
    433       _obsList.push_back(*new_obs);
    434       delete new_obs;
     427    if (new_obs._time.mjd() > 0) {
     428      _obsList.push_back(new_obs);
    435429    }
    436430  }
Note: See TracChangeset for help on using the changeset viewer.