Index: trunk/BNC/src/RTCM3/RTCM3Decoder.cpp
===================================================================
--- trunk/BNC/src/RTCM3/RTCM3Decoder.cpp	(revision 6150)
+++ trunk/BNC/src/RTCM3/RTCM3Decoder.cpp	(revision 6151)
@@ -146,8 +146,4 @@
     parser.GPSTOW = int(secGPS);
   }
-
-  // Get Glonass Slot Numbers from Global Array
-  // ------------------------------------------
-  BNC_CORE->getGlonassSlotNums(parser.GLOFreq);
 
   // Remaining part decodes the Observations
@@ -406,5 +402,4 @@
 
   if (decoded) {
-    BNC_CORE->storeGlonassSlotNums(parser.GLOFreq);
     return success;
   }
Index: trunk/BNC/src/bnccore.cpp
===================================================================
--- trunk/BNC/src/bnccore.cpp	(revision 6150)
+++ trunk/BNC/src/bnccore.cpp	(revision 6151)
@@ -116,15 +116,8 @@
 #endif
   expandEnvVar(_userName);
-  _userName = _userName.leftJustified(20, ' ', true);
-
-  _corrs = new QMultiMap<bncTime, t_clkCorr>;
-
+
+  _userName       = _userName.leftJustified(20, ' ', true);
   _dateAndTimeGPS = 0;
-
-  for (int ii = 0; ii < PRN_GLONASS_NUM; ++ii) {
-    _GLOFreq[ii] = 0;
-  }
-
-  _mainWindow = 0;
+  _mainWindow     = 0;
 
   _pppMain = new BNC_PPP::t_pppMain();
@@ -158,8 +151,5 @@
   }
 
-  delete _corrs;
-
   delete _dateAndTimeGPS;
-
   delete _rawFile;
 
@@ -640,5 +630,26 @@
 ////////////////////////////////////////////////////////////////////////////
 void t_bncCore::slotNewOrbCorrections(QList<t_orbCorr> orbCorrections) {
+  QMutexLocker locker(&_mutex);
   emit newOrbCorrections(orbCorrections);
+  if (_socketsCorr) {
+    QListIterator<t_orbCorr> it(orbCorrections);
+    while (it.hasNext()) {
+      const t_orbCorr& corr = it.next();
+      QMutableListIterator<QTcpSocket*> is(*_socketsCorr);
+      while (is.hasNext()) {
+        QTcpSocket* sock = is.next();
+        if (sock->state() == QAbstractSocket::ConnectedState) {
+          if (sock->write(corr.toString().c_str()) == -1) {
+            delete sock;
+            is.remove();
+          }
+        }
+        else if (sock->state() != QAbstractSocket::ConnectingState) {
+          delete sock;
+          is.remove();
+        }
+      }
+    }
+  }
 }
 
@@ -647,93 +658,7 @@
 void t_bncCore::slotNewClkCorrections(QList<t_clkCorr> clkCorrections) {
   QMutexLocker locker(&_mutex);
-
-  if (clkCorrections.size() == 0) {
-    return;
-  }
-  bncTime coTime = clkCorrections[0]._time;
-  QString staID(clkCorrections[0]._staID.c_str());
-
-  // Combination of Corrections
-  // --------------------------
-#ifdef USE_COMBINATION
-  if (_bncComb) {
-    _bncComb->processClkCorrections(clkCorrections);
-  }
-#endif
-
-  bncSettings settings;
-  _waitCoTime = settings.value("corrTime").toDouble();
-  if (_waitCoTime < 0.0) {
-    _waitCoTime = 0.0;
-  }
-
-  // First time, set the _lastCorrDumpTime
-  // -------------------------------------
-  if (!_lastCorrDumpTime[staID].valid()) {
-    _lastCorrDumpTime[staID] = coTime - 1.0;
-  }
-
-  // An old correction - throw it away
-  // ---------------------------------
-  if (_waitCoTime > 0.0 && coTime <= _lastCorrDumpTime[staID]) {
-    if (!_bncComb) {
-      QString line = staID + ": Correction for one sat neglected because overaged by " +
-                      QString().sprintf(" %f sec",
-                      _lastCorrDumpTime[staID] - coTime + _waitCoTime);
-      messagePrivate(line.toAscii());
-      emit( newMessage(line.toAscii(), true) );
-    }
-    return;
-  }
-
-  for (int ii = 0; ii < clkCorrections.size(); ii++) {
-    _corrs->insert(coTime, clkCorrections[ii]);
-  }
-
-  // Dump Corrections
-  // ----------------
-  if      (_waitCoTime == 0.0) {
-    dumpCorrs();
-  }
-  else if (coTime - _waitCoTime > _lastCorrDumpTime[staID]) {
-    dumpCorrs(_lastCorrDumpTime[staID] + 1, coTime - _waitCoTime);
-    _lastCorrDumpTime[staID] = coTime - _waitCoTime;
-  }
-}
-
-// Dump Complete Correction Epochs
-////////////////////////////////////////////////////////////////////////////
-void t_bncCore::dumpCorrs(bncTime minTime, bncTime maxTime) {
-  QList<t_clkCorr> allCorrs;
-  QMutableMapIterator<bncTime, t_clkCorr> it(*_corrs);
-  while (it.hasNext()) {
-    it.next();
-    const bncTime& corrTime = it.key();
-    if (minTime <= corrTime && corrTime <= maxTime) {
-      allCorrs << it.value();
-      it.remove();
-    }
-  }
-  dumpCorrs(allCorrs);
-}
-
-// Dump all corrections
-////////////////////////////////////////////////////////////////////////////
-void t_bncCore::dumpCorrs() {
-  QList<t_clkCorr> allCorrs;
-  QMutableMapIterator<bncTime, t_clkCorr> it(*_corrs);
-  while (it.hasNext()) {
-    allCorrs << it.next().value();
-    it.remove();
-  }
-  dumpCorrs(allCorrs);
-}
-
-// Dump List of Corrections 
-////////////////////////////////////////////////////////////////////////////
-void t_bncCore::dumpCorrs(const QList<t_clkCorr>& allCorrs) {
-  emit newClkCorrections(allCorrs);
+  emit newClkCorrections(clkCorrections);
   if (_socketsCorr) {
-    QListIterator<t_clkCorr> it(allCorrs);
+    QListIterator<t_clkCorr> it(clkCorrections);
     while (it.hasNext()) {
       const t_clkCorr& corr = it.next();
@@ -790,30 +715,4 @@
 }
 
-// Get Glonass Slot Numbers from Global Array
-////////////////////////////////////////////////////////////////////////////
-void t_bncCore::getGlonassSlotNums(int GLOFreq[]) {
-
-  QMutexLocker locker(&_mutex);
-
-  for (int ii = 0; ii < PRN_GLONASS_NUM; ++ii) {
-    if (_GLOFreq[ii] != 0) {
-      GLOFreq[ii] = _GLOFreq[ii];
-    }
-  }
-}
-
-// Store Glonass Slot Numbers to Global Array
-////////////////////////////////////////////////////////////////////////////
-void t_bncCore::storeGlonassSlotNums(const int GLOFreq[]) {
-
-  QMutexLocker locker(&_mutex);
-
-  for (int ii = 0; ii < PRN_GLONASS_NUM; ++ii) {
-    if (GLOFreq[ii] != 0) {
-      _GLOFreq[ii] = GLOFreq[ii];
-    }
-  }
-}
-
 // 
 ////////////////////////////////////////////////////////////////////////////
Index: trunk/BNC/src/bnccore.h
===================================================================
--- trunk/BNC/src/bnccore.h	(revision 6150)
+++ trunk/BNC/src/bnccore.h	(revision 6151)
@@ -46,31 +46,29 @@
   enum e_mode {interactive, nonInteractive, batchPostProcessing};
   t_bncCore();
-  virtual ~t_bncCore();  
+  ~t_bncCore();  
   static t_bncCore* instance();
-  e_mode mode() const {return _mode;}
-  void setGUIenabled(bool GUIenabled) {_GUIenabled = GUIenabled;}
-  void setMode(e_mode mode) {_mode = mode;}
-  void setPort(int port);
-  void setPortCorr(int port);
-  void setCaster(bncCaster* caster) {_caster = caster;}
-  const bncCaster* caster() const {return _caster;}
-  bool      dateAndTimeGPSSet() const;
-  QDateTime dateAndTimeGPS() const;
-  void      setDateAndTimeGPS(QDateTime dateTime);
-  void setConfFileName(const QString& confFileName);
-  QString confFileName() const {return _confFileName;}
-  void writeRawData(const QByteArray& data, const QByteArray& staID,
-                    const QByteArray& format);
-  void storeGlonassSlotNums(const int GLOFreq[]);
-  void getGlonassSlotNums(int GLOFreq[]);
-  void initCombination();
-  void stopCombination();
-  const QString& pgmName() {return _pgmName;}
-  const QString& userName() {return _userName;}
-  QWidget* mainWindow() const {return _mainWindow;};
-  void setMainWindow(QWidget* mainWindow){_mainWindow = mainWindow;}
-  bool GUIenabled() const {return _GUIenabled;}
-  void startPPP();
-  void stopPPP();
+  e_mode            mode() const {return _mode;}
+  void              setGUIenabled(bool GUIenabled) {_GUIenabled = GUIenabled;}
+  void              setMode(e_mode mode) {_mode = mode;}
+  void              setPort(int port);
+  void              setPortCorr(int port);
+  void              setCaster(bncCaster* caster) {_caster = caster;}
+  const bncCaster*  caster() const {return _caster;}
+  bool              dateAndTimeGPSSet() const;
+  QDateTime         dateAndTimeGPS() const;
+  void              setDateAndTimeGPS(QDateTime dateTime);
+  void              setConfFileName(const QString& confFileName);
+  QString           confFileName() const {return _confFileName;}
+  void              writeRawData(const QByteArray& data, const QByteArray& staID, 
+                                const QByteArray& format);
+  void             initCombination();
+  void             stopCombination();
+  const QString&   pgmName() {return _pgmName;}
+  const QString&   userName() {return _userName;}
+  QWidget*         mainWindow() const {return _mainWindow;};
+  void             setMainWindow(QWidget* mainWindow){_mainWindow = mainWindow;}
+  bool             GUIenabled() const {return _GUIenabled;}
+  void             startPPP();
+  void             stopPPP();
 
   QMap<int, bncTableItem*> _uploadTableItems;
@@ -111,54 +109,47 @@
   void printOutput(bool printFile, QTextStream* stream, 
                    const QString& strV2, const QString& strV3);
-  void dumpCorrs(bncTime minTime, bncTime maxTime);
-  void dumpCorrs();
-  void dumpCorrs(const QList<t_clkCorr>& allCorrs);
   void messagePrivate(const QByteArray& msg);
   void checkEphemeris(gpsephemeris* oldEph, gpsephemeris* newEph);
 
-  QSettings::SettingsMap   _settings;
-  QFile*            _logFile;
-  QTextStream*      _logStream;
-  int               _logFileFlag;
-  QMutex            _mutex;
-  QMutex            _mutexMessage;
-  QString           _ephPath;
-  QString           _ephFileNameGPS;
-  int               _rinexVers;
-  QFile*            _ephFileGPS;
-  QTextStream*      _ephStreamGPS;
-  QFile*            _ephFileGlonass;
-  QTextStream*      _ephStreamGlonass;
-  QFile*            _ephFileGalileo;
-  QTextStream*      _ephStreamGalileo;
-  gpsephemeris*     _gpsEph[PRN_GPS_END - PRN_GPS_START + 1];
-  glonassephemeris* _glonassEph[PRN_GLONASS_END - PRN_GLONASS_START + 1];
-  galileoephemeris* _galileoEph[PRN_GALILEO_END - PRN_GALILEO_START + 1];
-  QString           _userName;
-  QString           _pgmName;
-  int                 _port;
-  QTcpServer*         _server;
-  QList<QTcpSocket*>* _sockets;
-  int                 _portCorr;
-  QTcpServer*         _serverCorr;
-  QList<QTcpSocket*>* _socketsCorr;
-  int                 _portNMEA;
-  QTcpServer*         _serverNMEA;
-  QList<QTcpSocket*>* _socketsNMEA;
-  bncCaster*          _caster;
-  QMap<QString, bncTime> _lastCorrDumpTime;
-  double              _waitCoTime;
-  QMultiMap<bncTime, t_clkCorr>* _corrs;
-  QString             _confFileName;
-  QDate               _fileDate;
-  bncRawFile*         _rawFile;
-  int                 _GLOFreq[PRN_GLONASS_NUM];
-  bncComb*            _bncComb;
-  e_mode              _mode;
-  QWidget*            _mainWindow;
-  bool                _GUIenabled;
-  QDateTime*          _dateAndTimeGPS;
-  mutable QMutex      _mutexDateAndTimeGPS;
-  BNC_PPP::t_pppMain* _pppMain;
+  QSettings::SettingsMap _settings;
+  QFile*                 _logFile;
+  QTextStream*           _logStream;
+  int                    _logFileFlag;
+  QMutex                 _mutex;
+  QMutex                 _mutexMessage;
+  QString                _ephPath;
+  QString                _ephFileNameGPS;
+  int                    _rinexVers;
+  QFile*                 _ephFileGPS;
+  QTextStream*           _ephStreamGPS;
+  QFile*                 _ephFileGlonass;
+  QTextStream*           _ephStreamGlonass;
+  QFile*                 _ephFileGalileo;
+  QTextStream*           _ephStreamGalileo;
+  gpsephemeris*          _gpsEph[PRN_GPS_END - PRN_GPS_START + 1];
+  glonassephemeris*      _glonassEph[PRN_GLONASS_END - PRN_GLONASS_START + 1];
+  galileoephemeris*      _galileoEph[PRN_GALILEO_END - PRN_GALILEO_START + 1];
+  QString                _userName;
+  QString                _pgmName;
+  int                    _port;
+  QTcpServer*            _server;
+  QList<QTcpSocket*>*    _sockets;
+  int                    _portCorr;
+  QTcpServer*            _serverCorr;
+  QList<QTcpSocket*>*    _socketsCorr;
+  int                    _portNMEA;
+  QTcpServer*            _serverNMEA;
+  QList<QTcpSocket*>*    _socketsNMEA;
+  bncCaster*             _caster;
+  QString                _confFileName;
+  QDate                  _fileDate;
+  bncRawFile*            _rawFile;
+  bncComb*               _bncComb;
+  e_mode                 _mode;
+  QWidget*               _mainWindow;
+  bool                   _GUIenabled;
+  QDateTime*             _dateAndTimeGPS;
+  mutable QMutex         _mutexDateAndTimeGPS;
+  BNC_PPP::t_pppMain*    _pppMain;
 };
 
Index: trunk/BNC/src/bncsettings.cpp
===================================================================
--- trunk/BNC/src/bncsettings.cpp	(revision 6150)
+++ trunk/BNC/src/bncsettings.cpp	(revision 6151)
@@ -100,5 +100,4 @@
     setValue_p("corrIntr",            "1 day");
     setValue_p("corrPort",            "");
-    setValue_p("corrTime",            "5");
     // Feed Engine
     setValue_p("outPort",             "");
Index: trunk/BNC/src/bncwindow.cpp
===================================================================
--- trunk/BNC/src/bncwindow.cpp	(revision 6150)
+++ trunk/BNC/src/bncwindow.cpp	(revision 6151)
@@ -247,10 +247,4 @@
   }
   _corrPortLineEdit    = new QLineEdit(settings.value("corrPort").toString());
-  _corrTimeSpinBox   = new QSpinBox();
-  _corrTimeSpinBox->setMinimum(0);
-  _corrTimeSpinBox->setMaximum(60);
-  _corrTimeSpinBox->setSingleStep(1);
-  _corrTimeSpinBox->setSuffix(" sec");
-  _corrTimeSpinBox->setValue(settings.value("corrTime").toInt());
 
   connect(_corrPathLineEdit, SIGNAL(textChanged(const QString &)),
@@ -692,5 +686,4 @@
   _corrIntrComboBox->setMaximumWidth(9*ww);
   _corrPortLineEdit->setMaximumWidth(9*ww);
-  _corrTimeSpinBox->setMaximumWidth(9*ww);
 
   cLayout->addWidget(new QLabel("Saving Broadcast Ephemeris correction files and correction output through IP port."),0,0,1,50);
@@ -701,6 +694,4 @@
   cLayout->addWidget(new QLabel("Port"),                          3, 0);
   cLayout->addWidget(_corrPortLineEdit,                           3, 1);
-  cLayout->addWidget(new QLabel("  Wait for full corr epoch"),    3, 2, Qt::AlignRight);
-  cLayout->addWidget(_corrTimeSpinBox,                            3, 3, Qt::AlignLeft);
   cLayout->addWidget(new QLabel(" "),                             4, 0);
   cLayout->addWidget(new QLabel(" "),                             5, 0);
@@ -1155,5 +1146,4 @@
   _outEphPortLineEdit->setWhatsThis(tr("BNC can produce ephemeris data in RINEX ASCII format on your local host through an IP port. Specify a port number here to activate this function."));
   _corrPortLineEdit->setWhatsThis(tr("BNC can produce Broadcast Ephemeris Corrections on your local host through an IP port. Specify a port number here to activate this function."));
-  _corrTimeSpinBox->setWhatsThis(tr("<p>Concerning output through IP port, BNC drops Broadcast Ephemeris Corrections received later than 'Wait for full corr epoch' seconds. A value of 2 to 5 seconds is recommended, depending on the latency of the incoming correction stream(s) and the delay acceptable to your real-time application.</p><p>Specifying a value of '0' means that BNC immediately outputs all incoming Broadcast Epemeris Corrections and does not drop any of them for latency reasons.</p>"));
   _rnxPathLineEdit->setWhatsThis(tr("Here you specify the path to where the RINEX Observation files will be stored. If the specified directory does not exist, BNC will not create RINEX Observation files.")); 
   _ephPathLineEdit->setWhatsThis(tr("Specify the path for saving Broadcast Ephemeris data as RINEX Navigation files. If the specified directory does not exist, BNC will not create RINEX Navigation files."));
@@ -1588,5 +1578,4 @@
   settings.setValue("corrIntr",    _corrIntrComboBox->currentText());
   settings.setValue("corrPort",    _corrPortLineEdit->text());
-  settings.setValue("corrTime",    _corrTimeSpinBox->value());
 // Feed Engine
   settings.setValue("outPort",     _outPortLineEdit->text());
Index: trunk/BNC/src/bncwindow.h
===================================================================
--- trunk/BNC/src/bncwindow.h	(revision 6150)
+++ trunk/BNC/src/bncwindow.h	(revision 6151)
@@ -165,5 +165,4 @@
     QCheckBox* _scanRTCMCheckBox;
     QSpinBox*  _waitTimeSpinBox;
-    QSpinBox*  _corrTimeSpinBox;
     QComboBox* _obsRateComboBox;
     QSpinBox*  _adviseFailSpinBox;
