Index: trunk/BNC/bncgetthread.cpp
===================================================================
--- trunk/BNC/bncgetthread.cpp	(revision 1594)
+++ trunk/BNC/bncgetthread.cpp	(revision 1595)
@@ -122,5 +122,13 @@
 
   bncSettings settings;
+
   _miscMount = settings.value("miscMount").toString();
+
+  if ( settings.value("serialMountPoint").toString() == _staID &&
+       settings.value("serialAutoNMEA").toString() != "Auto" ) {
+    _height = settings.value("serialHeightNMEA").toString().toAscii();
+  } else {
+    _height = "100";
+  }
 
   // Check name conflict
@@ -479,5 +487,5 @@
     }
     if (_nmea == "yes") {
-      QByteArray gga = ggaString(_latitude, _longitude);
+      QByteArray gga = ggaString(_latitude, _longitude, _height);
       _query->startRequest(_mountPoint, gga);
     }
Index: trunk/BNC/bncgetthread.h
===================================================================
--- trunk/BNC/bncgetthread.h	(revision 1594)
+++ trunk/BNC/bncgetthread.h	(revision 1595)
@@ -87,4 +87,5 @@
    QByteArray      _latitude;
    QByteArray      _longitude;
+   QByteArray      _height;
    QByteArray      _nmea;
    QByteArray      _ntripVersion;
Index: trunk/BNC/bncsettings.cpp
===================================================================
--- trunk/BNC/bncsettings.cpp	(revision 1594)
+++ trunk/BNC/bncsettings.cpp	(revision 1595)
@@ -43,5 +43,4 @@
     setValue("ephV3",            "0");
     setValue("logFile",          "");
-    setValue("makePause",        "0");
     setValue("miscMount",        "");  
     setValue("mountPoints",      "");
@@ -64,7 +63,8 @@
     setValue("rnxV3",            "0");
     setValue("scanRTCM",         "0");
-    setValue("serialAutoNMEA",   "0");
+    setValue("serialAutoNMEA",   "Auto");
     setValue("serialBaudRate",   "9600");
     setValue("serialDataBits",   "8");
+    setValue("serialHeightNMEA", "");
     setValue("serialMountPoint", "");
     setValue("serialParity",     "NONE");
Index: trunk/BNC/bncutils.cpp
===================================================================
--- trunk/BNC/bncutils.cpp	(revision 1594)
+++ trunk/BNC/bncutils.cpp	(revision 1595)
@@ -129,8 +129,11 @@
 // 
 ////////////////////////////////////////////////////////////////////////////
-QByteArray ggaString(const QByteArray& latitude, const QByteArray& longitude) {
+QByteArray ggaString(const QByteArray& latitude,
+                     const QByteArray& longitude,
+                     const QByteArray& height) {
 
   double lat = strtod(latitude,NULL);
   double lon = strtod(longitude,NULL);
+  double hei = strtod(height,NULL);
 
   const char* flagN="N";
@@ -156,5 +159,7 @@
   gga += flagN;
   gga += QString(",%1%2,").arg((int)lon_deg,3, 10, QLatin1Char('0')).arg(lon_min, 7, 'f', 4, QLatin1Char('0'));
-  gga += flagE + QString(",1,05,1.00,+00100,M,10.000,M,,");
+  gga += flagE + QString(",1,05,1.00");
+  gga += QString(",%1,").arg(hei, 7, 'f', 1, QLatin1Char('0'));
+  gga += QString("M,10.000,M,,");
   int xori;
   char XOR = 0;
Index: trunk/BNC/bncutils.h
===================================================================
--- trunk/BNC/bncutils.h	(revision 1594)
+++ trunk/BNC/bncutils.h	(revision 1595)
@@ -37,5 +37,7 @@
 QDateTime currentDateAndTimeGPS();
 
-QByteArray ggaString(const QByteArray& latitude, const QByteArray& longitude);
+QByteArray ggaString(const QByteArray& latitude, 
+                     const QByteArray& longitude,
+                     const QByteArray& height);
 
 #endif
Index: trunk/BNC/bncwindow.cpp
===================================================================
--- trunk/BNC/bncwindow.cpp	(revision 1594)
+++ trunk/BNC/bncwindow.cpp	(revision 1595)
@@ -217,7 +217,4 @@
     _obsRateComboBox->setCurrentIndex(kk);
   }
-  _makePauseCheckBox  = new QCheckBox();
-  _makePauseCheckBox->setCheckState(Qt::CheckState(
-                                    settings.value("makePause").toInt()));
   _adviseRecoSpinBox = new QSpinBox();
   _adviseRecoSpinBox->setMinimum(0);
@@ -270,8 +267,12 @@
     _serialStopBitsComboBox->setCurrentIndex(kk);
   }
-  _serialAutoNMEACheckBox  = new QCheckBox();
-  _serialAutoNMEACheckBox->setCheckState(Qt::CheckState(
-                                    settings.value("serialAutoNMEA").toInt()));
-
+  _serialAutoNMEAComboBox  = new QComboBox();
+  _serialAutoNMEAComboBox->setMaximumWidth(9*ww);
+  _serialAutoNMEAComboBox->addItems(QString("Auto,Manual").split(","));
+  kk = _serialAutoNMEAComboBox->findText(settings.value("serialAutoNMEA").toString());
+  if (kk != -1) {
+    _serialAutoNMEAComboBox->setCurrentIndex(kk);
+  }
+  _serialHeightNMEALineEdit  = new QLineEdit(settings.value("serialHeightNMEA").toString());
   _perfIntrComboBox    = new QComboBox();
   _perfIntrComboBox->setMaximumWidth(9*ww);
@@ -333,5 +334,4 @@
   _adviseRecoSpinBox->setWhatsThis(tr("<p>Following a stream outage or a longer series of bad observations, an advisory note is generated when valid observations are received again throughout the 'Recovery threshold' time span. A value of about 5min (default) is recommended.</p><p>A value of zero '0' means that for any stream recovery, however short, BNC immediately generates an advisory note.</p>"));
   _adviseFailSpinBox->setWhatsThis(tr("<p>An advisory note is generated when no (or only corrupted) observations are seen throughout the 'Failure threshold' time span. A value of 15 min (default) is recommended.</p><p>A value of zero '0' means that for any stream failure, however short, BNC immediately generates an advisory note.</p>"));
-  _makePauseCheckBox->setWhatsThis(tr("<p>In case of a continuously corrupted stream, the decoding process can be paused and decodings are then attempted again at decreasing rate till the stream hopefully recovers. Tick 'Pause' to activate this function.</p><p>Do not tick 'Pause' (default) in order to prevent BNC from making any decoding pause. Be aware that this may incur an unnecessary workload.</p>"));
   _logFileLineEdit->setWhatsThis(tr("<p>Records of BNC's activities are shown in the 'Logs' section on the bottom of this window. They can be saved into a file when a valid path is specified in the 'Logfile (full path)' field.</p><p>The logfile name will automatically be extended by a string '_YYMMDD' carrying the current date."));
   _adviseScriptLineEdit->setWhatsThis(tr("<p>Specify the full path to a script or batch file to handle advisory notes generated in the event of corrupted streams or stream outages. The affected mountpoint and one of the comments 'Begin_Outage', 'End_Outage', 'Begin_Corrupted', or 'End_Corrupted' are passed on to the script as command line parameters.</p><p>The script can be configured to send an email to BNC's operator and/or to the affected stream provider. An empty option field (default) or invalid path means that you don't want to use this option.</p>"));
@@ -349,5 +349,6 @@
   _serialDataBitsComboBox->setWhatsThis(tr("<p>Select the number of 'Data bits' for the serial link.</p><p>Note that your selection must equal the number of data bits configured to the serial connected device. Note further that often 8 data bits are used.</p>"));
   _serialStopBitsComboBox->setWhatsThis(tr("<p>Select the number of 'Stop bits' for the serial link.</p><p>Note that your selection must equal the number of stop bits configured to the serial connected device. Note further that often 1 stop bit is used.</p>"));
-  _serialAutoNMEACheckBox->setWhatsThis(tr("<p>Tick 'Auto NMEA' to forward NMEA GGA messages coming from your serial connected device to the NTRIP brodacaster.</p><p>Note that this replaces the simulation of an initial NMEA GGA message based on latitude/longitude from the broadcaster's sourcetable.</p>"));
+  _serialAutoNMEAComboBox->setWhatsThis(tr("<p>Concerning virtual reference stations (VRS):<p></p>Select 'Auto' to automatically forward NMEA GGA messages coming from your serial connected device to the NTRIP brodacaster.</p><p>Note that this replaces the 'Manual' simulation of an initial NMEA GGA message based on the approximate (editable) VRS latitude/longitude from the broadcaster's sourcetable and an approximate VRS height to be specified.</p><p>The setting of this option is ignored in case of streams coming from physical reference stations.</p>"));
+  _serialHeightNMEALineEdit->setWhatsThis(tr("<p>Concerning virtual reference stations (VRS):<p></p>Specify an approximate 'Height' in meter for your VRS to simulate an inital NMEA GGA message.</p><p>The setting of this option is ignored in case of streams coming from physical reference stations.</p>"));
 
   // Canvas with Editable Fields
@@ -487,6 +488,4 @@
   aLayout->addWidget(new QLabel("Recovery threshold"),            2, 0);
   aLayout->addWidget(_adviseRecoSpinBox,                          2, 1);
-  aLayout->addWidget(new QLabel("Pause"),                         2, 2, Qt::AlignRight);
-  aLayout->addWidget(_makePauseCheckBox,                          2, 3, Qt::AlignLeft);
   aLayout->addWidget(new QLabel("Script (full path)"),            3, 0);
   aLayout->addWidget(_adviseScriptLineEdit,                       3, 1,1,10);
@@ -499,10 +498,7 @@
     _adviseFailSpinBox->setStyleSheet("background-color: lightGray");
     _adviseRecoSpinBox->setStyleSheet("background-color: lightGray");
-    palette.setColor(_makePauseCheckBox->backgroundRole(), lightGray);
-    _makePauseCheckBox->setPalette(palette);
     _adviseScriptLineEdit->setStyleSheet("background-color: lightGray");
     _adviseFailSpinBox->setEnabled(false);
     _adviseRecoSpinBox->setEnabled(false);
-    _makePauseCheckBox->setEnabled(false);
     _adviseScriptLineEdit->setEnabled(false);
   }
@@ -602,4 +598,5 @@
   QGridLayout* serLayout = new QGridLayout;
   serLayout->setColumnMinimumWidth(0,14*ww);
+  _serialHeightNMEALineEdit->setMaximumWidth(8*ww);
   serLayout->addWidget(new QLabel("Mountpoint"),                  0,0, Qt::AlignLeft);
   serLayout->addWidget(_serialMountPointLineEdit,                 0,1,1,2);
@@ -614,10 +611,14 @@
   serLayout->addWidget(new QLabel("               Stop bits  "),  3,2, Qt::AlignRight);
   serLayout->addWidget(_serialStopBitsComboBox,                   3,3);
-  serLayout->addWidget(new QLabel("Auto NMEA"),                   4, 0);
-  serLayout->addWidget(_serialAutoNMEACheckBox,                   4, 1);
+  serLayout->addWidget(new QLabel("NMEA"),                        4,0);
+  serLayout->addWidget(_serialAutoNMEAComboBox,                   4,1);
+  serLayout->addWidget(new QLabel("Height"),                      4,2, Qt::AlignRight);
+  serLayout->addWidget(_serialHeightNMEALineEdit,                 4,3);
   serLayout->addWidget(new QLabel("Serial port settings to feed a serial connected device."),5,0,1,30);
 
   connect(_serialMountPointLineEdit, SIGNAL(textChanged(const QString &)),
           this, SLOT(bncText(const QString &)));
+  connect(_serialAutoNMEAComboBox, SIGNAL(currentIndexChanged(const QString &)),
+          this, SLOT(bncText(const QString)));
   if (_serialMountPointLineEdit->text().isEmpty()) { 
     _serialPortNameLineEdit->setStyleSheet("background-color: lightGray");
@@ -626,6 +627,6 @@
     _serialDataBitsComboBox->setStyleSheet("background-color: lightGray");
     _serialStopBitsComboBox->setStyleSheet("background-color: lightGray");
-    palette.setColor(_serialAutoNMEACheckBox->backgroundRole(), lightGray);
-    _serialAutoNMEACheckBox->setPalette(palette);
+    _serialAutoNMEAComboBox->setStyleSheet("background-color: lightGray");
+    _serialHeightNMEALineEdit->setStyleSheet("background-color: lightGray");
     _serialPortNameLineEdit->setEnabled(false);
     _serialBaudRateComboBox->setEnabled(false);
@@ -633,5 +634,11 @@
     _serialDataBitsComboBox->setEnabled(false);
     _serialStopBitsComboBox->setEnabled(false);
-    _serialAutoNMEACheckBox->setEnabled(false);
+    _serialAutoNMEAComboBox->setEnabled(false);
+    _serialHeightNMEALineEdit->setEnabled(false);
+  } else {
+    if (_serialAutoNMEAComboBox->currentText() == "Auto" ) {
+      _serialHeightNMEALineEdit->setStyleSheet("background-color: lightGray");
+      _serialHeightNMEALineEdit->setEnabled(false);
+    } 
   }
 
@@ -886,5 +893,4 @@
   settings.setValue("ephV3",       _ephV3CheckBox->checkState());
   settings.setValue("logFile",     _logFileLineEdit->text());
-  settings.setValue("makePause",   _makePauseCheckBox->checkState());
   settings.setValue("miscMount",   _miscMountLineEdit->text());
   settings.setValue("mountPoints", mountPoints);
@@ -906,5 +912,6 @@
   settings.setValue("rnxV3",       _rnxV3CheckBox->checkState());
   settings.setValue("scanRTCM",    _scanRTCMCheckBox->checkState());
-  settings.setValue("serialAutoNMEA",  _serialAutoNMEACheckBox->checkState());
+  settings.setValue("serialHeightNMEA",_serialHeightNMEALineEdit->text());
+  settings.setValue("serialAutoNMEA",  _serialAutoNMEAComboBox->currentText());
   settings.setValue("serialBaudRate",  _serialBaudRateComboBox->currentText());
   settings.setValue("serialDataBits",  _serialDataBitsComboBox->currentText());
@@ -1313,6 +1320,5 @@
       _serialDataBitsComboBox->setStyleSheet("background-color: white");
       _serialStopBitsComboBox->setStyleSheet("background-color: white");
-      palette.setColor(_serialAutoNMEACheckBox->backgroundRole(), white);
-      _serialAutoNMEACheckBox->setPalette(palette);
+      _serialAutoNMEAComboBox->setStyleSheet("background-color: white");
       _serialPortNameLineEdit->setEnabled(true);
       _serialBaudRateComboBox->setEnabled(true);
@@ -1320,5 +1326,12 @@
       _serialDataBitsComboBox->setEnabled(true);
       _serialStopBitsComboBox->setEnabled(true);
-      _serialAutoNMEACheckBox->setEnabled(true);
+      _serialAutoNMEAComboBox->setEnabled(true);
+      if (_serialAutoNMEAComboBox->currentText() != "Auto" ) {
+        _serialHeightNMEALineEdit->setStyleSheet("background-color: white");
+        _serialHeightNMEALineEdit->setEnabled(true);
+      } else {
+        _serialHeightNMEALineEdit->setStyleSheet("background-color: lightGray");
+        _serialHeightNMEALineEdit->setEnabled(false);
+      }
     } else {
       _serialPortNameLineEdit->setStyleSheet("background-color: lightGray");
@@ -1327,6 +1340,6 @@
       _serialDataBitsComboBox->setStyleSheet("background-color: lightGray");
       _serialStopBitsComboBox->setStyleSheet("background-color: lightGray");
-      palette.setColor(_serialAutoNMEACheckBox->backgroundRole(), lightGray);
-      _serialAutoNMEACheckBox->setPalette(palette);
+      _serialAutoNMEAComboBox->setStyleSheet("background-color: lightGray");
+      _serialHeightNMEALineEdit->setStyleSheet("background-color: lightGray");
       _serialPortNameLineEdit->setEnabled(false);
       _serialBaudRateComboBox->setEnabled(false);
@@ -1334,5 +1347,6 @@
       _serialDataBitsComboBox->setEnabled(false);
       _serialStopBitsComboBox->setEnabled(false);
-      _serialAutoNMEACheckBox->setEnabled(false);
+      _serialAutoNMEAComboBox->setEnabled(false);
+      _serialHeightNMEALineEdit->setEnabled(false);
     }
   }
@@ -1345,9 +1359,6 @@
       _adviseFailSpinBox->setStyleSheet("background-color: white");
       _adviseRecoSpinBox->setStyleSheet("background-color: white");
-      palette.setColor(_makePauseCheckBox->backgroundRole(), white);
-      _makePauseCheckBox->setPalette(palette);
       _adviseFailSpinBox->setEnabled(true);
       _adviseRecoSpinBox->setEnabled(true);
-      _makePauseCheckBox->setEnabled(true);
       _adviseScriptLineEdit->setEnabled(true);
     } else {
@@ -1355,9 +1366,6 @@
       _adviseFailSpinBox->setStyleSheet("background-color: lightGray");
       _adviseRecoSpinBox->setStyleSheet("background-color: lightGray");
-      palette.setColor(_makePauseCheckBox->backgroundRole(), lightGray);
-      _makePauseCheckBox->setPalette(palette);
       _adviseFailSpinBox->setEnabled(false);
       _adviseRecoSpinBox->setEnabled(false);
-      _makePauseCheckBox->setEnabled(false);
       _adviseScriptLineEdit->setEnabled(false);
     }
Index: trunk/BNC/bncwindow.h
===================================================================
--- trunk/BNC/bncwindow.h	(revision 1594)
+++ trunk/BNC/bncwindow.h	(revision 1595)
@@ -123,5 +123,4 @@
     QCheckBox* _autoStartCheckBox;
     QCheckBox* _scanRTCMCheckBox;
-    QCheckBox* _makePauseCheckBox;
     QSpinBox*  _waitTimeSpinBox;
     QSpinBox*  _corrTimeSpinBox;
@@ -139,5 +138,6 @@
     QComboBox* _serialDataBitsComboBox;
     QComboBox* _serialStopBitsComboBox;
-    QCheckBox* _serialAutoNMEACheckBox;
+    QLineEdit* _serialHeightNMEALineEdit;
+    QComboBox* _serialAutoNMEAComboBox;
 
     QLineEdit*   _LatLineEdit;
