Index: trunk/BNC/RTCM3/RTCM3Decoder.cpp
===================================================================
--- trunk/BNC/RTCM3/RTCM3Decoder.cpp	(revision 2550)
+++ trunk/BNC/RTCM3/RTCM3Decoder.cpp	(revision 2551)
@@ -109,4 +109,15 @@
   bool decoded = false;
 
+  // If read from file, we set the mode according to staID
+  // -----------------------------------------------------
+  if (!_staID_corrections.isEmpty() && _rawFile) {
+    if (_rawFile->staID() == _staID_corrections) {
+      _mode = corrections;
+    }
+    else {
+      _mode = observations;
+    }
+  }
+
   // Try to decode Clock and Orbit Corrections
   // -----------------------------------------
@@ -114,6 +125,11 @@
     if ( _coDecoder->Decode(buffer, bufLen, errmsg) == success ) {
       decoded = true;
-      if (!_rawFile && _mode == unknown) {
-        _mode = corrections;
+      if (_mode == unknown) {
+        if (_rawFile) {
+          _staID_corrections = _rawFile->staID();
+	}
+	else {
+          _mode = corrections;
+	}
       }
     }
Index: trunk/BNC/RTCM3/RTCM3Decoder.h
===================================================================
--- trunk/BNC/RTCM3/RTCM3Decoder.h	(revision 2550)
+++ trunk/BNC/RTCM3/RTCM3Decoder.h	(revision 2551)
@@ -69,4 +69,5 @@
   double                 _antXYZ[3];
   bncRawFile*            _rawFile;
+  QString                _staID_corrections;
 };
 
