Index: trunk/BNC/src/rinex/corrfile.cpp
===================================================================
--- trunk/BNC/src/rinex/corrfile.cpp	(revision 6497)
+++ trunk/BNC/src/rinex/corrfile.cpp	(revision 6498)
@@ -62,36 +62,51 @@
 void t_corrFile::syncRead(const bncTime& tt) {
 
-  QList<t_clkCorr>      clkCorrList;
-  QList<t_orbCorr>      orbCorrList;
-  QList<t_satCodeBias>  satCodeBiasList;
-  QList<t_satPhaseBias> satPhaseBiasList;
-  t_vTec                vTec;
+  while (_stream.good() && (!_lastEpoTime.valid() || _lastEpoTime <= tt)) {
 
-  while (!stopRead(tt) && _stream.good()) {
-    if (stopRead(tt)) {
+    if (_lastLine.empty()) {
+      getline(_stream, _lastLine); stripWhiteSpace(_lastLine);
+      if      (!_stream.good()) {
+        throw "t_corrFile: end of file";
+      }
+      else if (_lastLine.empty() || _lastLine[0] == '!') {
+        continue;
+      }
+      else if (_lastLine[0] != '>') {
+        throw "t_corrFile: error";
+      }
+    }
+
+    t_corrSSR::e_type corrType = t_corrSSR::readEpoLine(_lastLine, _lastEpoTime);
+    if      (corrType == t_corrSSR::unknown) {
+      throw "t_corrFile: unknown line " + _lastLine;
+    }
+    else if (_lastEpoTime > tt) {
       break;
     }
-  }
-
-  if (orbCorrList.size() > 0) {
-    emit newOrbCorrections(orbCorrList);
-  }
-  if (clkCorrList.size() > 0) {
-    emit newClkCorrections(clkCorrList);
-  }
-  if (satCodeBiasList.size() > 0) {
-    emit newCodeBiases(satCodeBiasList);
-  }
-  if (satPhaseBiasList.size() > 0) {
-    emit newPhaseBiases(satPhaseBiasList);
-  }
-  if (vTec._layers.size() > 0) {
-    emit newTec(vTec);
+    else if (corrType == t_corrSSR::clkCorr) {
+      QList<t_clkCorr> clkCorrList;
+      t_clkCorr::readEpoch(_lastLine, _stream, clkCorrList);
+      emit newClkCorrections(clkCorrList);
+    }
+    else if (corrType == t_corrSSR::orbCorr) {
+      QList<t_orbCorr> orbCorrList;
+      t_orbCorr::readEpoch(_lastLine, _stream, orbCorrList);
+      emit newOrbCorrections(orbCorrList);
+    }
+    else if (corrType == t_corrSSR::codeBias) {
+      QList<t_satCodeBias> satCodeBiasList;
+      t_satCodeBias::readEpoch(_lastLine, _stream, satCodeBiasList);
+      emit newCodeBiases(satCodeBiasList);
+    }
+    else if (corrType == t_corrSSR::phaseBias) {
+      QList<t_satPhaseBias> satPhaseBiasList;
+      t_satPhaseBias::readEpoch(_lastLine, _stream, satPhaseBiasList);
+      emit newPhaseBiases(satPhaseBiasList);
+    }
+    else if (corrType == t_corrSSR::vTec) {
+      t_vTec vTec;
+      t_vTec::read(_lastLine, _stream, vTec);
+      emit newTec(vTec);
+    }
   }
 }
-
-// Read till a given time
-////////////////////////////////////////////////////////////////////////////
-bool t_corrFile::stopRead(const bncTime& tt) {
-  return true;
-}
Index: trunk/BNC/src/rinex/corrfile.h
===================================================================
--- trunk/BNC/src/rinex/corrfile.h	(revision 6497)
+++ trunk/BNC/src/rinex/corrfile.h	(revision 6498)
@@ -49,6 +49,7 @@
 
  private:
-  bool stopRead(const bncTime& tt);
   std::fstream       _stream;
+  std::string        _lastLine;
+  bncTime            _lastEpoTime;
   QMap<QString, int> _corrIODs;
 };
Index: trunk/BNC/src/satObs.cpp
===================================================================
--- trunk/BNC/src/satObs.cpp	(revision 6497)
+++ trunk/BNC/src/satObs.cpp	(revision 6498)
@@ -43,5 +43,5 @@
 // 
 ////////////////////////////////////////////////////////////////////////////
-void t_clkCorr::readEpoch(const QStringList& lines, QList<t_clkCorr>& corrList) {
+void t_clkCorr::readEpoch(const string epoLine, std::istream& in, QList<t_clkCorr>& corrList) {
 }
 
@@ -84,5 +84,5 @@
 // 
 ////////////////////////////////////////////////////////////////////////////
-void t_orbCorr::readEpoch(const QStringList& lines, QList<t_orbCorr>& corrList) {
+void t_orbCorr::readEpoch(const string epoLine, std::istream& in, QList<t_orbCorr>& corrList) {
 }
 
@@ -116,5 +116,5 @@
 // 
 ////////////////////////////////////////////////////////////////////////////
-void t_satCodeBias::readEpoch(const QStringList& lines, QList<t_satCodeBias>& biasList) {
+void t_satCodeBias::readEpoch(const string epoLine, std::istream& in, QList<t_satCodeBias>& biasList) {
 }
 
@@ -153,5 +153,5 @@
 // 
 ////////////////////////////////////////////////////////////////////////////
-void t_satPhaseBias::readEpoch(const QStringList& lines, QList<t_satPhaseBias>& biasList) {
+void t_satPhaseBias::readEpoch(const string epoLine, std::istream& in, QList<t_satPhaseBias>& biasList) {
 }
 
@@ -180,4 +180,10 @@
 // 
 ////////////////////////////////////////////////////////////////////////////
-void t_vTec::read(const QStringList& lines, t_vTec& vTec) {
+void t_vTec::read(const string epoLine, std::istream& in, t_vTec& vTec) {
 }
+
+// 
+////////////////////////////////////////////////////////////////////////////
+t_corrSSR::e_type t_corrSSR::readEpoLine(const string line, bncTime& epoTime) {
+
+}
Index: trunk/BNC/src/satObs.h
===================================================================
--- trunk/BNC/src/satObs.h	(revision 6497)
+++ trunk/BNC/src/satObs.h	(revision 6498)
@@ -63,5 +63,5 @@
   t_orbCorr();
   static void writeEpoch(std::ostream* out, const QList<t_orbCorr>& corrList);
-  static void readEpoch(const QStringList& lines, QList<t_orbCorr>& corrList);
+  static void readEpoch(const std::string epoLine, std::istream& in, QList<t_orbCorr>& corrList);
   std::string    _staID;
   t_prn          _prn;
@@ -77,5 +77,5 @@
   t_clkCorr();
   static void writeEpoch(std::ostream* out, const QList<t_clkCorr>& corrList);
-  static void readEpoch(const QStringList& lines, QList<t_clkCorr>& corrList);
+  static void readEpoch(const std::string epoLine, std::istream& in, QList<t_clkCorr>& corrList);
   std::string    _staID;
   t_prn          _prn;
@@ -99,5 +99,5 @@
  public:
   static void writeEpoch(std::ostream* out, const QList<t_satCodeBias>& biasList);
-  static void readEpoch(const QStringList& lines, QList<t_satCodeBias>& biasList);
+  static void readEpoch(const std::string epoLine, std::istream& in, QList<t_satCodeBias>& biasList);
   std::string                _staID;
   t_prn                      _prn;
@@ -128,5 +128,5 @@
   }
   static void writeEpoch(std::ostream* out, const QList<t_satPhaseBias>& biasList);
-  static void readEpoch(const QStringList& lines, QList<t_satPhaseBias>& biasList);
+  static void readEpoch(const std::string epoLine, std::istream& in, QList<t_satPhaseBias>& biasList);
   std::string                 _staID;
   t_prn                       _prn;
@@ -147,5 +147,5 @@
  public:
   static void write(std::ostream* out, const t_vTec& vTec);
-  static void read(const QStringList& lines, t_vTec& vTec);
+  static void read(const std::string epoLine, std::istream& in, t_vTec& vTec);
   std::string              _staID;
   bncTime                  _time;
@@ -153,3 +153,9 @@
 };
 
+class t_corrSSR {
+ public:
+  enum e_type {clkCorr, orbCorr, codeBias, phaseBias, vTec, unknown};
+  static e_type readEpoLine(const std::string line, bncTime& epoTime);
+};
+
 #endif
