Index: trunk/BNC/src/PPP/pppFilter.cpp
===================================================================
--- trunk/BNC/src/PPP/pppFilter.cpp	(revision 10602)
+++ trunk/BNC/src/PPP/pppFilter.cpp	(revision 10603)
@@ -266,10 +266,5 @@
       }
       if (par) {
-        if (par->ambResetCandidate()) {
-          resetAmb(obs->prn(), obsVector, maxOutlierLC, &QSav, &xSav);
-        } else {
-          par->setAmbResetCandidate();
-          obs->setOutlier();
-        }
+        resetAmb(obs->prn(), obsVector, maxOutlierLC, &QSav, &xSav);
       }
       else {
Index: trunk/BNC/src/ephemeris.cpp
===================================================================
--- trunk/BNC/src/ephemeris.cpp	(revision 10602)
+++ trunk/BNC/src/ephemeris.cpp	(revision 10603)
@@ -106,4 +106,43 @@
   return success;
 }
+
+//
+//////////////////////////////////////////////////////////////////////////////
+void t_eph::setType(QString typeStr) {
+
+  if (typeStr == "LNAV") {
+    _type = t_eph::LNAV;
+  } else if (typeStr == "FDMA") {
+    _type = t_eph::FDMA;
+  } else if (typeStr == "FNAV") {
+    _type = t_eph::FNAV;
+  } else if (typeStr == "INAV") {
+    _type = t_eph::INAV;
+  } else if (typeStr == "D1") {
+    _type = t_eph::D1;
+  } else if (typeStr == "D2") {
+    _type = t_eph::D2;
+  } else if (typeStr == "SBAS") {
+    _type = t_eph::SBASL1;
+  } else if (typeStr == "CNAV") {
+    _type = t_eph::CNAV;
+  } else if (typeStr == "CNV1") {
+    _type = t_eph::CNV1;
+  } else if (typeStr == "CNV2") {
+    _type = t_eph::CNV2;
+  } else if (typeStr == "CNV3") {
+    _type = t_eph::CNV3;
+  } else if (typeStr == "L1NV") {
+    _type = t_eph::L1NV;
+  } else if (typeStr == "L1OC") {
+    _type = t_eph::L1OC;
+  } else if (typeStr == "L3OC") {
+    _type = t_eph::L3OC;
+  } else {
+    _type = t_eph::undefined;
+  }
+
+}
+
 
 //
@@ -226,8 +265,9 @@
 // Constructor
 //////////////////////////////////////////////////////////////////////////////
-t_ephGPS::t_ephGPS(double rnxVersion, const QStringList &lines) {
-
+t_ephGPS::t_ephGPS(double rnxVersion, const QStringList &lines, QString typeStr) {
+  
+  setType(typeStr);
+  
   int nLines = 8; // LNAV
-
   // Source RINEX version < 4
   if (type() == t_eph::undefined) {
@@ -1009,5 +1049,7 @@
 // Constructor
 //////////////////////////////////////////////////////////////////////////////
-t_ephGlo::t_ephGlo(double rnxVersion, const QStringList &lines) {
+t_ephGlo::t_ephGlo(double rnxVersion, const QStringList &lines, const QString typeStr) {
+
+  setType(typeStr);
 
   int nLines = 4;
@@ -1651,5 +1693,7 @@
 // Constructor
 //////////////////////////////////////////////////////////////////////////////
-t_ephGal::t_ephGal(double rnxVersion, const QStringList &lines) {
+t_ephGal::t_ephGal(double rnxVersion, const QStringList &lines, const QString typeStr) {
+
+  setType(typeStr);
 
   const int nLines = 8;
@@ -2105,5 +2149,7 @@
 // Constructor
 //////////////////////////////////////////////////////////////////////////////
-t_ephSBAS::t_ephSBAS(double rnxVersion, const QStringList &lines) {
+t_ephSBAS::t_ephSBAS(double rnxVersion, const QStringList &lines, const QString typeStr) {
+
+  setType(typeStr);
 
   const int nLines = 4;
@@ -2347,5 +2393,7 @@
 // Constructor
 //////////////////////////////////////////////////////////////////////////////
-t_ephBDS::t_ephBDS(double rnxVersion, const QStringList &lines) {
+t_ephBDS::t_ephBDS(double rnxVersion, const QStringList &lines, const QString typeStr) {
+
+  setType(typeStr);
 
   int nLines = 8;
Index: trunk/BNC/src/ephemeris.h
===================================================================
--- trunk/BNC/src/ephemeris.h	(revision 10602)
+++ trunk/BNC/src/ephemeris.h	(revision 10603)
@@ -43,4 +43,5 @@
   }
   e_type type() const {return _type;}
+  void setType(QString typeStr);
   t_prn  prn()  const {return _prn;}
   t_irc getCrd(const bncTime& tt, ColumnVector& xc, ColumnVector& vv, bool useCorr) const;
@@ -127,5 +128,5 @@
     _receptStaID     = "";
   }
-  t_ephGPS(double rnxVersion, const QStringList& lines);
+  t_ephGPS(double rnxVersion, const QStringList& lines, const QString typeStr);
   virtual ~t_ephGPS() {}
 
@@ -282,5 +283,5 @@
 
   }
-  t_ephGlo(double rnxVersion, const QStringList& lines);
+  t_ephGlo(double rnxVersion, const QStringList& lines, const QString typeStr);
   virtual ~t_ephGlo() {}
 
@@ -411,5 +412,5 @@
     _receptStaID     = "";
   };
-  t_ephGal(double rnxVersion, const QStringList& lines);
+  t_ephGal(double rnxVersion, const QStringList& lines, const QString typeStr);
   virtual ~t_ephGal() {}
 
@@ -487,5 +488,5 @@
     _receptStaID = "";
   }
-  t_ephSBAS(double rnxVersion, const QStringList& lines);
+  t_ephSBAS(double rnxVersion, const QStringList& lines, const QString typeStr);
   virtual ~t_ephSBAS() {}
 
@@ -573,5 +574,5 @@
    _receptStaID       = "";
  }
- t_ephBDS(double rnxVersion, const QStringList& lines);
+ t_ephBDS(double rnxVersion, const QStringList& lines, const QString typeStr);
   virtual ~t_ephBDS() {}
 
Index: trunk/BNC/src/rinex/reqcedit.cpp
===================================================================
--- trunk/BNC/src/rinex/reqcedit.cpp	(revision 10602)
+++ trunk/BNC/src/rinex/reqcedit.cpp	(revision 10603)
@@ -724,23 +724,31 @@
 
     if (isNew) {
-      if      (eph->system() == t_eph::GPS) {
+      if      (eph->system() == t_eph::GPS &&
+               eph->type()   == t_eph::LNAV) {
         ephs.append(new t_ephGPS(*dynamic_cast<t_ephGPS*>(eph)));
       }
-      else if (eph->system() == t_eph::GLONASS) {
+      else if (eph->system() == t_eph::GLONASS &&
+               eph->type()   == t_eph::FDMA_M) {
         ephs.append(new t_ephGlo(*dynamic_cast<t_ephGlo*>(eph)));
       }
-      else if (eph->system() == t_eph::Galileo) {
+      else if (eph->system() == t_eph::Galileo &&
+               eph->type()   ==  t_eph::INAV) {
         ephs.append(new t_ephGal(*dynamic_cast<t_ephGal*>(eph)));
       }
-      else if (eph->system() == t_eph::QZSS) {
+      else if (eph->system() == t_eph::QZSS &&
+               eph->type()   == t_eph::LNAV) {
         ephs.append(new t_ephGPS(*dynamic_cast<t_ephGPS*>(eph)));
       }
-      else if (eph->system() == t_eph::SBAS) {
+      else if (eph->system() == t_eph::SBAS &&
+               eph->type()   == t_eph::SBASL1) {
         ephs.append(new t_ephSBAS(*dynamic_cast<t_ephSBAS*>(eph)));
       }
-      else if (eph->system() == t_eph::BDS) {
+      else if (eph->system() == t_eph::BDS &&
+               (eph->type()  == t_eph::D1 ||
+                eph->type()  == t_eph::D2)) {
         ephs.append(new t_ephBDS(*dynamic_cast<t_ephBDS*>(eph)));
       }
-      else if (eph->system() == t_eph::IRNSS) {
+      else if (eph->system() == t_eph::IRNSS &&
+               eph->type()   == t_eph::LNAV) {
         ephs.append(new t_ephGPS(*dynamic_cast<t_ephGPS*>(eph)));
       }
Index: trunk/BNC/src/rinex/rnxnavfile.cpp
===================================================================
--- trunk/BNC/src/rinex/rnxnavfile.cpp	(revision 10602)
+++ trunk/BNC/src/rinex/rnxnavfile.cpp	(revision 10603)
@@ -149,15 +149,15 @@
 ////////////////////////////////////////////////////////////////////////////
 void t_rnxNavFile::read(QTextStream* stream) {
+  QString navType;
+  QString prn;
 
   while (stream->status() == QTextStream::Ok && !stream->atEnd()) {
-
+    char sys;
     QString line = stream->readLine();
     if (line.isEmpty()) {
       continue;
     }
-    QString navType;
+
     QStringList hlp = line.split(QRegExp("\\s+"), Qt::SkipEmptyParts);
-    QString prn;
-    char sys;
     QString firstStr = hlp.at(0);
 
@@ -210,5 +210,5 @@
       }
       if (lines2skip) {
-        for (int ii = 1; ii <= lines2skip; ii++) {
+        for (int ii = 0; ii < lines2skip; ii++) {
           stream->readLine();
         }
@@ -240,5 +240,5 @@
         lines << stream->readLine();
       }
-      eph = new t_ephGPS(version(), lines);
+      eph = new t_ephGPS(version(), lines, navType);
     }
     else if (sys == 'R') {
@@ -250,5 +250,5 @@
         lines << stream->readLine();
       }
-      eph = new t_ephGlo(version(), lines);
+      eph = new t_ephGlo(version(), lines, navType);
     }
     else if (sys == 'E') {
@@ -256,5 +256,5 @@
         lines << stream->readLine();
       }
-      eph = new t_ephGal(version(), lines);
+      eph = new t_ephGal(version(), lines, navType);
     }
     else if (sys == 'J') {
@@ -269,5 +269,5 @@
         lines << stream->readLine();
       }
-      eph = new t_ephGPS(version(), lines);
+      eph = new t_ephGPS(version(), lines, navType);
     }
     else if (sys== 'S') {
@@ -275,5 +275,5 @@
         lines << stream->readLine();
       }
-      eph = new t_ephSBAS(version(), lines);
+      eph = new t_ephSBAS(version(), lines, navType);
     }
     else if (sys == 'C') {
@@ -289,5 +289,5 @@
         lines << stream->readLine();
       }
-      eph = new t_ephBDS(version(), lines);
+      eph = new t_ephBDS(version(), lines, navType);
     }
     else if (sys == 'I') {
@@ -299,5 +299,5 @@
         lines << stream->readLine();
       }
-      eph = new t_ephGPS(version(), lines);
+      eph = new t_ephGPS(version(), lines, navType);
     }
 
