Index: /trunk/BNC/src/bncrinex.cpp
===================================================================
--- /trunk/BNC/src/bncrinex.cpp	(revision 4482)
+++ /trunk/BNC/src/bncrinex.cpp	(revision 4483)
@@ -91,13 +91,4 @@
   _userName = _userName.leftJustified(20, ' ', true);
 
-  if ( Qt::CheckState(settings.value("rnxV3").toInt()) == Qt::Checked) {
-    _rinexVers = 3;    
-  }
-  else {
-    _rinexVers = 2;
-  }
-
-  _approxPos[0] = _approxPos[1] = _approxPos[2] = 0.0;
-
   _samplingRate = settings.value("rnxSampl").toInt();
 
@@ -138,5 +129,5 @@
 bncRinex::~bncRinex() {
   bncSettings settings;
-  if ((_rinexVers == 3) && ( Qt::CheckState(settings.value("rnxAppend").toInt()) != Qt::Checked) ) {
+  if ((_header._version >= 3.0) && ( Qt::CheckState(settings.value("rnxAppend").toInt()) != Qt::Checked) ) {
     _out << ">                              4  1" << endl;
     _out << "END OF FILE" << endl;
@@ -237,4 +228,12 @@
     }
   }
+
+  bncSettings settings;
+  if ( Qt::CheckState(settings.value("rnxV3").toInt()) == Qt::Checked) {
+    _header._version = 3.01;    
+  }
+  else {
+    _header._version = 2.12;
+  }
 }
 
@@ -438,5 +437,5 @@
   // Epoch header line: RINEX Version 3
   // ----------------------------------
-  if (_rinexVers == 3) {
+  if (_header._version >= 3.0) {
     _out << datTim.toString("> yyyy MM dd hh mm ").toAscii().data()
          << setw(10) << setprecision(7) << sec
@@ -502,5 +501,5 @@
     // RINEX Version 3
     // ---------------
-    if (_rinexVers == 3) {
+    if (_header._version >= 3.0) {
       _out << rinexSatLine(obs, lli1, lli2, lli5); 
       _out << endl;
@@ -510,12 +509,12 @@
     // ---------------
     else {
-      _out << setw(14) << setprecision(3) << obs.measdata("C1", _rinexVers)  << ' '  << ' '
-           << setw(14) << setprecision(3) << obs.measdata("P1", _rinexVers)  << ' '  << ' '
-           << setw(14) << setprecision(3) << obs.measdata("L1", _rinexVers)  << lli1 << ' '
-           << setw(14) << setprecision(3) << obs.measdata("S1", _rinexVers)  << ' '  << ' '
-           << setw(14) << setprecision(3) << obs.measdata("C2", _rinexVers)  << ' '  << ' ' << endl
-           << setw(14) << setprecision(3) << obs.measdata("P2", _rinexVers)  << ' '  << ' ' 
-           << setw(14) << setprecision(3) << obs.measdata("L2", _rinexVers)  << lli2 << ' '
-           << setw(14) << setprecision(3) << obs.measdata("S2", _rinexVers)  << endl;
+      _out << setw(14) << setprecision(3) << obs.measdata("C1", _header._version)  << ' '  << ' '
+           << setw(14) << setprecision(3) << obs.measdata("P1", _header._version)  << ' '  << ' '
+           << setw(14) << setprecision(3) << obs.measdata("L1", _header._version)  << lli1 << ' '
+           << setw(14) << setprecision(3) << obs.measdata("S1", _header._version)  << ' '  << ' '
+           << setw(14) << setprecision(3) << obs.measdata("C2", _header._version)  << ' '  << ' ' << endl
+           << setw(14) << setprecision(3) << obs.measdata("P2", _header._version)  << ' '  << ' ' 
+           << setw(14) << setprecision(3) << obs.measdata("L2", _header._version)  << lli2 << ' '
+           << setw(14) << setprecision(3) << obs.measdata("S2", _header._version)  << endl;
     }
   }
@@ -527,5 +526,5 @@
 ////////////////////////////////////////////////////////////////////////////
 void bncRinex::closeFile() {
-  if (_rinexVers == 3) {
+  if (_header._version == 3) {
     _out << ">                              4  1" << endl;
     _out << "END OF FILE" << endl;
@@ -555,5 +554,5 @@
   const QVector<QString>& types = _header._obsTypesV3[obs.satSys];
   for (int ii = 0; ii < types.size(); ii++) {
-    double value = obs.measdata(types[ii], _rinexVers);
+    double value = obs.measdata(types[ii], _header._version);
     str << setw(14) << setprecision(3) << value;
     if      (value != 0.0 && types[ii].indexOf("L1") == 0) {
Index: /trunk/BNC/src/bncrinex.h
===================================================================
--- /trunk/BNC/src/bncrinex.h	(revision 4482)
+++ /trunk/BNC/src/bncrinex.h	(revision 4483)
@@ -49,10 +49,4 @@
    int samplingRate() const {return _samplingRate;}
 
-   void setApproxPos(double stax, double stay, double staz) {
-     _approxPos[0] = stax;
-     _approxPos[1] = stay;
-     _approxPos[2] = staz;
-   }
-
    std::string rinexSatLine(const t_obs& obs, char lli1, char lli2, char lli5);
 
@@ -85,6 +79,4 @@
    bool          _reconnectFlag;
    QDate         _skeletonDate;
-   int           _rinexVers;
-   double        _approxPos[3];
    int           _samplingRate;
 
