Index: /trunk/BNC/src/RTCM3/RTCM3coDecoder.cpp
===================================================================
--- /trunk/BNC/src/RTCM3/RTCM3coDecoder.cpp	(revision 7178)
+++ /trunk/BNC/src/RTCM3/RTCM3coDecoder.cpp	(revision 7179)
@@ -124,5 +124,5 @@
 
     QString hlpStr = bncRinex::nextEpochStr(datTim,
-                                      settings.value("corrIntr").toString());
+                                      settings.value("corrIntr").toString(), false);
 
     QString fileNameHlp = _fileNameSkl
Index: /trunk/BNC/src/bnccore.cpp
===================================================================
--- /trunk/BNC/src/bnccore.cpp	(revision 7178)
+++ /trunk/BNC/src/bnccore.cpp	(revision 7179)
@@ -125,5 +125,4 @@
   qRegisterMetaType<QList<t_satPhaseBias> > ("QList<t_satPhaseBias>");
   qRegisterMetaType<t_vTec>                 ("t_vTec");
-
 }
 
@@ -291,15 +290,33 @@
     QDateTime datTim = currentDateAndTimeGPS();
 
-    QString ephFileNameGPS = _ephPath + "BRDC" + 
-               QString("%1").arg(datTim.date().dayOfYear(), 3, 10, QChar('0'));
+    QString ephFileNameGPS = _ephPath + "BRDC";
+
+    bool ephV3filenames = settings.value("ephV3filenames").toBool();
 
     QString hlpStr = bncRinex::nextEpochStr(datTim, 
-                         settings.value("ephIntr").toString());
+                         settings.value("ephIntr").toString(), ephV3filenames);
 
     if (_rinexVers == 3) {
-      ephFileNameGPS += hlpStr + datTim.toString(".yyP");
-    }
-    else {
-      ephFileNameGPS += hlpStr + datTim.toString(".yyN");
+      if (ephV3filenames) {
+        QString country = "WLD";
+        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 +   // HMS_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");
+      }
+    }
+    else { // RNX v2.11
+      ephFileNameGPS += QString("%1").arg(datTim.date().dayOfYear(), 3, 10, QChar('0')) +
+                        hlpStr + datTim.toString(".yyN");
     }
 
Index: /trunk/BNC/src/bncrinex.cpp
===================================================================
--- /trunk/BNC/src/bncrinex.cpp	(revision 7178)
+++ /trunk/BNC/src/bncrinex.cpp	(revision 7179)
@@ -209,5 +209,6 @@
 ////////////////////////////////////////////////////////////////////////////
 QString bncRinex::nextEpochStr(const QDateTime& datTim, 
-                               const QString& intStr, QDateTime* nextEpoch) {
+                               const QString& intStr, bool rnxV3filenames,
+                               QDateTime* nextEpoch) {
 
   QString epoStr;
@@ -216,12 +217,15 @@
   QDate nextDate;
 
+  (rnxV3filenames) ? epoStr = "" : epoStr = "A";
+
   int indHlp = intStr.indexOf("min");
 
   if ( indHlp != -1) {
     int step = intStr.left(indHlp-1).toInt();
-    char ch = 'A' + datTim.time().hour();
-    epoStr = ch;
+    if (rnxV3filenames) {
+      epoStr +=  QString("%1").arg(datTim.time().hour(), 2, 10, QChar('0')); // H
+    }
     if (datTim.time().minute() >= 60-step) {
-      epoStr += QString("%1").arg(60-step, 2, 10, QChar('0'));
+      epoStr += QString("%1").arg(60-step, 2, 10, QChar('0'));               // M
       if (datTim.time().hour() < 23) {
         nextTime.setHMS(datTim.time().hour() + 1 , 0, 0);
@@ -236,5 +240,5 @@
       for (int limit = step; limit <= 60-step; limit += step) {
         if (datTim.time().minute() < limit) {
-          epoStr += QString("%1").arg(limit-step, 2, 10, QChar('0'));
+          epoStr += QString("%1").arg(limit-step, 2, 10, QChar('0'));        // M
           nextTime.setHMS(datTim.time().hour(), limit, 0);
           nextDate = datTim.date();
@@ -243,8 +247,17 @@
       }
     }
+    if (rnxV3filenames) {
+      epoStr += QString("%1").arg(0, 2, 10, QChar('0'));                     // S
+      epoStr += QString("_%1M").arg(step, 2, 10, QChar('0'));                // period
+    }
   }
   else if (intStr == "1 hour") {
-    char ch = 'A' + datTim.time().hour();
-    epoStr = ch;
+    int step = intStr.left(indHlp-1).toInt();
+    if (rnxV3filenames) {
+      epoStr +=  QString("%1").arg(datTim.time().hour(), 2, 10, QChar('0')); // H
+      epoStr += QString("%1").arg(0, 2, 10, QChar('0'));                     // M
+      epoStr += QString("%1").arg(0, 2, 10, QChar('0'));                     // S
+      epoStr += QString("_%1H").arg(step+1, 2, 10, QChar('0'));              // period
+    }
     if (datTim.time().hour() < 23) {
       nextTime.setHMS(datTim.time().hour() + 1 , 0, 0);
@@ -257,5 +270,13 @@
   }
   else {
-    epoStr = "0";
+    int step = intStr.left(indHlp-1).toInt();
+    if (rnxV3filenames) {
+      epoStr += QString("%1").arg(0, 2, 10, QChar('0'));                    // H
+      epoStr += QString("%1").arg(0, 2, 10, QChar('0'));                    // M
+      epoStr += QString("%1").arg(0, 2, 10, QChar('0'));                    // S
+      epoStr += QString("_%1D").arg(step+1, 2, 10, QChar('0'));             // period
+    } else {
+      epoStr = "0";
+    }
     nextTime.setHMS(0, 0, 0);
     nextDate = datTim.date().addDays(1);
@@ -282,5 +303,5 @@
 
   QString hlpStr = nextEpochStr(datTim, settings.value("rnxIntr").toString(), 
-                                &_nextCloseEpoch);
+                                _rnxV3filenames, &_nextCloseEpoch);
 
   QString ID4 = _statID.left(4);
@@ -306,7 +327,37 @@
   }
 
-  path += ID4 +
-          QString("%1").arg(datTim.date().dayOfYear(), 3, 10, QChar('0')) +
-          hlpStr + distStr + datTim.toString(".yyO");
+  if (_rnxV3filenames) {
+    QString country;
+    QString monNum = "0";
+    QString recNum = "0";
+    QListIterator<QString> it(settings.value("mountPoints").toStringList());
+    while (it.hasNext()) {
+      QStringList hlp = it.next().split(" ");
+      if (hlp.size() <= 1)
+        continue;
+      if (hlp.join(" ").indexOf(_statID, 0) != -1) {
+        country = hlp[2];
+      }
+    }
+    int sampl = settings.value("rnxSampl").toString().mid(0,2).toInt();
+    if (!sampl)
+      sampl++;
+    path += ID4 +
+            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 + // HMS_period
+            QString("_%1S").arg(sampl, 2, 10, QChar('0')) + // sampling rate
+            distStr +
+            "_MO.rnx"; // mixed OBS
+  }
+  else {
+    path += ID4 +
+            QString("%1").arg(datTim.date().dayOfYear(), 3, 10, QChar('0')) +
+            hlpStr + distStr + datTim.toString(".yyO");
+  }
 
   _fName = path.toAscii();
Index: /trunk/BNC/src/bncrinex.h
===================================================================
--- /trunk/BNC/src/bncrinex.h	(revision 7178)
+++ /trunk/BNC/src/bncrinex.h	(revision 7179)
@@ -47,4 +47,5 @@
    static QString nextEpochStr(const QDateTime& datTim,
                                const QString& intStr, 
+                               bool rnxV3filenames,
                                QDateTime* nextEpoch = 0);
    static std::string asciiSatLine(const t_satObs& obs);
Index: /trunk/BNC/src/bncwindow.cpp
===================================================================
--- /trunk/BNC/src/bncwindow.cpp	(revision 7178)
+++ /trunk/BNC/src/bncwindow.cpp	(revision 7179)
@@ -213,6 +213,4 @@
   _rnxFileCheckBox = new QCheckBox();
   _rnxFileCheckBox->setCheckState(Qt::CheckState(settings.value("rnxOnlyWithSKL").toInt()));
-  _rnxV3filenameCheckBox = new QCheckBox();
-  _rnxV3filenameCheckBox->setCheckState(Qt::CheckState(settings.value("rnxV3filenames").toInt()));
   _rnxSamplSpinBox->setSuffix(" sec");
   _rnxSkelLineEdit    = new QLineEdit(settings.value("rnxSkel").toString());
@@ -221,4 +219,6 @@
   _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()) {
@@ -1734,5 +1734,7 @@
   settings.setValue("rnxV3filenames",_rnxV3filenameCheckBox->checkState());
   settings.setValue("rnxScript",   _rnxScrpLineEdit->text());
-  settings.setValue("rnxV3",       _rnxV3CheckBox->checkState());
+  (_rnxV3filenameCheckBox->checkState()) ?
+    settings.setValue("rnxV3",       _rnxV3filenameCheckBox->checkState()) :
+    settings.setValue("rnxV3",       _rnxV3CheckBox->checkState());
   settings.setValue("rnxV2Priority",_rnxV2Priority->text());
 // RINEX Ephemeris
@@ -1740,6 +1742,8 @@
   settings.setValue("ephIntr",       _ephIntrComboBox->currentText());
   settings.setValue("outEphPort",    _outEphPortLineEdit->text());
-  settings.setValue("ephV3",         _ephV3CheckBox->checkState());
   settings.setValue("ephV3filenames", _ephV3filenameCheckBox->checkState());
+  (_ephV3filenameCheckBox->checkState()) ?
+    settings.setValue("ephV3",       _ephV3filenameCheckBox->checkState()) :
+    settings.setValue("ephV3",       _ephV3CheckBox->checkState());
 // Broadcast Corrections
   settings.setValue("corrPath",    _corrPathLineEdit->text());
