Index: trunk/BNC/rinex/reqcanalyze.cpp
===================================================================
--- trunk/BNC/rinex/reqcanalyze.cpp	(revision 4265)
+++ trunk/BNC/rinex/reqcanalyze.cpp	(revision 4266)
@@ -60,4 +60,6 @@
   _obsFileNames = settings.value("reqcObsFile").toString().split(",", QString::SkipEmptyParts);
   _navFileNames = settings.value("reqcNavFile").toString().split(",", QString::SkipEmptyParts);
+
+  _currEpo = 0;
 }
 
@@ -122,16 +124,15 @@
   // Loop over all Epochs
   // --------------------
-  t_rnxObsFile::t_rnxEpo* epo = 0;
-  while ( (epo = obsFile->nextEpoch()) != 0) {
+  while ( (_currEpo = obsFile->nextEpoch()) != 0) {
 
     // Loop over all satellites
     // ------------------------
-    for (unsigned iObs = 0; iObs < epo->rnxSat.size(); iObs++) {
-      const t_rnxObsFile::t_rnxSat& rnxSat = epo->rnxSat[iObs];
+    for (unsigned iObs = 0; iObs < _currEpo->rnxSat.size(); iObs++) {
+      const t_rnxObsFile::t_rnxSat& rnxSat = _currEpo->rnxSat[iObs];
       t_obs obs;
-      t_postProcessing::setObsFromRnx(obsFile, epo, rnxSat, obs);
+      t_postProcessing::setObsFromRnx(obsFile, _currEpo, rnxSat, obs);
 
       if (obs.satSys == 'R') {
-        // TODO: set channel number
+        continue; // TODO: set channel number
       }
 
@@ -139,7 +140,10 @@
                                    .arg(obs.satNum, 2, 10, QChar('0'));
       _satStat[prn].addObs(obs);
+
+      t_anaObs* anaObs = _satStat[prn].currObs;
+      *_log << prn << " " << anaObs->M1 << " " << anaObs->M2 << endl;
     }
 
-  } // while (epo)
+  } // while (_currEpo)
 
   _log->flush();
@@ -153,8 +157,20 @@
     prevObs = currObs;
   }
-  currObs = new t_obs(obs);
+  currObs = new t_anaObs(obs);
 
-  if (obs.p1() != 0.0 && obs.p2() != 0.0 && obs.l1() != 0.0 && obs.l2() != 0.0){
+  if (obs.p1() != 0.0 && obs.p2() != 0.0 && 
+      obs.l1() != 0.0 && obs.l2() != 0.0) {
 
+    double f1 = t_CST::f1(obs.satSys, obs.slotNum);
+    double f2 = t_CST::f2(obs.satSys, obs.slotNum);
+
+    double L1 = obs.l1() * t_CST::c / f1;
+    double L2 = obs.l2() * t_CST::c / f2;
+
+    // Multipath linear combinations
+    // -----------------------------
+    currObs->M1 = obs.p1() - L1 - 2.0*f2*f2/(f1*f1-f2*f2) * (L1 - L2);
+
+    currObs->M2 = obs.p2() - L2 - 2.0*f1*f1/(f1*f1-f2*f2) * (L1 - L2);
   }
 }
Index: trunk/BNC/rinex/reqcanalyze.h
===================================================================
--- trunk/BNC/rinex/reqcanalyze.h	(revision 4265)
+++ trunk/BNC/rinex/reqcanalyze.h	(revision 4266)
@@ -50,4 +50,16 @@
  
  private:
+  class t_anaObs {
+   public:
+    t_anaObs(const t_obs& obsIn) {
+      obs = obsIn;
+      M1  = 0.0;
+      M2  = 0.0;
+    }
+    t_obs  obs;
+    double M1;
+    double M2;
+  };
+
   class t_satStat {
    public:
@@ -61,6 +73,6 @@
     }
     void addObs(const t_obs& obs);
-    t_obs* currObs;
-    t_obs* prevObs;
+    t_anaObs* currObs;
+    t_anaObs* prevObs;
   };
 
@@ -75,4 +87,5 @@
   QVector<t_eph*>          _ephs;
   QMap<QString, t_satStat> _satStat;
+  t_rnxObsFile::t_rnxEpo*  _currEpo;
 };
 
