Changeset 6445 in ntrip


Ignore:
Timestamp:
Dec 26, 2014, 1:06:07 PM (9 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC/src
Files:
2 edited

Legend:

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

    r6114 r6445  
    166166      int channel = 0;
    167167      if (satData->system() == 'R') {
    168         const bncEphUser::t_ephPair* ephPair = _ephUser->ephPair(satData->prn);
    169         if (ephPair) {
    170           channel = ephPair->last->slotNum();
     168        const t_eph* eph = _ephUser->ephLast(satData->prn);
     169        if (eph) {
     170          channel = eph->slotNum();
    171171        }
    172172        else {
     
    221221  for (unsigned ii = 0; ii < corr.size(); ii++) {
    222222    QString prn = QString(corr[ii]->_prn.toString().c_str());
    223     const bncEphUser::t_ephPair* ephPair = _ephUser->ephPair(prn);
    224     if (ephPair) {
    225       t_eph* eLast = ephPair->last;
    226       t_eph* ePrev = ephPair->prev;
    227       if      (eLast && eLast->IOD() == corr[ii]->_iod) {
    228         eLast->setOrbCorr(corr[ii]);
    229       }
    230       else if (ePrev && ePrev->IOD() == corr[ii]->_iod) {
    231         ePrev->setOrbCorr(corr[ii]);
    232       }
     223    t_eph* eLast = _ephUser->ephLast(prn);
     224    t_eph* ePrev = _ephUser->ephPrev(prn);
     225    if      (eLast && eLast->IOD() == corr[ii]->_iod) {
     226      eLast->setOrbCorr(corr[ii]);
     227    }
     228    else if (ePrev && ePrev->IOD() == corr[ii]->_iod) {
     229      ePrev->setOrbCorr(corr[ii]);
    233230    }
    234231  }
     
    240237  for (unsigned ii = 0; ii < corr.size(); ii++) {
    241238    QString prn = QString(corr[ii]->_prn.toString().c_str());
    242     const bncEphUser::t_ephPair* ephPair = _ephUser->ephPair(prn);
    243     if (ephPair) {
    244       t_eph* eLast = ephPair->last;
    245       t_eph* ePrev = ephPair->prev;
    246       if      (eLast && eLast->IOD() == corr[ii]->_iod) {
    247         eLast->setClkCorr(corr[ii]);
    248       }
    249       else if (ePrev && ePrev->IOD() == corr[ii]->_iod) {
    250         ePrev->setClkCorr(corr[ii]);
    251       }
     239    t_eph* eLast = _ephUser->ephLast(prn);
     240    t_eph* ePrev = _ephUser->ephPrev(prn);
     241    if      (eLast && eLast->IOD() == corr[ii]->_iod) {
     242      eLast->setClkCorr(corr[ii]);
     243    }
     244    else if (ePrev && ePrev->IOD() == corr[ii]->_iod) {
     245      ePrev->setClkCorr(corr[ii]);
    252246    }
    253247  }
     
    266260  const t_ephGal* ephGal = dynamic_cast<const t_ephGal*>(eph);
    267261  if      (ephGPS) {
    268     _ephUser->putNewEph(new t_ephGPS(*ephGPS));
     262    _ephUser->putNewEph(new t_ephGPS(*ephGPS), false);
    269263  }
    270264  else if (ephGlo) {
    271     _ephUser->putNewEph(new t_ephGlo(*ephGlo));
     265    _ephUser->putNewEph(new t_ephGlo(*ephGlo), false);
    272266  }
    273267  else if (ephGal) {
    274     _ephUser->putNewEph(new t_ephGal(*ephGal));
     268    _ephUser->putNewEph(new t_ephGal(*ephGal), false);
    275269  }
    276270}
     
    281275                              ColumnVector& xc, ColumnVector& vv) {
    282276
    283   const bncEphUser::t_ephPair* ephPair = _ephUser->ephPair(prn);
    284   if (ephPair) {
    285     t_eph* eLast = ephPair->last;
    286     t_eph* ePrev = ephPair->prev;
    287     if      (eLast && eLast->getCrd(tt, xc, vv, _opt->useOrbClkCorr()) == success) {
    288       return success;
    289     }
    290     else if (ePrev && ePrev->getCrd(tt, xc, vv, _opt->useOrbClkCorr()) == success) {
    291       return success;
    292     }
     277  t_eph* eLast = _ephUser->ephLast(prn);
     278  t_eph* ePrev = _ephUser->ephPrev(prn);
     279  if      (eLast && eLast->getCrd(tt, xc, vv, _opt->useOrbClkCorr()) == success) {
     280    return success;
     281  }
     282  else if (ePrev && ePrev->getCrd(tt, xc, vv, _opt->useOrbClkCorr()) == success) {
     283    return success;
    293284  }
    294285  return failure;
  • trunk/BNC/src/bncephuser.h

    r6444 r6445  
    4949  t_irc putNewEph(const t_eph* newEph, bool check);
    5050
    51   const t_eph* ephLast(const QString& prn) {
     51  t_eph* ephLast(const QString& prn) {
    5252    if (_eph.contains(prn)) {
    5353      return _eph[prn].back();
     
    5656  }
    5757
    58   const t_eph* ephPrev(const QString& prn) {
     58  t_eph* ephPrev(const QString& prn) {
    5959    if (_eph.contains(prn)) {
    6060      unsigned nn = _eph[prn].size();
Note: See TracChangeset for help on using the changeset viewer.