Index: trunk/BNC/src/rinex/rnxobsfile.cpp
===================================================================
--- trunk/BNC/src/rinex/rnxobsfile.cpp	(revision 6125)
+++ trunk/BNC/src/rinex/rnxobsfile.cpp	(revision 6126)
@@ -355,11 +355,22 @@
 // Observation Type (satellite-system specific)
 ////////////////////////////////////////////////////////////////////////////
-QString t_rnxObsHeader::obsType(char sys, int index) const {
+QString t_rnxObsHeader::obsType(char sys, int index, double version) const {
+
+  if (version == 0.0) {
+    version = _version;
+  }
   if (_obsTypes.contains(sys)) {
-    return _obsTypes[sys].at(index);
-  }
-  else {
-    return "";
-  }
+    QString origType = _obsTypes[sys].at(index);
+    if      (int(version) == int(_version)) {
+      return origType;
+    }
+    else if (int(version) == 2) {
+      return t_rnxObsFile::type3to2(origType);
+    }
+    else if (int(version) == 3) {
+      return t_rnxObsFile::type2to3(sys, origType);
+    }
+  }
+  return "";
 }
 
@@ -583,4 +594,5 @@
   
     _currEpo.rnxSat.resize(numSat);
+    _currEpo.version = _header._version;
 
     // Observations
@@ -660,4 +672,5 @@
   
     _currEpo.rnxSat.resize(numSat);
+    _currEpo.version = _header._version;
 
     // Read Satellite Numbers
@@ -834,5 +847,5 @@
         *_stream << endl;
       }
-      QString type = obsType(sys, iType);
+      QString type = obsType(sys, iType, epo->version);
       if (!rnxSat.obs.contains(type)) {
         *_stream << QString().leftJustified(16);
@@ -886,5 +899,5 @@
     *_stream << rnxSat.prn.toString().c_str();
     for (int iType = 0; iType < nTypes(sys); iType++) {
-      QString type = obsType(sys, iType);
+      QString type = obsType(sys, iType, epo->version);
       if (!rnxSat.obs.contains(type)) {
         *_stream << QString().leftJustified(16);
@@ -1068,16 +1081,2 @@
 }
 
-// Set Observations from RINEX File
-////////////////////////////////////////////////////////////////////////////
-bool t_rnxObsFile::useType(const QStringList& useObsTypes, const QString& type) {
-
-  if (useObsTypes.size() == 0) {
-    return true;
-  }
-  for (int ii = 0; ii < useObsTypes.size(); ii++) {
-    if (type.left(2) == useObsTypes[ii].left(2)) {
-      return true;
-    }
-  }
-  return false;
-}
Index: trunk/BNC/src/rinex/rnxobsfile.h
===================================================================
--- trunk/BNC/src/rinex/rnxobsfile.h	(revision 6125)
+++ trunk/BNC/src/rinex/rnxobsfile.h	(revision 6126)
@@ -54,5 +54,5 @@
   int         numSys() const;
   int         nTypes(char sys) const;
-  QString     obsType(char sys, int index) const;
+  QString     obsType(char sys, int index, double version = 0.0) const;
   QStringList obsTypesStrings() const;
   void        write(QTextStream* stream, const QMap<QString, QString>* txtMap = 0) const;
@@ -103,10 +103,13 @@
   class t_rnxEpo {
    public:
+    t_rnxEpo() {clear();}
     void clear() {
       tt.reset();
       rnxSat.clear();
+      version = 0.0;
     }
     bncTime               tt;
     std::vector<t_rnxSat> rnxSat;
+    double                version;
   };
 
@@ -121,5 +124,7 @@
   int            nTypes(char sys) const {return _header.nTypes(sys);}
   const QString& fileName() const {return _fileName;}
-  QString        obsType(char sys, int index) const {return _header.obsType(sys, index);}
+  QString obsType(char sys, int index, double version = 0.0) const {
+    return _header.obsType(sys, index, version);
+  }
   const QString& antennaName() const {return _header._antennaName;}
   const QString& markerName() const {return _header._markerName;}
@@ -172,5 +177,4 @@
   t_rnxEpo* nextEpochV3();
   void handleEpochFlag(int flag, const QString& line, bool& headerReRead);
-  bool useType(const QStringList& useObsTypes, const QString& type);
 
   QMap<int, int>              _indexMap2to2;
