Index: trunk/BNC/src/rinex/reqcanalyze.cpp
===================================================================
--- trunk/BNC/src/rinex/reqcanalyze.cpp	(revision 4341)
+++ trunk/BNC/src/rinex/reqcanalyze.cpp	(revision 4342)
@@ -64,8 +64,7 @@
 
   _currEpo = 0;
-  _dataMP1 = 0;
-  _dataMP2 = 0;
-
-  connect(this, SIGNAL(displayGraph()), this, SLOT(slotDisplayGraph()));
+
+  connect(this, SIGNAL(displayGraph(QVector<t_polarPoint*>*, QVector<t_polarPoint*>*)), 
+          this, SLOT(slotDisplayGraph(QVector<t_polarPoint*>*, QVector<t_polarPoint*>*)));
 }
 
@@ -85,14 +84,14 @@
 //  
 ////////////////////////////////////////////////////////////////////////////
-void t_reqcAnalyze::slotDisplayGraph() {
+void t_reqcAnalyze::slotDisplayGraph(QVector<t_polarPoint*>* dataMP1, 
+                                     QVector<t_polarPoint*>* dataMP2) {
+
   if (((bncApp*) qApp)->mode() == bncApp::interactive) {
 
     t_polarPlot* plotMP1 = new t_polarPlot(0);
-    plotMP1->addCurve(_dataMP1);
-    _dataMP1 = 0;
+    plotMP1->addCurve(dataMP1);
 
     t_polarPlot* plotMP2 = new t_polarPlot(0);
-    plotMP2->addCurve(_dataMP2);
-    _dataMP2 = 0;
+    plotMP2->addCurve(dataMP2);
     
     QVector<QWidget*> plots;
@@ -151,4 +150,8 @@
         << obsFile->fileName().toAscii().data() << endl << endl;
 
+  // A priori Coordinates
+  // --------------------
+  ColumnVector xyz = obsFile->xyz();
+
   // Loop over all Epochs
   // --------------------
@@ -179,5 +182,5 @@
       t_satStat& satStat = _satStat[prn];
 
-      satStat.addObs(eph, obs);
+      satStat.addObs(obs, eph, xyz);
     }
 
@@ -189,6 +192,6 @@
   _log->setRealNumberPrecision(2);
 
-  delete _dataMP1; _dataMP1 = new QVector<t_polarPoint*>;
-  delete _dataMP2; _dataMP2 = new QVector<t_polarPoint*>;
+  QVector<t_polarPoint*>*  dataMP1 = new QVector<t_polarPoint*>;
+  QVector<t_polarPoint*>*  dataMP2 = new QVector<t_polarPoint*>;
 
   QMapIterator<QString, t_satStat> it(_satStat);
@@ -218,6 +221,6 @@
         stddev2 += diff2 * diff2;
         //// beg test
-        (*_dataMP1) << (new t_polarPoint(anaObs->az, anaObs->zen, 0.5));
-        (*_dataMP2) << (new t_polarPoint(anaObs->az, anaObs->zen, 1.0));
+        (*dataMP1) << (new t_polarPoint(anaObs->az, anaObs->zen, 0.5));
+        (*dataMP2) << (new t_polarPoint(anaObs->az, anaObs->zen, 1.0));
         //// end test
       }
@@ -230,5 +233,5 @@
   }
 
-  emit displayGraph();
+  emit displayGraph(dataMP1, dataMP2);
 
   _log->flush();
@@ -237,5 +240,6 @@
 //  
 ////////////////////////////////////////////////////////////////////////////
-void t_reqcAnalyze::t_satStat::addObs(const t_eph* eph, const t_obs& obs) {
+void t_reqcAnalyze::t_satStat::addObs(const t_obs& obs, const t_eph* eph, 
+                                      const ColumnVector& xyz) {
 
   t_anaObs* newObs = new t_anaObs(obs);
@@ -261,16 +265,10 @@
   // Compute the Azimuth and Zenith Distance
   // ---------------------------------------
-  if (eph) {
+  if (eph && xyz.size()) {
     double xSat, ySat, zSat, clkSat;
     eph->position(obs.GPSWeek, obs.GPSWeeks, xSat, ySat, zSat, clkSat);
 
-    //// beg test
-    double xRec = -3947762.7496;
-    double yRec =  3364399.8789;
-    double zRec =  3699428.5111;
-    //// end test
-   
     double rho, eleSat, azSat;
-    topos(xRec, yRec, zRec, xSat, ySat, zSat, rho, eleSat, azSat);
+    topos(xyz(1), xyz(2), xyz(3), xSat, ySat, zSat, rho, eleSat, azSat);
 
     newObs->az  = azSat * 180.0/M_PI;
Index: trunk/BNC/src/rinex/reqcanalyze.h
===================================================================
--- trunk/BNC/src/rinex/reqcanalyze.h	(revision 4341)
+++ trunk/BNC/src/rinex/reqcanalyze.h	(revision 4342)
@@ -45,8 +45,8 @@
  signals:
   void finished();
-  void displayGraph();
+  void displayGraph(QVector<t_polarPoint*>*, QVector<t_polarPoint*>*);
    
  private slots:
-  void slotDisplayGraph();
+  void slotDisplayGraph(QVector<t_polarPoint*>*, QVector<t_polarPoint*>*);
 
  public:
@@ -73,5 +73,5 @@
       }
     }
-    void addObs(const t_eph* eph, const t_obs& obs);
+    void addObs(const t_obs& obs, const t_eph* eph, const ColumnVector& xyz);
     QVector<t_anaObs*> anaObs;
   };
@@ -88,6 +88,4 @@
   QMap<QString, t_satStat> _satStat;
   t_rnxObsFile::t_rnxEpo*  _currEpo;
-  QVector<t_polarPoint*>*  _dataMP1;
-  QVector<t_polarPoint*>*  _dataMP2;
 };
 
