Index: /trunk/BNC/src/rinex/reqcanalyze.cpp
===================================================================
--- /trunk/BNC/src/rinex/reqcanalyze.cpp	(revision 4678)
+++ /trunk/BNC/src/rinex/reqcanalyze.cpp	(revision 4679)
@@ -216,5 +216,5 @@
   // A priori Coordinates
   // --------------------
-  ColumnVector xyz = obsFile->xyz();
+  ColumnVector xyzSta = obsFile->xyz();
 
   // Loop over all Epochs
@@ -242,5 +242,5 @@
       }
   
-      prepareObsStat(iEpo, obsFile->interval());
+      prepareObsStat(iEpo, obsFile->interval(), xyzSta);
       iEpo++;
 
@@ -268,5 +268,5 @@
     it.next();
     QString    prn     = it.key();
-    preparePlotData(prn, xyz, obsFile->interval(), 
+    preparePlotData(prn, xyzSta, obsFile->interval(), 
                     dataMP1, dataMP2, dataSNR1, dataSNR2);
   }
@@ -382,5 +382,6 @@
 //  
 ////////////////////////////////////////////////////////////////////////////
-void t_reqcAnalyze::prepareObsStat(unsigned iEpo, double obsInterval) {
+void t_reqcAnalyze::prepareObsStat(unsigned iEpo, double obsInterval,
+                                   const ColumnVector& xyzSta) {
   const int sampl = int(30.0 / obsInterval);
   if (iEpo % sampl == 0) {
@@ -397,5 +398,6 @@
 //  
 ////////////////////////////////////////////////////////////////////////////
-void t_reqcAnalyze::preparePlotData(const QString& prn, const ColumnVector& xyz,
+void t_reqcAnalyze::preparePlotData(const QString& prn, 
+                                    const ColumnVector& xyzSta,
                                     double obsInterval,
                                     QVector<t_polarPoint*>* dataMP1, 
@@ -449,5 +451,5 @@
         mjdX24 = chunkStartTime.mjddec() * 24.0;
 
-        if (xyz.size()) {
+        if (xyzSta.size()) {
           t_eph* eph = 0;
           for (int ie = 0; ie < _ephs.size(); ie++) {
@@ -464,5 +466,6 @@
           
             double rho, eleSat, azSat;
-            topos(xyz(1), xyz(2), xyz(3), xSat, ySat, zSat, rho, eleSat, azSat);
+            topos(xyzSta(1), xyzSta(2), xyzSta(3), 
+                  xSat, ySat, zSat, rho, eleSat, azSat);
           
             aziDeg = azSat * 180.0/M_PI;
@@ -619,2 +622,47 @@
   }
 }
+
+// Compute Dilution of Precision
+////////////////////////////////////////////////////////////////////////////
+double t_reqcAnalyze::cmpDOP(const ColumnVector& xyzSta) const {
+
+  if (xyzSta.size() != 3) {
+    return 0.0;
+  }
+
+  unsigned nSat = _currEpo->rnxSat.size();
+
+  if (nSat < 4) {
+    return 0.0;
+  }
+
+  Matrix AA(nSat, 4);
+
+  unsigned nSatUsed = 0;
+  for (unsigned iSat = 0; iSat < nSat; iSat++) {
+
+    const t_rnxObsFile::t_rnxSat& rnxSat = _currEpo->rnxSat[iSat];
+
+    QString prn = QString("%1%2").arg(rnxSat.satSys)
+                                 .arg(rnxSat.satNum, 2, 10, QChar('0'));
+
+    t_eph* eph = 0;
+    for (int ie = 0; ie < _ephs.size(); ie++) {
+      if (_ephs[ie]->prn() == prn) {
+        eph = _ephs[ie];
+        break;
+      }
+    }
+    if (eph) {
+      ++nSatUsed;
+      ColumnVector xSat(3);
+      double clkSat;
+      eph->position(_currEpo->tt.gpsw(), _currEpo->tt.gpssec(), 
+                    xSat(1), xSat(2), xSat(3), clkSat);
+      ColumnVector dx = xSat - xyzSta;
+    }
+
+  }
+
+  return 0.0;
+}
Index: /trunk/BNC/src/rinex/reqcanalyze.h
===================================================================
--- /trunk/BNC/src/rinex/reqcanalyze.h	(revision 4678)
+++ /trunk/BNC/src/rinex/reqcanalyze.h	(revision 4679)
@@ -133,5 +133,5 @@
 
   void analyzeFile(t_rnxObsFile* obsFile);
-  void preparePlotData(const QString& prn, const ColumnVector& xyz, 
+  void preparePlotData(const QString& prn, const ColumnVector& xyzSta, 
                        double obsInterval,
                        QVector<t_polarPoint*>* dataMP1, 
@@ -139,5 +139,7 @@
                        QVector<t_polarPoint*>* dataSNR1, 
                        QVector<t_polarPoint*>* dataSNR2);
-  void prepareObsStat(unsigned iEpo, double obsInterval);
+  void prepareObsStat(unsigned iEpo, double obsInterval,
+                      const ColumnVector& xyzSta);
+  double cmpDOP(const ColumnVector& xyzSta) const;
 
   QString                    _logFileName;
