Changeset 4679 in ntrip


Ignore:
Timestamp:
Sep 9, 2012, 11:35:51 AM (12 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC/src/rinex
Files:
2 edited

Legend:

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

    r4678 r4679  
    216216  // A priori Coordinates
    217217  // --------------------
    218   ColumnVector xyz = obsFile->xyz();
     218  ColumnVector xyzSta = obsFile->xyz();
    219219
    220220  // Loop over all Epochs
     
    242242      }
    243243 
    244       prepareObsStat(iEpo, obsFile->interval());
     244      prepareObsStat(iEpo, obsFile->interval(), xyzSta);
    245245      iEpo++;
    246246
     
    268268    it.next();
    269269    QString    prn     = it.key();
    270     preparePlotData(prn, xyz, obsFile->interval(),
     270    preparePlotData(prn, xyzSta, obsFile->interval(),
    271271                    dataMP1, dataMP2, dataSNR1, dataSNR2);
    272272  }
     
    382382// 
    383383////////////////////////////////////////////////////////////////////////////
    384 void t_reqcAnalyze::prepareObsStat(unsigned iEpo, double obsInterval) {
     384void t_reqcAnalyze::prepareObsStat(unsigned iEpo, double obsInterval,
     385                                   const ColumnVector& xyzSta) {
    385386  const int sampl = int(30.0 / obsInterval);
    386387  if (iEpo % sampl == 0) {
     
    397398// 
    398399////////////////////////////////////////////////////////////////////////////
    399 void t_reqcAnalyze::preparePlotData(const QString& prn, const ColumnVector& xyz,
     400void t_reqcAnalyze::preparePlotData(const QString& prn,
     401                                    const ColumnVector& xyzSta,
    400402                                    double obsInterval,
    401403                                    QVector<t_polarPoint*>* dataMP1,
     
    449451        mjdX24 = chunkStartTime.mjddec() * 24.0;
    450452
    451         if (xyz.size()) {
     453        if (xyzSta.size()) {
    452454          t_eph* eph = 0;
    453455          for (int ie = 0; ie < _ephs.size(); ie++) {
     
    464466         
    465467            double rho, eleSat, azSat;
    466             topos(xyz(1), xyz(2), xyz(3), xSat, ySat, zSat, rho, eleSat, azSat);
     468            topos(xyzSta(1), xyzSta(2), xyzSta(3),
     469                  xSat, ySat, zSat, rho, eleSat, azSat);
    467470         
    468471            aziDeg = azSat * 180.0/M_PI;
     
    619622  }
    620623}
     624
     625// Compute Dilution of Precision
     626////////////////////////////////////////////////////////////////////////////
     627double t_reqcAnalyze::cmpDOP(const ColumnVector& xyzSta) const {
     628
     629  if (xyzSta.size() != 3) {
     630    return 0.0;
     631  }
     632
     633  unsigned nSat = _currEpo->rnxSat.size();
     634
     635  if (nSat < 4) {
     636    return 0.0;
     637  }
     638
     639  Matrix AA(nSat, 4);
     640
     641  unsigned nSatUsed = 0;
     642  for (unsigned iSat = 0; iSat < nSat; iSat++) {
     643
     644    const t_rnxObsFile::t_rnxSat& rnxSat = _currEpo->rnxSat[iSat];
     645
     646    QString prn = QString("%1%2").arg(rnxSat.satSys)
     647                                 .arg(rnxSat.satNum, 2, 10, QChar('0'));
     648
     649    t_eph* eph = 0;
     650    for (int ie = 0; ie < _ephs.size(); ie++) {
     651      if (_ephs[ie]->prn() == prn) {
     652        eph = _ephs[ie];
     653        break;
     654      }
     655    }
     656    if (eph) {
     657      ++nSatUsed;
     658      ColumnVector xSat(3);
     659      double clkSat;
     660      eph->position(_currEpo->tt.gpsw(), _currEpo->tt.gpssec(),
     661                    xSat(1), xSat(2), xSat(3), clkSat);
     662      ColumnVector dx = xSat - xyzSta;
     663    }
     664
     665  }
     666
     667  return 0.0;
     668}
  • trunk/BNC/src/rinex/reqcanalyze.h

    r4675 r4679  
    133133
    134134  void analyzeFile(t_rnxObsFile* obsFile);
    135   void preparePlotData(const QString& prn, const ColumnVector& xyz,
     135  void preparePlotData(const QString& prn, const ColumnVector& xyzSta,
    136136                       double obsInterval,
    137137                       QVector<t_polarPoint*>* dataMP1,
     
    139139                       QVector<t_polarPoint*>* dataSNR1,
    140140                       QVector<t_polarPoint*>* dataSNR2);
    141   void prepareObsStat(unsigned iEpo, double obsInterval);
     141  void prepareObsStat(unsigned iEpo, double obsInterval,
     142                      const ColumnVector& xyzSta);
     143  double cmpDOP(const ColumnVector& xyzSta) const;
    142144
    143145  QString                    _logFileName;
Note: See TracChangeset for help on using the changeset viewer.