Index: trunk/BNS/bnsoutf.cpp
===================================================================
--- trunk/BNS/bnsoutf.cpp	(revision 850)
+++ trunk/BNS/bnsoutf.cpp	(revision 851)
@@ -6,5 +6,5 @@
  * Class:      bnsoutf
  *
- * Purpose:    writes SP3 files
+ * Purpose:    Basis Class for File-Writers
  *
  * Author:     L. Mervart
@@ -67,5 +67,5 @@
     int step = intStr.left(indHlp-1).toInt();
     char ch = 'A' + datTim.time().hour();
-    epoStr = ch;
+    epoStr = QString("_") + ch;
     if (datTim.time().minute() >= 60-step) {
       epoStr += QString("%1").arg(60-step, 2, 10, QChar('0'));
@@ -92,5 +92,5 @@
   else if (intStr == "1 hour") {
     char ch = 'A' + datTim.time().hour();
-    epoStr = ch;
+    epoStr = QString("_") + ch;
     if (datTim.time().hour() < 23) {
       nextTime.setHMS(datTim.time().hour() + 1 , 0, 0);
@@ -103,5 +103,5 @@
   }
   else {
-    epoStr = "0";
+    epoStr = "";
     nextTime.setHMS(0, 0, 0);
     nextDate = datTim.date().addDays(1);
@@ -117,11 +117,17 @@
 // File Name according to RINEX Standards
 ////////////////////////////////////////////////////////////////////////////
-void bnsoutf::resolveFileName(const QDateTime& datTim) {
+void bnsoutf::resolveFileName(int GPSweek, const QDateTime& datTim) {
 
-  QString hlpStr = nextEpochStr(datTim, _intr, &_nextCloseEpoch);
+  QString epoStr = nextEpochStr(datTim, _intr, &_nextCloseEpoch);
+
+  int dayOfWeek = datTim.date().dayOfWeek();
+  if (dayOfWeek == 7) {
+    dayOfWeek = 0;
+  }
 
   _fName = (_prep
-            + QString("%1").arg(datTim.date().dayOfYear(), 3, 10, QChar('0'))
-            + hlpStr 
+            + QString("%1").arg(GPSweek)
+            + QString("%1").arg(dayOfWeek)
+            + epoStr 
             + _ext).toAscii();
 }
@@ -144,5 +150,5 @@
   // ------------
   if (!_headerWritten) {
-    resolveFileName(datTim);
+    resolveFileName(GPSweek, datTim);
     _out.open(_fName.data());
     _out.setf(ios::showpoint | ios::fixed);
Index: trunk/BNS/bnsoutf.h
===================================================================
--- trunk/BNS/bnsoutf.h	(revision 850)
+++ trunk/BNS/bnsoutf.h	(revision 851)
@@ -23,5 +23,5 @@
                        const QString& intStr, 
                        QDateTime* nextEpoch = 0);
-  void resolveFileName(const QDateTime& datTim);
+  void resolveFileName(int GPSweek, const QDateTime& datTim);
   void closeFile();
 
