Index: trunk/BNC/src/bnccore.cpp
===================================================================
--- trunk/BNC/src/bnccore.cpp	(revision 8352)
+++ trunk/BNC/src/bnccore.cpp	(revision 8354)
@@ -305,27 +305,21 @@
     QString ephFileNameGPS = _ephPath + "BRDC";
 
-    bool ephV3filenames = settings.value("ephV3filenames").toBool();
+    bool ephV3 = (_rinexVers == 3)? true : false;
 
     QString hlpStr = bncRinex::nextEpochStr(datTim,
-                         settings.value("ephIntr").toString(), ephV3filenames);
+                         settings.value("ephIntr").toString(), ephV3);
 
     if (_rinexVers == 3) {
-      if (ephV3filenames) {
-        QString country = "WRD"; // WORLD
-        QString monNum = "0";
-        QString recNum = "0";
-        ephFileNameGPS += QString("%1").arg(monNum, 1, 10) +
-                          QString("%1").arg(recNum, 1, 10) +
-                          country +
-                          "_S_" +     // stream
-                          QString("%1").arg(datTim.date().year()) +
-                          QString("%1").arg(datTim.date().dayOfYear(), 3, 10, QChar('0')) +
-                          hlpStr +   // HM_period
-                          "_MN.rnx"; // mixed BRDC
-      }
-      else { // RNX v3 with old filenames
-        ephFileNameGPS +=  QString("%1").arg(datTim.date().dayOfYear(), 3, 10, QChar('0')) +
-                           hlpStr + datTim.toString(".yyP");
-      }
+      QString country = "WRD"; // WORLD
+      QString monNum = "0";
+      QString recNum = "0";
+      ephFileNameGPS += QString("%1").arg(monNum, 1, 10) +
+                        QString("%1").arg(recNum, 1, 10) +
+                        country +
+                        "_S_" +     // stream
+                        QString("%1").arg(datTim.date().year()) +
+                        QString("%1").arg(datTim.date().dayOfYear(), 3, 10, QChar('0')) +
+                        hlpStr +   // HM_period
+                        "_MN.rnx"; // mixed BRDC
     }
     else { // RNX v2.11
Index: trunk/BNC/src/bncmain.cpp
===================================================================
--- trunk/BNC/src/bncmain.cpp	(revision 8352)
+++ trunk/BNC/src/bncmain.cpp	(revision 8354)
@@ -39,10 +39,9 @@
  * -----------------------------------------------------------------------*/
 
-#include <iostream>
 #include <unistd.h>
 #include <signal.h>
-
 #include <QApplication>
 #include <QFile>
+#include <iostream>
 
 #include "app.h"
@@ -109,5 +108,4 @@
       "   rnxV2Priority  {Priority of signal attributes [character string, list separated by blank character, example: G:12&PWCSLXYN G:5&IQX C:IQX]}\n"
       "   rnxV3          {Produce version 3 file contents [integer number: 0=no,2=yes]}\n"
-      "   rnxV3filenames {Produce version 3 filenames [integer number: 0=no,2=yes]}\n"
       "\n"
       "RINEX Ephemeris Panel keys:\n"
@@ -116,5 +114,4 @@
       "   ephOutPort     {Output port [integer number]}\n"
       "   ephV3          {Produce version 3 file contents [integer number: 0=no,2=yes]}\n"
-      "   ephV3filenames {Produce version 3 filenames [integer number: 0=no,2=yes]}\n"
       "\n"
       "RINEX Editing and QC Panel keys:\n"
Index: trunk/BNC/src/bncrinex.cpp
===================================================================
--- trunk/BNC/src/bncrinex.cpp	(revision 8352)
+++ trunk/BNC/src/bncrinex.cpp	(revision 8354)
@@ -94,5 +94,5 @@
   _writeRinexFileOnlyWithSkl = settings.value("rnxOnlyWithSKL").toBool();
 
-  _rnxV3filenames = settings.value("rnxV3filenames").toBool();
+  _rnxV3 = (Qt::CheckState(settings.value("rnxV3").toInt()) == Qt::Checked) ? true : false;
 }
 
@@ -209,5 +209,5 @@
 ////////////////////////////////////////////////////////////////////////////
 QString bncRinex::nextEpochStr(const QDateTime& datTim,
-                               const QString& intStr, bool rnxV3filenames,
+                               const QString& intStr, bool rnxV3,
                                QDateTime* nextEpoch) {
 
@@ -221,5 +221,5 @@
   if ( indHlp != -1) {
     int step = intStr.left(indHlp-1).toInt();
-    if (rnxV3filenames) {
+    if (rnxV3) {
       epoStr +=  QString("%1").arg(datTim.time().hour(), 2, 10, QChar('0')); // H
     } else {
@@ -248,5 +248,5 @@
       }
     }
-    if (rnxV3filenames) {
+    if (rnxV3) {
       epoStr += QString("_%1M").arg(step, 2, 10, QChar('0'));                // period
     }
@@ -254,5 +254,5 @@
   else if (intStr == "1 hour") {
     int step = intStr.left(indHlp-1).toInt();
-    if (rnxV3filenames) {
+    if (rnxV3) {
       epoStr += QString("%1").arg(datTim.time().hour(), 2, 10, QChar('0'));  // H
       epoStr += QString("%1").arg(0, 2, 10, QChar('0'));                     // M
@@ -272,5 +272,5 @@
   else {
     int step = intStr.left(indHlp-1).toInt();
-    if (rnxV3filenames) {
+    if (rnxV3) {
       epoStr += QString("%1").arg(0, 2, 10, QChar('0'));                    // H
       epoStr += QString("%1").arg(0, 2, 10, QChar('0'));                    // M
@@ -303,5 +303,5 @@
 
   QString hlpStr = nextEpochStr(datTim, settings.value("rnxIntr").toString(),
-                                _rnxV3filenames, &_nextCloseEpoch);
+                                _rnxV3, &_nextCloseEpoch);
 
   int statIDlength = _statID.size() -1;
@@ -335,5 +335,5 @@
   }
 
-  if (_rnxV3filenames) {
+  if (_rnxV3) {
     QString country;
     QString monNum = "0";
@@ -362,5 +362,5 @@
             "_MO" + // mixed OBS
             distStr +
-            ".rnx"; 
+            ".rnx";
   }
   else {
Index: trunk/BNC/src/bncrinex.h
===================================================================
--- trunk/BNC/src/bncrinex.h	(revision 8352)
+++ trunk/BNC/src/bncrinex.h	(revision 8354)
@@ -35,7 +35,7 @@
 class bncRinex {
  public:
-   bncRinex(const QByteArray& statID, const QUrl& mountPoint, 
+   bncRinex(const QByteArray& statID, const QUrl& mountPoint,
             const QByteArray& latitude, const QByteArray& longitude,
-            const QByteArray& nmea, const QByteArray& ntripVersion); 
+            const QByteArray& nmea, const QByteArray& ntripVersion);
    ~bncRinex();
 
@@ -46,6 +46,6 @@
 
    static QString nextEpochStr(const QDateTime& datTim,
-                               const QString& intStr, 
-                               bool rnxV3filenames,
+                               const QString& intStr,
+                               bool rnxV3,
                                QDateTime* nextEpoch = 0);
    static std::string asciiSatLine(const t_satObs& obs);
@@ -70,5 +70,5 @@
    QString         _sklName;
    bool            _writeRinexFileOnlyWithSkl;
-   bool            _rnxV3filenames;
+   bool            _rnxV3;
    QByteArray      _latitude;
    QByteArray      _longitude;
Index: trunk/BNC/src/bncsettings.cpp
===================================================================
--- trunk/BNC/src/bncsettings.cpp	(revision 8352)
+++ trunk/BNC/src/bncsettings.cpp	(revision 8354)
@@ -92,5 +92,4 @@
     setValue_p("rnxScript",           "");
     setValue_p("rnxV3",               "0");
-    setValue_p("rnxV3filenames",      "0");
     // RINEX Ephemeris
     setValue_p("ephPath",             "");
@@ -98,5 +97,4 @@
     setValue_p("ephOutPort",          "");
     setValue_p("ephV3",               "0");
-    setValue_p("ephV3filenames",      "0");
     // Reqc
     setValue_p("reqcAction",          "");
@@ -110,6 +108,6 @@
     setValue_p("reqcRnxVersion",      "");
     setValue_p("reqcSampling",        "");
-    setValue_p("reqcStartDateTime",   "");
-    setValue_p("reqcEndDateTime",     "");
+    setValue_p("reqcStartDateTime",   "1967-11-02T00:00:00");
+    setValue_p("reqcEndDateTime",     "2099-01-01T00:00:00");
     setValue_p("reqcLogSummaryOnly",  "");
     setValue_p("reqcRunBy",           "");
Index: trunk/BNC/src/bncwindow.cpp
===================================================================
--- trunk/BNC/src/bncwindow.cpp	(revision 8352)
+++ trunk/BNC/src/bncwindow.cpp	(revision 8354)
@@ -240,6 +240,4 @@
   _rnxV3CheckBox      = new QCheckBox();
   _rnxV3CheckBox->setCheckState(Qt::CheckState(settings.value("rnxV3").toInt()));
-  _rnxV3filenameCheckBox = new QCheckBox();
-  _rnxV3filenameCheckBox->setCheckState(Qt::CheckState(settings.value("rnxV3filenames").toInt()));
   QString hlp = settings.value("rnxV2Priority").toString();
   if (hlp.isEmpty()) {
@@ -266,7 +264,4 @@
   _ephV3CheckBox = new QCheckBox();
   _ephV3CheckBox->setCheckState(Qt::CheckState(settings.value("ephV3").toInt()));
-
-  _ephV3filenameCheckBox = new QCheckBox();
-  _ephV3filenameCheckBox->setCheckState(Qt::CheckState(settings.value("ephV3filenames").toInt()));
 
   connect(_ephOutPortLineEdit, SIGNAL(textChanged(const QString &)),
@@ -764,6 +759,4 @@
   oLayout->addWidget(new QLabel("Version 3"),                      6, 0);
   oLayout->addWidget(_rnxV3CheckBox,                               6, 1);
-  oLayout->addWidget(new QLabel("Version 3 filenames"),            6, 2);
-  oLayout->addWidget(_rnxV3filenameCheckBox,                       6, 3);
   oLayout->addWidget(new QLabel(""),                               7, 1);
   oLayout->setRowStretch(8, 999);
@@ -787,6 +780,4 @@
   eLayout->addWidget(new QLabel("Version 3"),                     4, 0);
   eLayout->addWidget(_ephV3CheckBox,                              4, 1);
-  eLayout->addWidget(new QLabel("Version 3 filenames"),           4, 2);
-  eLayout->addWidget(_ephV3filenameCheckBox,                      4, 3);
   eLayout->setRowStretch(5, 999);
 
@@ -1310,5 +1301,4 @@
   _rnxV2Priority->setWhatsThis(tr("<p>Specify a priority list of characters defining signal attributes as defined in RINEX Version 3. Priorities will be used to map observations with RINEX Version 3 attributes from incoming streams to Version 2. The underscore character '_' stands for undefined attributes. A question mark '?' can be used as wildcard which represents any one character.</p><p>Signal priorities can be specified as equal for all systems, as system specific or as system and freq. specific. For example: </li><ul><li>'CWPX_?' (General signal priorities valid for all GNSS) </li><li>'C:IQX I:ABCX' (System specific signal priorities for BDS and IRNSS) </li><li>'G:12&PWCSLXYN G:5&IQX R:12&PC R:3&IQX' (System and frequency specific signal priorities) </li></ul>Default is the following priority list 'G:12&PWCSLXYN_ G:5&IQX_ R:12&PC_ R:3&IQX_ E:16&BCX_ E:578&IQX_ J:1&SLXCZ_ J:26&SLX_ J:5&IQX_ C:IQX_ I:ABCX_ S:1&C_ S:5&IQX_'. <i>[key: rnxV2Priority]</i></p>"));
   _rnxV3CheckBox->setWhatsThis(tr("<p>The default format for RINEX Observation files is RINEX Version 2.</p><p>Select 'Version 3' if you want to save observations in RINEX Version 3 format. <i>[key: rnxV3]</i></p>"));
-  _rnxV3filenameCheckBox->setWhatsThis(tr("<p>Tick 'Version 3 filenames' to let BNC create so-called extended filenames following the RINEX Version 3 standard.</p><p>Default is an empty check box, meaning to create filenames following the RINEX Version 2 standard although the file content is saved in RINEX Version 3 format. <i>[key: rnxV3filenames]</i></p>"));
 
   // WhatsThis, RINEX Ephemeris
@@ -1318,5 +1308,4 @@
   _ephOutPortLineEdit->setWhatsThis(tr("<p>BNC can produce ephemeris data in RINEX Navigation ASCII format on your local host through an IP port.</p><p>Specify a port number here to activate this function. <i>[key: ephOutPort]</i></p>"));
   _ephV3CheckBox->setWhatsThis(tr("<p>The default format for output of RINEX Navigation data containing Broadcast Ephemeris is RINEX Version 2.</p><p>Select 'Version 3' if you want to output ephemeris in RINEX Version 3 format. <i>[key: ephV3]</i></p>"));
-  _ephV3filenameCheckBox->setWhatsThis(tr("<p>Tick 'Version 3 filenames' to let BNC create so-called extended filenames following the RINEX Version 3 standard.</p><p>Default is an empty check box, meaning to create filenames following the RINEX Version 2 standard although the file content is saved in RINEX Version 3 format. <i>[key: ephV3filenames]</i></p>"));
 
   // WhatsThis, RINEX Editing & QC
@@ -1512,5 +1501,4 @@
   delete _rnxScrpLineEdit;
   delete _rnxV3CheckBox;
-  delete _rnxV3filenameCheckBox;
   delete _rnxV2Priority;
   delete _ephPathLineEdit;
@@ -1518,5 +1506,4 @@
   delete _ephOutPortLineEdit;
   delete _ephV3CheckBox;
-  delete _ephV3filenameCheckBox;
   delete _corrPathLineEdit;
   delete _corrIntrComboBox;
@@ -1962,9 +1949,5 @@
   settings.setValue("rnxSkel",     _rnxSkelLineEdit->text());
   settings.setValue("rnxOnlyWithSKL",_rnxFileCheckBox->checkState());
-  settings.setValue("rnxV3filenames",_rnxV3filenameCheckBox->checkState());
   settings.setValue("rnxScript",   _rnxScrpLineEdit->text());
-  (_rnxV3filenameCheckBox->checkState()) ?
-    settings.setValue("rnxV3",       _rnxV3filenameCheckBox->checkState()) :
-    settings.setValue("rnxV3",       _rnxV3CheckBox->checkState());
   settings.setValue("rnxV2Priority",_rnxV2Priority->text());
 // RINEX Ephemeris
@@ -1972,8 +1955,4 @@
   settings.setValue("ephIntr",       _ephIntrComboBox->currentText());
   settings.setValue("ephOutPort",    _ephOutPortLineEdit->text());
-  settings.setValue("ephV3filenames", _ephV3filenameCheckBox->checkState());
-  (_ephV3filenameCheckBox->checkState()) ?
-    settings.setValue("ephV3",       _ephV3filenameCheckBox->checkState()) :
-    settings.setValue("ephV3",       _ephV3CheckBox->checkState());
 // Broadcast Corrections
   settings.setValue("corrPath",    _corrPathLineEdit->text());
@@ -2485,5 +2464,4 @@
     enableWidget(enable, _ephIntrComboBox);
     enableWidget(enable, _ephV3CheckBox);
-    enableWidget(enable, _ephV3filenameCheckBox);
   }
 
Index: trunk/BNC/src/bncwindow.h
===================================================================
--- trunk/BNC/src/bncwindow.h	(revision 8352)
+++ trunk/BNC/src/bncwindow.h	(revision 8354)
@@ -164,8 +164,6 @@
     QLineEdit* _rnxV2Priority;
     QCheckBox* _ephV3CheckBox;
-    QCheckBox* _ephV3filenameCheckBox;
     QLineEdit* _rnxSkelLineEdit;
     QCheckBox* _rnxFileCheckBox;
-    QCheckBox* _rnxV3filenameCheckBox;
     QLineEdit* _rnxScrpLineEdit;
     QLineEdit* _logFileLineEdit;
Index: trunk/BNC/src/rinex/reqcedit.cpp
===================================================================
--- trunk/BNC/src/rinex/reqcedit.cpp	(revision 8352)
+++ trunk/BNC/src/rinex/reqcedit.cpp	(revision 8354)
@@ -561,11 +561,33 @@
   bool haveGPS     = false;
   bool haveGlonass = false;
+  QMap<t_eph::e_type, bool> haveGnss;
   for (int ii = 0; ii < _ephs.size(); ii++) {
     const t_eph* eph = _ephs[ii];
-    if      (eph->type() == t_eph::GPS) {
-      haveGPS = true;
-    }
-    else if (eph->type() == t_eph::GLONASS) {
-      haveGlonass = true;
+    switch (eph->type()) {
+      case t_eph::GPS:
+        haveGPS = true;
+        haveGnss[t_eph::GLONASS] = true;
+        break;
+      case t_eph::GLONASS:
+        haveGlonass = true;
+        haveGnss[t_eph::GPS] = true;
+        break;
+      case t_eph::Galileo:
+        haveGnss[t_eph::Galileo] = true;
+        break;
+      case t_eph::BDS:
+        haveGnss[t_eph::BDS] = true;
+        break;
+      case t_eph::QZSS:
+        haveGnss[t_eph::QZSS] = true;
+        break;
+      case t_eph::IRNSS:
+        haveGnss[t_eph::IRNSS] = true;
+        break;
+      case t_eph::SBAS:
+        haveGnss[t_eph::SBAS] = true;
+        break;
+      default:
+        haveGnss[t_eph::unknown] = true;
     }
   }
@@ -582,4 +604,13 @@
   else {
     outNavFile.setVersion(defaultRnxNavVersion2);
+  }
+
+  if (outNavFile.version() > 3.0) {
+    if (haveGnss.size() > 1) {
+      outNavFile.setGnssTypeV3(t_eph::unknown);
+    }
+    else if (haveGnss.size() == 1){
+      outNavFile.setGnssTypeV3(haveGnss.firstKey());
+    }
   }
 
Index: trunk/BNC/src/rinex/rnxnavfile.cpp
===================================================================
--- trunk/BNC/src/rinex/rnxnavfile.cpp	(revision 8352)
+++ trunk/BNC/src/rinex/rnxnavfile.cpp	(revision 8354)
@@ -294,5 +294,33 @@
   }
   else {
-    *_stream << QString("%1           N: GNSS NAV DATA    M: MIXED")
+    QString fmt;
+    t_eph::e_type sys = satSystem();
+    switch(sys) {
+      case t_eph::GPS:
+        fmt.append("%1           N: GNSS NAV DATA    G: GPS");
+        break;
+      case t_eph::GLONASS:
+        fmt.append("%1           N: GNSS NAV DATA    R: GLONASS");
+        break;
+      case t_eph::Galileo:
+        fmt.append("%1           N: GNSS NAV DATA    E: Galileo");
+        break;
+      case t_eph::QZSS:
+        fmt.append("%1           N: GNSS NAV DATA    J: QZSS");
+        break;
+      case t_eph::BDS:
+        fmt.append("%1           N: GNSS NAV DATA    C: BDS");
+        break;
+      case t_eph::IRNSS:
+        fmt.append("%1           N: GNSS NAV DATA    I: IRNSS");
+        break;
+      case t_eph::SBAS:
+        fmt.append("%1           N: GNSS NAV DATA    S: SBAS");
+        break;
+      case t_eph::unknown:
+        fmt.append("%1           N: GNSS NAV DATA    M: MIXED");
+        break;
+    }
+    *_stream << fmt
       .arg(_header._version, 9, 'f', 2)
       .leftJustified(60)
Index: trunk/BNC/src/rinex/rnxnavfile.h
===================================================================
--- trunk/BNC/src/rinex/rnxnavfile.h	(revision 8352)
+++ trunk/BNC/src/rinex/rnxnavfile.h	(revision 8354)
@@ -30,4 +30,5 @@
 #include "bncconst.h"
 #include "bnctime.h"
+#include "ephemeris.h"
 
 class t_pppOpt;
@@ -50,4 +51,5 @@
     double _version;
     bool   _glonass;
+    t_eph::e_type _satSys;
     QStringList _comments;
   };
@@ -62,5 +64,7 @@
   bool   glonass() const {return _header._glonass;}
   QStringList comments() const {return _header._comments;}
+  t_eph::e_type satSystem() const {return _header._satSys;}
   void   setGlonass(bool glo) {_header._glonass = glo;}
+  void   setGnssTypeV3(t_eph::e_type sys) {_header._satSys = sys;}
   void   writeHeader(const QMap<QString, QString>* txtMap = 0);
   void   writeEph(const t_eph* eph);
