Index: trunk/BNC/src/ephemeris.cpp
===================================================================
--- trunk/BNC/src/ephemeris.cpp	(revision 6801)
+++ trunk/BNC/src/ephemeris.cpp	(revision 6802)
@@ -923,5 +923,5 @@
         }
         // Bit 1-2
-        _E1_bHS = double((int(SVhealth) >> 1) & 0x2);
+        _E1_bHS = double((int(SVhealth) >> 1) & 0x3);
         // Bit 3
         if (int(SVhealth) & (1<<3)) {
@@ -929,5 +929,5 @@
         }
         // Bit 4-5
-        _E5aHS = double((int(SVhealth) >> 4) & 0x2);
+        _E5aHS = double((int(SVhealth) >> 4) & 0x3);
         // Bit 6
         if (int(SVhealth) & (1<<6)) {
@@ -935,5 +935,5 @@
         }
         // Bit 7-8
-        _E5bHS = double((int(SVhealth) >> 7) & 0x2);
+        _E5bHS = double((int(SVhealth) >> 7) & 0x3);
       }
     }
@@ -1151,5 +1151,5 @@
   else if ((_flags & GALEPHF_INAV) == GALEPHF_INAV) {
     dataSource |= (1<<0);
-    dataSource |= (1<<1);// not clear but common practice
+    dataSource |= (1<<1);// not clear but seems to be common in practice
     dataSource |= (1<<2);
     dataSource |= (1<<9);
@@ -1170,6 +1170,21 @@
       SVhealth |= (1<<2);
     }
+    //   Bit 3  : E5a DVS
+    if ((_flags & GALEPHF_E5ADINVALID) == GALEPHF_E5ADINVALID) {
+      SVhealth |= (1<<3);
+    }
+    //   Bit 4-5: E5a HS
+    if      (_E5aHS == 1.0) {
+      SVhealth |= (1<<4);
+    }
+    else if (_E5aHS == 2.0) {
+      SVhealth |= (1<<5);
+    }
+    else if (_E5aHS  == 3.0) {
+      SVhealth |= (1<<4);
+      SVhealth |= (1<<5);
+    }
     //   Bit 6  : E5b DVS
-    if ((_flags & GALEPHF_E1DINVALID) == GALEPHF_E1DINVALID) {
+    if ((_flags & GALEPHF_E5BDINVALID) == GALEPHF_E5BDINVALID) {
       SVhealth |= (1<<6);
     }
