Changeset 5566 in ntrip for trunk/BNC/src


Ignore:
Timestamp:
Nov 23, 2013, 6:26:06 PM (10 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/bncpppclient.cpp

    r5565 r5566  
    295295      }
    296296      cc->readLine(line);
     297      checkProviderID(cc);
    297298      _corr_tt = cc->tClk;
    298299    }
     
    527528  }
    528529}
     530
     531//
     532////////////////////////////////////////////////////////////////////////////
     533void bncPPPclient::checkProviderID(const t_corr* corr) {
     534
     535  bool alreadySet = false;
     536  bool different  = false;
     537
     538  for (unsigned ii = 0; ii < 3; ii++) {
     539    if (_providerID.streamID[ii] != -1) {
     540      alreadySet = true;
     541    }
     542    if (_providerID.streamID[ii] != corr->streamID[ii]) {
     543      different = true;
     544    }
     545    _providerID.streamID[ii] = corr->streamID[ii];
     546  }
     547   
     548  if (alreadySet && different) {
     549    _providerID.reset = true;
     550  }
     551}
  • trunk/BNC/src/bncpppclient.h

    r4784 r5566  
    153153  };
    154154
     155  class t_providerID {
     156   public:
     157    t_providerID() {
     158      streamID[0] = -1;
     159      streamID[1] = -1;
     160      streamID[2] = -1;
     161      reset       = false;
     162    }
     163    int  streamID[3];
     164    bool reset;
     165  };
     166
    155167  t_irc getSatPos(const bncTime& tt, const QString& prn,
    156168                  ColumnVector& xc, ColumnVector& vv);
     
    158170  void processFrontEpoch();
    159171  t_irc cmpToT(t_satData* satData);
     172  void checkProviderID(const t_corr* corr);
    160173
    161174  t_pppOpt*               _opt;
     
    168181  bncModel*               _model;
    169182  QMap<QString, slipInfo> _slips;
     183  t_providerID            _providerID;
    170184};
    171185
Note: See TracChangeset for help on using the changeset viewer.