Index: /trunk/BNC/src/bncrinex.cpp
===================================================================
--- /trunk/BNC/src/bncrinex.cpp	(revision 6225)
+++ /trunk/BNC/src/bncrinex.cpp	(revision 6226)
@@ -435,4 +435,32 @@
     t_rnxObsFile::t_rnxSat rnxSat;
     rnxSat.prn = satObs._prn;
+    for (unsigned ii = 0; ii < satObs._obs.size(); ii++) {
+      const t_frqObs* frqObs = satObs._obs[ii];
+      if (frqObs->_codeValid) {
+        QString type = 'C' + QString(frqObs->_rnxType2ch.c_str());
+        t_rnxObsFile::t_rnxObs rnxObs;
+        rnxObs.value = frqObs->_code;
+        rnxSat.obs[type] = rnxObs;
+      }
+      if (frqObs->_phaseValid) {
+        QString type = 'L' + QString(frqObs->_rnxType2ch.c_str());
+        t_rnxObsFile::t_rnxObs rnxObs;
+        rnxObs.value = frqObs->_phase;
+        rnxSat.obs[type] = rnxObs;
+      }
+      if (frqObs->_dopplerValid) {
+        QString type = 'D' + QString(frqObs->_rnxType2ch.c_str());
+        t_rnxObsFile::t_rnxObs rnxObs;
+        rnxObs.value = frqObs->_doppler;
+        rnxSat.obs[type] = rnxObs;
+      }
+      if (frqObs->_snrValid) {
+        QString type = 'S' + QString(frqObs->_rnxType2ch.c_str());
+        t_rnxObsFile::t_rnxObs rnxObs;
+        rnxObs.value = frqObs->_snr;
+        rnxSat.obs[type] = rnxObs;
+      }
+    }
+
 
     rnxEpo.rnxSat.push_back(rnxSat);
@@ -441,9 +469,9 @@
   // Write the epoch
   // ---------------
-  QString outLines;
+  QByteArray outLines;
   QTextStream outStream(&outLines);
   t_rnxObsFile::writeEpoch(&outStream, _header, &rnxEpo);
 
-  _out << outLines.toAscii().data();
+  _out << outLines.data();
   _out.flush();
 }
Index: /trunk/BNC/src/rinex/rnxobsfile.h
===================================================================
--- /trunk/BNC/src/rinex/rnxobsfile.h	(revision 6225)
+++ /trunk/BNC/src/rinex/rnxobsfile.h	(revision 6226)
@@ -95,4 +95,7 @@
   class t_rnxObs {
    public:
+    t_rnxObs() {
+      value = 0.0; lli = 0; snr = 0;
+    }
     double value;
     int    lli;
