Index: trunk/BNC/bncgetthread.cpp
===================================================================
--- trunk/BNC/bncgetthread.cpp	(revision 1386)
+++ trunk/BNC/bncgetthread.cpp	(revision 1387)
@@ -54,5 +54,6 @@
 #include "bncrinex.h"
 #include "bnczerodecoder.h"
-#include "bncnetquery.h"
+#include "bncnetqueryv1.h"
+#include "bncnetqueryv2.h"
 
 #include "RTCM/RTCM2Decoder.h"
@@ -188,10 +189,10 @@
   else {
     _rnx = new bncRinex(_staID, _mountPoint, _format, _latitude, 
-                        _longitude, _nmea, _ntripVersion);
+                        _longitude, _nmea);
   }
   _rnx_set_position = false;
 
   connect(((bncApp*)qApp), SIGNAL(newEphGPS(gpsephemeris)),
-	  this, SLOT(slotNewEphGPS(gpsephemeris)));
+          this, SLOT(slotNewEphGPS(gpsephemeris)));
 
   if (settings.value("serialMountPoint").toString() == _staID) {
@@ -304,6 +305,17 @@
   if (!_rawInpFile) {
     delete _query;
-    _query = new bncNetQuery();
-    _query->startRequest(_mountPoint);
+    if (_ntripVersion == "2") {
+      _query = new bncNetQueryV2();
+    }
+    else {
+      _query = new bncNetQueryV1();
+    }
+    if (_nmea == "yes") {
+      QByteArray gga = ggaString(_latitude, _longitude);
+      _query->startRequest(_mountPoint, gga);
+    }
+    else {
+      _query->startRequest(_mountPoint, "");
+    }
   }
 
@@ -554,6 +566,6 @@
         }
 
-	// RTCM scan output
-	// ----------------
+        // RTCM scan output
+        // ----------------
         if ( _checkMountPoint == _staID || _checkMountPoint == "ALL" ) {
           QSettings settings;
@@ -589,40 +601,40 @@
                 ant3 = QString("%1 ").arg(_decoder->_antList[ii].zz,0,'f',4).toAscii();
                 switch (_decoder->_antList[ii].type) {
-	        case GPSDecoder::t_antInfo::ARP: antT = "ARP"; break;
-	        case GPSDecoder::t_antInfo::APC: antT = "APC"; break;
-	        }
+                case GPSDecoder::t_antInfo::ARP: antT = "ARP"; break;
+                case GPSDecoder::t_antInfo::APC: antT = "APC"; break;
+                }
                 emit(newMessage(_staID + ": " + antT + " (ITRF) X " + ant1 + "m", true));
                 emit(newMessage(_staID + ": " + antT + " (ITRF) Y " + ant2 + "m", true));
                 emit(newMessage(_staID + ": " + antT + " (ITRF) Z " + ant3 + "m", true));
-	        if (_decoder->_antList[ii].height_f) {
-		  QByteArray ant4 = QString("%1 ").arg(_decoder->_antList[ii].height,0,'f',4).toAscii();
-		  emit(newMessage(_staID + ": Antenna height above marker "  + ant4 + "m", true));
-	        }
-	        emit(newAntCrd(_staID, 
-			     _decoder->_antList[ii].xx, _decoder->_antList[ii].yy, _decoder->_antList[ii].zz, 
-			     antT));
+                if (_decoder->_antList[ii].height_f) {
+                  QByteArray ant4 = QString("%1 ").arg(_decoder->_antList[ii].height,0,'f',4).toAscii();
+                  emit(newMessage(_staID + ": Antenna height above marker "  + ant4 + "m", true));
+                }
+                emit(newAntCrd(_staID, 
+                             _decoder->_antList[ii].xx, _decoder->_antList[ii].yy, _decoder->_antList[ii].zz, 
+                             antT));
               }
             }
           }
           if ( _checkMountPoint == "ANTCRD_ONLY" && _decoder->_antList.size() ) {
-	    for (int ii=0;ii<_decoder->_antList.size();++ii) {
-	      QByteArray antT;
-	      switch (_decoder->_antList[ii].type) {
-	      case GPSDecoder::t_antInfo::ARP: antT = "ARP"; break;
-	      case GPSDecoder::t_antInfo::APC: antT = "APC"; break;
-	      }
-	      emit(newAntCrd(_staID, 
-			   _decoder->_antList[ii].xx, _decoder->_antList[ii].yy, _decoder->_antList[ii].zz, 
-			   antT));
-	    }
+            for (int ii=0;ii<_decoder->_antList.size();++ii) {
+              QByteArray antT;
+              switch (_decoder->_antList[ii].type) {
+              case GPSDecoder::t_antInfo::ARP: antT = "ARP"; break;
+              case GPSDecoder::t_antInfo::APC: antT = "APC"; break;
+              }
+              emit(newAntCrd(_staID, 
+                           _decoder->_antList[ii].xx, _decoder->_antList[ii].yy, _decoder->_antList[ii].zz, 
+                           antT));
+            }
           }
         }
-	
+        
         _decoder->_typeList.clear();
         _decoder->_antType.clear();
         _decoder->_antList.clear();
 
-	// Loop over all observations (observations output)
-	// ------------------------------------------------
+        // Loop over all observations (observations output)
+        // ------------------------------------------------
         QListIterator<p_obs> it(_decoder->_obsList);
         while (it.hasNext()) {
@@ -720,5 +732,5 @@
           // ------------
           if (_rnx) {
-	    bool dump = true;
+            bool dump = true;
 
             //// // RTCMv2 XYZ
@@ -726,10 +738,10 @@
             //// RTCM2Decoder* decoder2 = dynamic_cast<RTCM2Decoder*>(_decoder);
             //// if ( decoder2 && !_rnx_set_position ) {
-	    ////   double stax, stay, staz;
-	    ////   double dL1[3], dL2[3];
-	    ////   if ( decoder2->getStaCrd(stax, stay, staz,
+            ////   double stax, stay, staz;
+            ////   double dL1[3], dL2[3];
+            ////   if ( decoder2->getStaCrd(stax, stay, staz,
             ////                            dL1[0], dL1[1], dL1[2], 
             ////                            dL2[0], dL2[1], dL2[2]) == success ) {
-	    //// 
+            //// 
             ////     if ( _checkMountPoint == _staID || _checkMountPoint == "ALL" ) {
             ////       QString ant1;
@@ -753,20 +765,20 @@
             ////       emit(newMessage(_staID + ": L2 APC DZ " + ant1.toAscii() + "m" ));
             ////     }
-	    //// 	_rnx_set_position = true;
+            ////        _rnx_set_position = true;
             ////   }
             //// }  
 
-	    if ( dump ) {
-	      long iSec    = long(floor(obs->_o.GPSWeeks+0.5));
-	      long newTime = obs->_o.GPSWeek * 7*24*3600 + iSec;
-	      if (_samplingRate == 0 || iSec % _samplingRate == 0) {
-		_rnx->deepCopy(obs);
-	      }
-	      _rnx->dumpEpoch(newTime);
+            if ( dump ) {
+              long iSec    = long(floor(obs->_o.GPSWeeks+0.5));
+              long newTime = obs->_o.GPSWeek * 7*24*3600 + iSec;
+              if (_samplingRate == 0 || iSec % _samplingRate == 0) {
+                _rnx->deepCopy(obs);
+              }
+              _rnx->dumpEpoch(newTime);
             }
           }
 
-	  // Emit new observation signal
-	  // ---------------------------
+          // Emit new observation signal
+          // ---------------------------
           bool firstObs = (obs == _decoder->_obsList.first());
           obs->_status = t_obs::posted;
@@ -881,3 +893,2 @@
   }
 }
-
Index: trunk/BNC/bncnetquery.h
===================================================================
--- trunk/BNC/bncnetquery.h	(revision 1386)
+++ trunk/BNC/bncnetquery.h	(revision 1387)
@@ -16,5 +16,5 @@
             (bncApp*) qApp, SLOT(slotMessage(const QByteArray,bool)));
   }
-  virtual ~bncNetQuery();
+  virtual ~bncNetQuery() {};
 
   virtual void waitForRequestResult(const QUrl& url, QByteArray& outData) = 0;
Index: trunk/BNC/bncrinex.cpp
===================================================================
--- trunk/BNC/bncrinex.cpp	(revision 1386)
+++ trunk/BNC/bncrinex.cpp	(revision 1387)
@@ -63,6 +63,6 @@
 bncRinex::bncRinex(const QByteArray& statID, const QUrl& mountPoint, 
                    const QByteArray& format, const QByteArray& latitude,
-                   const QByteArray& longitude, const QByteArray& nmea,
-                   const QByteArray& ntripVersion) {
+                   const QByteArray& longitude, const QByteArray& nmea) {
+
   _statID        = statID;
   _mountPoint    = mountPoint;
@@ -71,5 +71,4 @@
   _longitude     = longitude;
   _nmea          = nmea;
-  _ntripVersion  = ntripVersion;
   _headerWritten = false;
   _reconnectFlag = false;
Index: trunk/BNC/bncrinex.h
===================================================================
--- trunk/BNC/bncrinex.h	(revision 1386)
+++ trunk/BNC/bncrinex.h	(revision 1387)
@@ -40,6 +40,5 @@
    bncRinex(const QByteArray& statID, const QUrl& mountPoint, 
             const QByteArray& format, const QByteArray& latitude,
-            const QByteArray& longitude, const QByteArray& nmea,
-            const QByteArray& ntripVersion);
+            const QByteArray& longitude, const QByteArray& nmea);
    ~bncRinex();
    void deepCopy(const p_obs obs);
@@ -82,5 +81,4 @@
    QByteArray    _longitude;
    QByteArray    _nmea;
-   QByteArray    _ntripVersion;
    bool          _reconnectFlag;
    QDate         _skeletonDate;
Index: trunk/BNC/bnctabledlg.cpp
===================================================================
--- trunk/BNC/bnctabledlg.cpp	(revision 1386)
+++ trunk/BNC/bnctabledlg.cpp	(revision 1387)
@@ -43,5 +43,5 @@
 #include "bnctabledlg.h"
 #include "bncgetthread.h"
-#include "bncnetquery.h"
+#include "bncnetqueryv2.h"
 
 using namespace std;
@@ -171,5 +171,5 @@
   url.setPath("/");
 
-  bncNetQuery query;
+  bncNetQueryV2 query;
   QByteArray outData;
   query.waitForRequestResult(url, outData);
Index: trunk/BNC/bncutils.cpp
===================================================================
--- trunk/BNC/bncutils.cpp	(revision 1386)
+++ trunk/BNC/bncutils.cpp	(revision 1387)
@@ -129,5 +129,5 @@
 // 
 ////////////////////////////////////////////////////////////////////////////
-QString ggaString(const QByteArray& latitude, const QByteArray& longitude) {
+QByteArray ggaString(const QByteArray& latitude, const QByteArray& longitude) {
 
   double lat = strtod(latitude,NULL);
@@ -166,4 +166,4 @@
   gga += QString("*%1").arg(XOR, 2, 16, QLatin1Char('0'));
 
-  return gga;
+  return gga.toAscii();
 }
Index: trunk/BNC/bncutils.h
===================================================================
--- trunk/BNC/bncutils.h	(revision 1386)
+++ trunk/BNC/bncutils.h	(revision 1387)
@@ -37,5 +37,5 @@
 QDateTime currentDateAndTimeGPS();
 
-QString ggaString(const QByteArray& latitude, const QByteArray& longitude);
+QByteArray ggaString(const QByteArray& latitude, const QByteArray& longitude);
 
 #endif
