Index: /trunk/rtcm3torinex/lib/rtcm3torinex.c
===================================================================
--- /trunk/rtcm3torinex/lib/rtcm3torinex.c	(revision 2755)
+++ /trunk/rtcm3torinex/lib/rtcm3torinex.c	(revision 2756)
@@ -140,4 +140,13 @@
   LOADBITS(a) \
   b = (bitfield<<(64-numbits))>>(64-(a)); \
+  numbits -= (a); \
+}
+
+/* extract bits from data stream
+   b = variable to store result, a = number of bits */
+#define GETBITSFACTOR(b, a, c) \
+{ \
+  LOADBITS(a) \
+  b = ((bitfield<<(sizeof(bitfield)*8-numbits))>>(sizeof(bitfield)*8-(a)))*(c); \
   numbits -= (a); \
 }
@@ -397,4 +406,45 @@
 
         ret = 1019;
+      }
+      break;
+    case 1045:
+      {
+        struct galileoephemeris *ge;
+        int sv;
+
+        ge = &handle->ephemerisGALILEO;
+        memset(ge, 0, sizeof(*ge));
+
+        GETBITS(sv, 6)
+        ge->satellite = sv;
+        GETBITS(ge->Week, 12)
+        GETBITS(ge->IODnav, 10)
+        GETBITS(ge->SISA, 8)
+        GETFLOATSIGN(ge->IDOT, 14, R2R_PI/(double)(1<<30)/(double)(1<<13))
+        GETBITSFACTOR(ge->TOC, 14, 60)
+        GETFLOATSIGN(ge->clock_driftrate, 6, 1.0/(double)(1<<30)/(double)(1<<29))
+        GETFLOATSIGN(ge->clock_drift, 21, 1.0/(double)(1<<30)/(double)(1<<16))
+        GETFLOATSIGN(ge->clock_bias, 31, 1.0/(double)(1<<30)/(double)(1<<4))
+        GETFLOATSIGN(ge->Crs, 16, 1.0/(double)(1<<5))
+        GETFLOATSIGN(ge->Delta_n, 16, R2R_PI/(double)(1<<30)/(double)(1<<13))
+        GETFLOATSIGN(ge->M0, 32, R2R_PI/(double)(1<<30)/(double)(1<<1))
+        GETFLOATSIGN(ge->Cuc, 16, 1.0/(double)(1<<29))
+        GETFLOAT(ge->e, 32, 1.0/(double)(1<<30)/(double)(1<<3))
+        GETFLOATSIGN(ge->Cus, 16, 1.0/(double)(1<<29))
+        GETFLOAT(ge->sqrt_A, 32, 1.0/(double)(1<<19))
+        GETBITSFACTOR(ge->TOE, 14, 60)
+        GETFLOATSIGN(ge->Cic, 16, 1.0/(double)(1<<29))
+        GETFLOATSIGN(ge->OMEGA0, 32, R2R_PI/(double)(1<<30)/(double)(1<<1))
+        GETFLOATSIGN(ge->Cis, 16, 1.0/(double)(1<<29))
+        GETFLOATSIGN(ge->i0, 32, R2R_PI/(double)(1<<30)/(double)(1<<1))
+        GETFLOATSIGN(ge->Crc, 16, 1.0/(double)(1<<5))
+        GETFLOATSIGN(ge->omega, 32, R2R_PI/(double)(1<<30)/(double)(1<<1))
+        GETFLOATSIGN(ge->OMEGADOT, 24, R2R_PI/(double)(1<<30)/(double)(1<<13))
+        GETFLOATSIGN(ge->BGD_1_5A, 10, 1.0/(double)(1<<30)/(double)(1<<2))
+        GETBITS(ge->E5aHS, 2)
+        GETBITS(sv, 1)
+        if(sv)
+          ge->flags |= GALEPHF_E5ADINVALID;
+        ret = 1045;
       }
       break;
Index: /trunk/rtcm3torinex/lib/rtcm3torinex.h
===================================================================
--- /trunk/rtcm3torinex/lib/rtcm3torinex.h	(revision 2755)
+++ /trunk/rtcm3torinex/lib/rtcm3torinex.h	(revision 2756)
@@ -256,4 +256,6 @@
 };
 
+#define GALEPHF_E5ADINVALID     (1<<0) /* E5aDVS set invalid */
+
 #define GLOEPHF_UNHEALTHY       (1<<0) /* set if unhealty satellite, f2b78 */
 #define GLOEPHF_ALMANACHEALTHOK (1<<1) /* set if ALM health is available */
@@ -287,4 +289,34 @@
 };
 
+struct galileoephemeris {
+  int    flags;            /* GALEPHF_xxx */
+  int    satellite;        /* SV ID */
+  int    IODnav;
+  int    TOC;              /* [s] */
+  int    TOE;              /* [s] */
+  double clock_bias;       /* [s] */
+  double clock_drift;      /* [s/s] */
+  double clock_driftrate;  /* [s/s^2] */
+  double Crs;              /* [m] */
+  double Delta_n;          /* [rad/s] */
+  double M0;               /* [rad] */
+  double Cuc;              /* [rad] */
+  double e;
+  double Cus;              /* [rad] */
+  double sqrt_A;           /* [m^0.5] */
+  double Cic;              /* [rad] */
+  double OMEGA0;           /* [rad] */
+  double Cis;              /* [rad] */
+  double i0;               /* [rad] */
+  double Crc;              /* [m] */
+  double omega;            /* [rad] */
+  double OMEGADOT;         /* [rad/s] */
+  double IDOT;             /* [rad/s] */
+  double BGD_1_5A;         /* [s] */
+  int    Week;
+  int    SISA;
+  int    E5aHS;
+};
+
 struct RTCM3ParserData {
   unsigned char Message[2048]; /* input-buffer */
@@ -296,4 +328,5 @@
   struct gnssdata Data;
   struct gpsephemeris ephemerisGPS;
+  struct galileoephemeris ephemerisGALILEO;
   struct glonassephemeris ephemerisGLONASS;
   struct gnssdata DataNew;
