Index: /branches/BNC_2.12/src/rinex/reqcedit.cpp
===================================================================
--- /branches/BNC_2.12/src/rinex/reqcedit.cpp	(revision 8801)
+++ /branches/BNC_2.12/src/rinex/reqcedit.cpp	(revision 8802)
@@ -521,5 +521,7 @@
     }
   }
+  // TODO: enable user decision 
   qStableSort(ephs.begin(), ephs.end(), t_eph::earlierTime);
+  //qStableSort(ephs.begin(), ephs.end(), t_eph::prnSort); 
 }
 
Index: /branches/BNC_2.12/src/rinex/rnxobsfile.cpp
===================================================================
--- /branches/BNC_2.12/src/rinex/rnxobsfile.cpp	(revision 8801)
+++ /branches/BNC_2.12/src/rinex/rnxobsfile.cpp	(revision 8802)
@@ -1315,8 +1315,16 @@
     const t_rnxSat& rnxSat = epo->rnxSat[ii];
     if (_header._obsTypes[rnxSat.prn.system()].size() > 0) {
+      if (_header.version() < 3.0) { // exclude new GNSS such as BDS, QZSS, IRNSS, etc.
+          if (rnxSat.prn.system() != 'G' && rnxSat.prn.system() != 'R' &&
+              rnxSat.prn.system() != 'E' && rnxSat.prn.system() != 'S' &&
+              rnxSat.prn.system() != 'I') {
+            continue;
+          }
+      }
       epoLocal.rnxSat.push_back(rnxSat);
     }
   }
-
+  std::stable_sort(epoLocal.rnxSat.begin(), epoLocal.rnxSat.end(), t_rnxSat::prnSort);
+  
   if (version() < 3.0) {
     return writeEpochV2(_stream, _header, &epoLocal);
Index: /branches/BNC_2.12/src/rinex/rnxobsfile.h
===================================================================
--- /branches/BNC_2.12/src/rinex/rnxobsfile.h	(revision 8801)
+++ /branches/BNC_2.12/src/rinex/rnxobsfile.h	(revision 8802)
@@ -123,4 +123,5 @@
     t_prn                   prn;
     QMap<QString, t_rnxObs> obs;
+    static bool prnSort(const t_rnxSat rnxSat1, const t_rnxSat rnxSat2) {return rnxSat1.prn < rnxSat2.prn;}    
   };
 
@@ -220,5 +221,6 @@
         if (header.version() < 3.0) { // exclude new GNSS such as BDS, QZSS, IRNSS, etc.
             if (rnxSat.prn.system() != 'G' && rnxSat.prn.system() != 'R' &&
-                rnxSat.prn.system() != 'E' && rnxSat.prn.system() != 'S') {
+                rnxSat.prn.system() != 'E' && rnxSat.prn.system() != 'S' &&
+                rnxSat.prn.system() != 'I') {
               continue;
             }
@@ -227,4 +229,6 @@
       }
     }
+    std::stable_sort(epoLocal.rnxSat.begin(), epoLocal.rnxSat.end(), t_rnxSat::prnSort);    
+    
     if (header.version() >= 3.0) {
       writeEpochV3(stream, header, &epoLocal);
