Changeset 4266 in ntrip


Ignore:
Timestamp:
Jun 22, 2012, 11:58:03 AM (12 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC/rinex
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/rinex/reqcanalyze.cpp

    r4265 r4266  
    6060  _obsFileNames = settings.value("reqcObsFile").toString().split(",", QString::SkipEmptyParts);
    6161  _navFileNames = settings.value("reqcNavFile").toString().split(",", QString::SkipEmptyParts);
     62
     63  _currEpo = 0;
    6264}
    6365
     
    122124  // Loop over all Epochs
    123125  // --------------------
    124   t_rnxObsFile::t_rnxEpo* epo = 0;
    125   while ( (epo = obsFile->nextEpoch()) != 0) {
     126  while ( (_currEpo = obsFile->nextEpoch()) != 0) {
    126127
    127128    // Loop over all satellites
    128129    // ------------------------
    129     for (unsigned iObs = 0; iObs < epo->rnxSat.size(); iObs++) {
    130       const t_rnxObsFile::t_rnxSat& rnxSat = epo->rnxSat[iObs];
     130    for (unsigned iObs = 0; iObs < _currEpo->rnxSat.size(); iObs++) {
     131      const t_rnxObsFile::t_rnxSat& rnxSat = _currEpo->rnxSat[iObs];
    131132      t_obs obs;
    132       t_postProcessing::setObsFromRnx(obsFile, epo, rnxSat, obs);
     133      t_postProcessing::setObsFromRnx(obsFile, _currEpo, rnxSat, obs);
    133134
    134135      if (obs.satSys == 'R') {
    135         // TODO: set channel number
     136        continue; // TODO: set channel number
    136137      }
    137138
     
    139140                                   .arg(obs.satNum, 2, 10, QChar('0'));
    140141      _satStat[prn].addObs(obs);
     142
     143      t_anaObs* anaObs = _satStat[prn].currObs;
     144      *_log << prn << " " << anaObs->M1 << " " << anaObs->M2 << endl;
    141145    }
    142146
    143   } // while (epo)
     147  } // while (_currEpo)
    144148
    145149  _log->flush();
     
    153157    prevObs = currObs;
    154158  }
    155   currObs = new t_obs(obs);
     159  currObs = new t_anaObs(obs);
    156160
    157   if (obs.p1() != 0.0 && obs.p2() != 0.0 && obs.l1() != 0.0 && obs.l2() != 0.0){
     161  if (obs.p1() != 0.0 && obs.p2() != 0.0 &&
     162      obs.l1() != 0.0 && obs.l2() != 0.0) {
    158163
     164    double f1 = t_CST::f1(obs.satSys, obs.slotNum);
     165    double f2 = t_CST::f2(obs.satSys, obs.slotNum);
     166
     167    double L1 = obs.l1() * t_CST::c / f1;
     168    double L2 = obs.l2() * t_CST::c / f2;
     169
     170    // Multipath linear combinations
     171    // -----------------------------
     172    currObs->M1 = obs.p1() - L1 - 2.0*f2*f2/(f1*f1-f2*f2) * (L1 - L2);
     173
     174    currObs->M2 = obs.p2() - L2 - 2.0*f1*f1/(f1*f1-f2*f2) * (L1 - L2);
    159175  }
    160176}
  • trunk/BNC/rinex/reqcanalyze.h

    r4263 r4266  
    5050 
    5151 private:
     52  class t_anaObs {
     53   public:
     54    t_anaObs(const t_obs& obsIn) {
     55      obs = obsIn;
     56      M1  = 0.0;
     57      M2  = 0.0;
     58    }
     59    t_obs  obs;
     60    double M1;
     61    double M2;
     62  };
     63
    5264  class t_satStat {
    5365   public:
     
    6173    }
    6274    void addObs(const t_obs& obs);
    63     t_obs* currObs;
    64     t_obs* prevObs;
     75    t_anaObs* currObs;
     76    t_anaObs* prevObs;
    6577  };
    6678
     
    7587  QVector<t_eph*>          _ephs;
    7688  QMap<QString, t_satStat> _satStat;
     89  t_rnxObsFile::t_rnxEpo*  _currEpo;
    7790};
    7891
Note: See TracChangeset for help on using the changeset viewer.