Changeset 6082 in ntrip


Ignore:
Timestamp:
Sep 7, 2014, 6:22:27 PM (10 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC/src/PPP_free
Files:
3 edited

Legend:

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

    r6081 r6082  
    221221//
    222222////////////////////////////////////////////////////////////////////////////
    223 void bncPPPclient::putNewCorrections(QList<QString> corrList) {
     223void bncPPPclient::putOrbCorrections(const std::vector<t_orbCorr*>& corr) {
    224224  QMutexLocker locker(&_mutex);
    225 
    226   // Check the Mountpoint (source of corrections)
    227   // --------------------------------------------
    228   if (!_opt->_corrMount.empty()) {
    229     QMutableListIterator<QString> itm(corrList);
    230     while (itm.hasNext()) {
    231       QStringList hlp = itm.next().split(" ");
    232       if (hlp.size() > 0) {
    233         QString mountpoint = hlp[hlp.size()-1];
    234         if (mountpoint != QString(_opt->_corrMount.c_str())) {
    235           itm.remove();     
    236         }
    237       }
    238     }
    239   }
    240 
    241   if (corrList.size() == 0) {
    242     return;
    243   }
    244 
    245   QListIterator<QString> it(corrList);
    246   while (it.hasNext()) {
    247     QString line = it.next();
    248 
    249     QTextStream in(&line);
    250     int     messageType;
    251     int     updateInterval;
    252     int     GPSweek;
    253     double  GPSweeks;
    254     QString prn;
    255     in >> messageType >> updateInterval >> GPSweek >> GPSweeks >> prn;
    256 
    257     if ( t_corr::relevantMessageType(messageType) ) {
    258       t_corr* cc = 0;
    259       if (_corr.contains(prn)) {
    260         cc = _corr.value(prn);
    261       }
    262       else {
    263         cc = new t_corr();
    264         _corr[prn] = cc;
    265       }
    266       cc->readLine(line);
    267       _corr_tt = cc->tClk;
    268     }
    269     else if ( messageType == BTYPE_GPS || messageType == BTYPE_GLONASS ) {
    270       t_bias* bb = 0;
    271       if (_bias.contains(prn)) {
    272         bb = _bias.value(prn);
    273       }
    274       else {
    275         bb = new t_bias();
    276         _bias[prn] = bb;
    277       }
    278       bb->readLine(line);
    279     }
    280   }
     225}
     226
     227//
     228////////////////////////////////////////////////////////////////////////////
     229void bncPPPclient::putClkCorrections(const std::vector<t_clkCorr*>& corr) {
     230  QMutexLocker locker(&_mutex);
    281231}
    282232
     
    298248}
    299249
    300 //
    301 ////////////////////////////////////////////////////////////////////////////
    302 t_irc bncPPPclient::applyCorr(const bncTime& tt, const t_corr* cc,
    303                               ColumnVector& xc, ColumnVector& vv) {
    304 
    305   double dtRao = tt - cc->tRao;
    306 
    307   // Position
    308   // --------
    309   ColumnVector raoHlp = cc->rao + cc->dotRao * dtRao;
    310 
    311   if (raoHlp.norm_Frobenius() > 20.0) {
    312     return failure;
    313   }
    314 
    315   ColumnVector dx(3);
    316   RSW_to_XYZ(xc.Rows(1,3), vv, raoHlp, dx);
    317   xc[0] -= dx[0];
    318   xc[1] -= dx[1];
    319   xc[2] -= dx[2];
    320 
    321   // Velocity
    322   // --------
    323   ColumnVector dotRaoHlp = cc->dotRao;
    324 
    325   ColumnVector dv(3);
    326   RSW_to_XYZ(xc.Rows(1,3), vv, dotRaoHlp, dv);
    327   vv[0] -= dv[0];
    328   vv[1] -= dv[1];
    329   vv[2] -= dv[2];
    330 
    331   // Clocks
    332   // ------
    333   double dtClk = tt - cc->tClk;
    334 
    335   xc[3] += cc->dClk + cc->dotDClk * dtClk + cc->dotDotDClk * dtClk * dtClk
    336         + cc->hrClk;
    337 
    338   return success;
    339 }
    340 
    341250// Correct Time of Transmission
    342251////////////////////////////////////////////////////////////////////////////
  • trunk/BNC/src/PPP_free/bncpppclient.h

    r6080 r6082  
    3939class t_epoData;
    4040class t_output;
     41class t_orbCorr;
     42class t_clkCorr;
    4143
    4244class bncPPPclient : public bncEphUser {
     
    4547  ~bncPPPclient();
    4648  void                processEpoch(const std::vector<t_satObs*>& satObs, t_output* output);
    47   void                putNewCorrections(QList<QString> corrList);
     49  void                putOrbCorrections(const std::vector<t_orbCorr*>& corr);
     50  void                putClkCorrections(const std::vector<t_clkCorr*>& corr);
    4851  QByteArray          staID() const {return _staID;}
    4952  const t_pppOptions* opt() const {return _opt;}
     
    6669  void  putNewObs(t_satData* satData);
    6770  t_irc cmpToT(t_satData* satData);
    68   static t_irc applyCorr(const bncTime& tt, const t_corr* cc, ColumnVector& xc, ColumnVector& vv);
    6971
    7072  const t_pppOptions*     _opt;
  • trunk/BNC/src/PPP_free/pppClient.cpp

    r6073 r6082  
    103103//////////////////////////////////////////////////////////////////////////////
    104104void t_pppClient::putOrbCorrections(const vector<t_orbCorr*>& corr) {
     105  _client->putOrbCorrections(corr);
    105106}
    106107
     
    108109//////////////////////////////////////////////////////////////////////////////
    109110void t_pppClient::putClkCorrections(const vector<t_clkCorr*>& corr) {
     111  _client->putClkCorrections(corr);
    110112}
    111113
Note: See TracChangeset for help on using the changeset viewer.