Index: trunk/BNC/bncmodel.cpp
===================================================================
--- trunk/BNC/bncmodel.cpp	(revision 3280)
+++ trunk/BNC/bncmodel.cpp	(revision 3281)
@@ -1020,6 +1020,30 @@
   int irc = 0;
 
-  // Check Glonass
-  // -------------
+  // Check GPS Code
+  // --------------
+  if (irc == 0) {
+    findMaxRes(vv,satDataGPS, prnCode, maxResCode, prnPhase, maxResPhase);
+    if (maxResCode > MAXRES_CODE_GPS) {
+      satDataGPS.remove(prnCode);
+      prnRemoved = prnCode;
+      maxRes     = maxResCode;
+      irc        = 1;
+    }
+  }
+
+  // Check Galileo Code
+  // ------------------
+  if (irc == 0) {
+    findMaxRes(vv,satDataGal, prnCode, maxResCode, prnPhase, maxResPhase);
+    if (maxResCode > MAXRES_CODE_GAL) {
+      satDataGal.remove(prnCode);
+      prnRemoved = prnCode;
+      maxRes     = maxResCode;
+      irc        = 1;
+    }
+  }
+
+  // Check Glonass Phase
+  // -------------------
   if (irc == 0) {
     findMaxRes(vv,satDataGlo, prnCode, maxResCode, prnPhase, maxResPhase);
@@ -1032,6 +1056,6 @@
   }
 
-  // Check Galileo
-  // -------------
+  // Check Galileo Phase
+  // -------------------
   if (irc == 0) {
     findMaxRes(vv,satDataGal, prnCode, maxResCode, prnPhase, maxResPhase);
@@ -1042,14 +1066,8 @@
       irc        = 1;
     }
-    else if (maxResCode > MAXRES_CODE_GAL) {
-      satDataGal.remove(prnCode);
-      prnRemoved = prnCode;
-      maxRes     = maxResCode;
-      irc        = 1;
-    }
-  }
-
-  // Check GPS
-  // ---------
+  }
+
+  // Check GPS Phase
+  // ---------------
   if (irc == 0) {
     findMaxRes(vv,satDataGPS, prnCode, maxResCode, prnPhase, maxResPhase);
@@ -1058,10 +1076,4 @@
       prnRemoved = prnPhase;
       maxRes     = maxResPhase;
-      irc        = 1;
-    }
-    else if (maxResCode > MAXRES_CODE_GPS) {
-      satDataGPS.remove(prnCode);
-      prnRemoved = prnCode;
-      maxRes     = maxResCode;
       irc        = 1;
     }
