Index: trunk/BNC/src/RTCM3/RTCM3Decoder.cpp
===================================================================
--- trunk/BNC/src/RTCM3/RTCM3Decoder.cpp	(revision 10533)
+++ trunk/BNC/src/RTCM3/RTCM3Decoder.cpp	(revision 10534)
@@ -53,4 +53,6 @@
 #include "bncutils.h"
 #include "bncsettings.h"
+#include "bnctime.h"
+#include "crs.h"
 
 using namespace std;
@@ -481,5 +483,5 @@
     sys = 'J';
   }
-  else if (type >= 1101 && type <= 1007) {
+  else if (type >= 1101 && type <= 1107) {
     sys = 'S';
   }
@@ -1730,6 +1732,5 @@
   GETBITSSIGN(z, 38)
   _antList.back().zz = z * 1e-4;
-  if (type == 1006)
-      {
+  if (type == 1006) {
     double h;
     GETBITS(h, 16)
@@ -1741,4 +1742,145 @@
   return true;
 }
+
+//
+////////////////////////////////////////////////////////////////////////////
+bool RTCM3Decoder::DecodeServiceCRS(unsigned char* data, int size) {
+  t_serviceCrs serviceCrs;
+  int servicecrsnum = -1;
+
+  uint64_t numbits = 0, bitfield = 0;
+
+  data += 3; // header
+  size -= 6; // header + crc
+
+  SKIPBITS(12) // Message Number
+
+  GETBITS(servicecrsnum, 5)
+  if (servicecrsnum > -1 && servicecrsnum <= 31) {
+    for(int i = 0; i < servicecrsnum; i++) {
+      GETBITS(serviceCrs._name[i], 8);
+    }
+    serviceCrs._name[servicecrsnum] = 0;
+  }
+  if (_serviceCrs.empty() ||
+      (strncmp(_serviceCrs.back()._name, serviceCrs._name, servicecrsnum) != 0)) {
+    _serviceCrs.push_back(serviceCrs);
+    GETFLOAT(_serviceCrs.back()._CE, 16, 1/100.0)
+    _serviceCrs.back().setCoordinateEpochFromCE();
+    _serviceCrs.back().print();
+  }
+  return true;
+
+}
+
+//
+////////////////////////////////////////////////////////////////////////////
+bool RTCM3Decoder::DecodeRTCMCRS(unsigned char* data, int size) {
+
+  t_rtcmCrs rtcmCrs;
+  int rtcmcrsnum = -1;
+
+  uint64_t numbits = 0, bitfield = 0;
+
+  data += 3; // header
+  size -= 6; // header + crc
+
+  SKIPBITS(12) // Message Number
+  GETBITS(rtcmcrsnum, 5)
+  if (rtcmcrsnum > -1 && rtcmcrsnum <= 31) {
+    for(int i = 0; i < rtcmcrsnum; i++) {
+      GETBITS(rtcmCrs._name[i], 8);
+    }
+    rtcmCrs._name[rtcmcrsnum] = 0;
+  }
+  if (_rtcmCrs.empty() ||
+      (strncmp(_rtcmCrs.back()._name, rtcmCrs._name, rtcmcrsnum) != 0)) {
+    _rtcmCrs.push_back(rtcmCrs);
+
+    GETBITS(_rtcmCrs.back()._anchor, 1)
+    GETBITS(_rtcmCrs.back()._plateNumber, 5)
+
+    int dblinksnum = 0;
+    GETBITS(dblinksnum, 3)
+    for (int i = 0; i < dblinksnum; i++) {
+      int dblinknum = -1;
+      char dblinkname[31];
+      GETBITS(dblinknum, 5)
+      if (dblinknum > -1 && dblinknum <= 31) {
+        for(int i = 0; i < dblinknum; i++) {
+          GETBITS(dblinkname[i], 8);
+        }
+        dblinkname[dblinknum] = 0;
+        _rtcmCrs.back()._databaseLinks.append(QString("%1").arg(dblinkname));
+      }
+    }
+    _rtcmCrs.back().print();
+  }
+
+  return true;
+}
+
+
+////////////////////////////////////////////////////////////////////////////
+bool RTCM3Decoder::DecodeHelmertTrafoParameters(unsigned char* data, int size) {
+
+  t_helmertPar helmertPar;
+  int sourcenum = -1;
+  int targetnum = -1;
+
+  uint64_t numbits = 0, bitfield = 0;
+  data += 3; // header
+  size -= 6; // header + crc
+
+  SKIPBITS(12) // Message Number
+  GETBITS(sourcenum, 5)
+  if (sourcenum > -1 && sourcenum <= 31) {
+    for(int i = 0; i < sourcenum; i++) {
+      GETBITS(helmertPar._sourceName[i], 8);
+    }
+    helmertPar._sourceName[sourcenum] = 0;
+  }
+  GETBITS(targetnum, 5)
+  if (targetnum > -1 && targetnum <= 31) {
+    for(int i = 0; i < targetnum; i++) {
+      GETBITS(helmertPar._targetName[i], 8);
+    }
+    helmertPar._targetName[targetnum] = 0;
+  }
+  GETBITS(helmertPar._sysIdentNum, 8)
+  GETBITS(helmertPar._utilTrafoMessageIndicator, 10)
+  int mjd;
+  GETBITS(mjd, 16)
+  helmertPar._t0 = mjd + 44244;
+
+  // delete old parameter entries if available
+  if (!_helmertPar.empty()) {
+    QList<t_helmertPar>::iterator it = _helmertPar.begin();
+    while (it != _helmertPar.end()) {
+      (helmertPar == *it) ? it = _helmertPar.erase(it) : ++it;
+    }
+  }
+  _helmertPar.push_back(helmertPar);
+
+  GETFLOATSIGN(_helmertPar.back()._dx, 23, 0.001)
+  GETFLOATSIGN(_helmertPar.back()._dy, 23, 0.001)
+  GETFLOATSIGN(_helmertPar.back()._dz, 23, 0.001)
+  GETFLOATSIGN(_helmertPar.back()._ox, 32, 0.00002)
+  GETFLOATSIGN(_helmertPar.back()._oy, 32, 0.00002)
+  GETFLOATSIGN(_helmertPar.back()._oz, 32, 0.00002)
+  GETFLOATSIGN(_helmertPar.back()._sc, 25, 0.00001)
+  GETFLOATSIGN(_helmertPar.back()._dxr, 17, 0.00002)
+  GETFLOATSIGN(_helmertPar.back()._dyr, 17, 0.00002)
+  GETFLOATSIGN(_helmertPar.back()._dzr, 17, 0.00002)
+  GETFLOATSIGN(_helmertPar.back()._oxr, 17, 0.0000004)
+  GETFLOATSIGN(_helmertPar.back()._oyr, 17, 0.0000004)
+  GETFLOATSIGN(_helmertPar.back()._ozr, 17, 0.0000004)
+  GETFLOATSIGN(_helmertPar.back()._scr, 14, 0.0000002)
+
+  _helmertPar.back().print();
+
+  return true;
+}
+
 
 //
@@ -1853,11 +1995,24 @@
             DecodeAntennaPosition(_Message, _BlockSize);
             break;
+          case 1300:
+            DecodeServiceCRS(_Message, _BlockSize);
+            break;
+          case 1301:
+            DecodeHelmertTrafoParameters(_Message, _BlockSize);
+            break;
+          case 1302:
+          case 35:
+            DecodeRTCMCRS(_Message, _BlockSize);
+            break;
         }
       }
     }
   }
+  /*
+  for (int ii = 0; ii < _helmertParList.size(); ii++) {
+    _helmertParList[ii].print();
+  }*/
   return decoded ? success : failure;
 }
-;
 
 //
Index: trunk/BNC/src/RTCM3/RTCM3Decoder.h
===================================================================
--- trunk/BNC/src/RTCM3/RTCM3Decoder.h	(revision 10533)
+++ trunk/BNC/src/RTCM3/RTCM3Decoder.h	(revision 10534)
@@ -32,4 +32,5 @@
 #include "GPSDecoder.h"
 #include "RTCM3coDecoder.h"
+#include "crs.h"
 #include "bncrawfile.h"
 #include "ephemeris.h"
@@ -167,5 +168,25 @@
    */
   bool DecodeAntennaPosition(unsigned char* buffer, int bufLen);
-
+  /**
+   * Extract service CRS from 1300 RTCM3 messages
+   * @param buffer the buffer containing CRS name and epoch RTCM block
+   * @param bufLen the length of the buffer (the message length including header+crc)
+   * @return <code>true</code> when data block was decodable
+   */
+  bool DecodeServiceCRS(unsigned char* buffer, int bufLen);
+  /**
+   * Extract Helmert transformation parameters from 1301 RTCM3 messages
+   * @param buffer the buffer containing Helmert transformation parameters RTCM block
+   * @param bufLen the length of the buffer (the message length including header+crc)
+   * @return <code>true</code> when data block was decodable
+   */
+ bool DecodeHelmertTrafoParameters(unsigned char* buffer, int bufLen);
+  /**
+   * Extract RTCM CRS data from 1302 RTCM3 messages
+   * @param buffer the buffer containing a database link RTCM block
+   * @param bufLen the length of the buffer (the message length including header+crc)
+   * @return <code>true</code> when data block was decodable
+   */
+  bool DecodeRTCMCRS(unsigned char* buffer, int bufLen);
   /** Current station description, dynamic in case of raw input file handling */
   QString                _staID;
@@ -197,4 +218,5 @@
    */
   QList<t_satObs> _CurrentObsList;
+
 };
 
Index: trunk/BNC/src/RTCM3/RTCM3coDecoder.cpp
===================================================================
--- trunk/BNC/src/RTCM3/RTCM3coDecoder.cpp	(revision 10533)
+++ trunk/BNC/src/RTCM3/RTCM3coDecoder.cpp	(revision 10534)
@@ -98,4 +98,5 @@
 
   _ssrCorr = 0;
+
 }
 
@@ -178,8 +179,8 @@
     struct SsrCorr::PhaseBias  phaseBiasSav;
     struct SsrCorr::VTEC       vTECSav;
-    memcpy(&clkOrbSav,    &_clkOrb,    sizeof(clkOrbSav)); // save state
-    memcpy(&codeBiasSav,  &_codeBias,  sizeof(codeBiasSav));
-    memcpy(&phaseBiasSav, &_phaseBias, sizeof(phaseBiasSav));
-    memcpy(&vTECSav,      &_vTEC,      sizeof(vTECSav));
+    memcpy(&clkOrbSav,     &_clkOrb,    sizeof(clkOrbSav)); // save state
+    memcpy(&codeBiasSav,   &_codeBias,  sizeof(codeBiasSav));
+    memcpy(&phaseBiasSav,  &_phaseBias, sizeof(phaseBiasSav));
+    memcpy(&vTECSav,       &_vTEC,      sizeof(vTECSav));
 
     int bytesused = 0;
@@ -205,5 +206,4 @@
 
       if (irc == GCOBR_OK || irc == GCOBR_MESSAGEFOLLOWS ) {
-
         setEpochTime(); // sets _lastTime
 
@@ -554,4 +554,6 @@
   newProviderID[1] = _clkOrb.SSRSolutionID;
   newProviderID[2] = _clkOrb.SSRIOD;
+  QString newProviderIDStr = QString(" [SSR Provider ID: %1 SSR Solution ID: %2 SSR IOD: %3]: ")
+      .arg(newProviderID[0]).arg(newProviderID[1]).arg(newProviderID[2]);
 
   bool alreadySet = false;
@@ -569,5 +571,5 @@
 
   if (alreadySet && different) {
-    emit newMessage("RTCM3coDecoder: Provider Changed: " + _staID.toLatin1(), true);
+    emit newMessage("RTCM3coDecoder: Provider Changed " +  newProviderIDStr.toLatin1() + _staID.toLatin1(), true);
     emit providerIDChanged(_staID);
   }
@@ -657,6 +659,11 @@
   }
   else if (epoSecGlo != -1) {
+    QDate date = dateAndTimeFromGPSweek(currentTime.gpsw(), currentTime.gpssec()).date();
+    if (_type == IGSssr) {
+      if (epoSecGPS != -1 && epoSecGPS != epoSecGlo) {// should be not done in case of an IGS-SSR encoding error => line has to be deleted
+        epoSecGlo = epoSecGlo + gnumleap(date.year(), date.month(), date.day());
+      }
+    }
     if (_type == RTCMssr) {
-      QDate date = dateAndTimeFromGPSweek(currentTime.gpsw(), currentTime.gpssec()).date();
       epoSecGlo = epoSecGlo - 3 * 3600 + gnumleap(date.year(), date.month(), date.day());
     }
@@ -673,4 +680,12 @@
   }
   else if (epoSecBds != -1) {
+    if (_type == IGSssr) {
+      if (epoSecGPS != -1 && epoSecGPS != epoSecBds) {// should be not done in case of an IGS-SSR encoding error => line has to be deleted
+        epoSecBds += 14.0;
+        if (epoSecBds > 604800.0) {
+          epoSecBds -= 7.0*24.0*60.0*60.0;
+        }
+      }
+    }//  line has to be deleted
     if (_type == RTCMssr) {
       epoSecBds += 14.0;
Index: trunk/BNC/src/RTCM3/bits.h
===================================================================
--- trunk/BNC/src/RTCM3/bits.h	(revision 10533)
+++ trunk/BNC/src/RTCM3/bits.h	(revision 10534)
@@ -110,3 +110,121 @@
 }
 
+#define STARTDATA \
+  size_t ressize=0; \
+  char *blockstart=0; \
+  int numbits=0; \
+  uint64_t bitbuffer=0;
+
+
+#define STOREBITS \
+  while(numbits >= 8) { \
+    if(!size) return 0; \
+    *(buffer++) = bitbuffer>>(numbits-8); \
+    numbits -= 8; \
+    ++ressize; \
+    --size; \
+  }
+
+#define ADDBITS(a, b) { \
+    bitbuffer = (bitbuffer<<(a))|((b)&((1<<a)-1)); \
+    numbits += (a); \
+    STOREBITS \
+  }
+
+
+#define INITBLOCK \
+  numbits = 0; \
+  blockstart = buffer; \
+  ADDBITS(8, 0xD3) \
+  ADDBITS(6, 0) \
+  ADDBITS(10, 0)
+
+#define ENDBLOCK \
+  if(numbits) { ADDBITS((8-numbits), 0) } { \
+    int len = buffer-blockstart-3; \
+    blockstart[1] |= len>>8; \
+    blockstart[2] = len; \
+    if(len > 1023) \
+      return 0; \
+    len = CRC24(len+3, (const unsigned char *) blockstart); \
+    ADDBITS(24, len) \
+  }
+
+#define SCALEADDBITS(a, b, c) ADDBITS(a, (int64_t)(c > 0 ? b*c+0.5 : b*c-0.5))
+
+// RTCM3 GPS EPH encoding
+//////////////////////////////////////////////////////////
+#define GPSTOINT(type, value) static_cast<type>(round(value))
+
+#define GPSADDBITS(a, b) {bitbuffer = (bitbuffer<<(a)) \
+                       |(GPSTOINT(long long,b)&((1ULL<<a)-1)); \
+                       numbits += (a); \
+                       while(numbits >= 8) { \
+                       buffer[size++] = bitbuffer>>(numbits-8);numbits -= 8;}}
+
+#define GPSADDBITSFLOAT(a,b,c) {long long i = GPSTOINT(long long,(b)/(c)); \
+                             GPSADDBITS(a,i)};
+
+// RTCM3 GLONASS EPH encoding
+//////////////////////////////////////////////////////////
+#define GLONASSTOINT(type, value) static_cast<type>(round(value))
+
+#define GLONASSADDBITS(a, b) {bitbuffer = (bitbuffer<<(a)) \
+                       |(GLONASSTOINT(long long,b)&((1ULL<<(a))-1)); \
+                       numbits += (a); \
+                       while(numbits >= 8) { \
+                       buffer[size++] = bitbuffer>>(numbits-8);numbits -= 8;}}
+
+#define GLONASSADDBITSFLOATM(a,b,c) {int s; long long i; \
+                       if(b < 0.0) \
+                       { \
+                         s = 1; \
+                         i = GLONASSTOINT(long long,(-b)/(c)); \
+                         if(!i) s = 0; \
+                       } \
+                       else \
+                       { \
+                         s = 0; \
+                         i = GLONASSTOINT(long long,(b)/(c)); \
+                       } \
+                       GLONASSADDBITS(1,s) \
+                       GLONASSADDBITS(a-1,i)}
+
+// RTCM3 Galileo EPH encoding
+//////////////////////////////////////////////////////////
+#define GALILEOTOINT(type, value) static_cast<type>(round(value))
+
+#define GALILEOADDBITS(a, b) {bitbuffer = (bitbuffer<<(a)) \
+                       |(GALILEOTOINT(long long,b)&((1LL<<a)-1)); \
+                       numbits += (a); \
+                       while(numbits >= 8) { \
+                       buffer[size++] = bitbuffer>>(numbits-8);numbits -= 8;}}
+
+#define GALILEOADDBITSFLOAT(a,b,c) {long long i = GALILEOTOINT(long long,(b)/(c)); \
+                             GALILEOADDBITS(a,i)};
+
+// RTCM3 BDS EPH encoding
+//////////////////////////////////////////////////////////
+#define BDSTOINT(type, value) static_cast<type>(round(value))
+
+#define BDSADDBITS(a, b) {bitbuffer = (bitbuffer<<(a)) \
+                       |(BDSTOINT(long long,b)&((1ULL<<a)-1)); \
+                       numbits += (a); \
+                       while(numbits >= 8) { \
+                       buffer[size++] = bitbuffer>>(numbits-8);numbits -= 8;}}
+
+#define BDSADDBITSFLOAT(a,b,c) {long long i = BDSTOINT(long long,(b)/(c)); \
+                             BDSADDBITS(a,i)};
+
+// RTCM3 SBAS EPH encoding
+//////////////////////////////////////////////////////////
+#define SBASTOINT(type, value) static_cast<type>(round(value))
+#define SBASADDBITS(a, b) {bitbuffer = (bitbuffer<<(a)) \
+                       |(SBASTOINT(long long,b)&((1ULL<<a)-1)); \
+                       numbits += (a); \
+                       while(numbits >= 8) { \
+                       buffer[size++] = bitbuffer>>(numbits-8);numbits -= 8;}}
+#define SBASADDBITSFLOAT(a,b,c) {long long i = SBASTOINT(long long,(b)/(c)); \
+                             SBASADDBITS(a,i)};
+
 #endif /* BITS_H */
Index: trunk/BNC/src/RTCM3/crs.h
===================================================================
--- trunk/BNC/src/RTCM3/crs.h	(revision 10534)
+++ trunk/BNC/src/RTCM3/crs.h	(revision 10534)
@@ -0,0 +1,195 @@
+/*
+ * crs.h
+ *
+ *  Created on: Jun 18, 2024
+ *      Author: stuerze
+ */
+
+#ifndef SRC_RTCM3_CRS_H_
+#define SRC_RTCM3_CRS_H_
+
+#include <cstring>
+#include <iostream>
+#include <iomanip>
+using namespace std;
+
+ class t_serviceCrs {
+  public:
+  t_serviceCrs() {
+    _coordinateEpoch = 0;
+    _CE              = 0;
+  }
+  ~t_serviceCrs() {
+    clear();
+  }
+  void clear(void) {
+    memset(_name, '\0', 31 * sizeof(char));
+    _coordinateEpoch = 0;
+    _CE              = 0;
+  }
+  void print() {
+    cout << "=============" << endl;
+      cout << "service Crs" << endl;
+      cout << "=============" << endl;
+      cout << QString("%1").arg(_name).toStdString().c_str() << endl;
+      cout << "_coordinateEpoch: " << _coordinateEpoch << endl;
+      cout << "_CE: " << _CE << endl;
+    }
+    void setCoordinateEpochFromCE() {(!_CE) ? _coordinateEpoch = 0.0 : _coordinateEpoch = 1900 + _CE; }
+    void setCEFromCoordinateEpoch() {(!_coordinateEpoch) ? _CE = 0 : _CE = _coordinateEpoch -1900; }
+    char     _name[31];
+    double   _coordinateEpoch;
+    double   _CE;
+  };
+
+
+ class t_rtcmCrs {
+  public:
+    t_rtcmCrs() {
+      _anchor = 0;
+      _plateNumber = 0;
+    }
+
+    ~t_rtcmCrs() {
+      clear();
+    }
+    void clear() {
+      memset(_name, '\0', 31 * sizeof(char));
+      _anchor = 0;
+      _plateNumber = 0;
+      _databaseLinks.clear();
+    }
+    void print() {
+      cout << "=============" << endl;
+      cout << "rtcm Crs" << endl;
+      cout << "=============" << endl;
+      cout << QString("%1").arg(_name).toStdString().c_str() << endl;
+      cout << "_anchor: " << _anchor << endl;
+      cout << "_plateNumber: " << _plateNumber << endl;
+      for (int i = 0; i<_databaseLinks.size(); i++){
+        cout << _databaseLinks[i].toStdString() << endl;
+      }
+    }
+    char             _name[31];
+    int              _anchor;           // 0.. global CRS (=> Plate number 0), 1.. plate-fixed CRS
+    int              _plateNumber;      // 0.. unknown, 7.. Eurasia
+    QStringList      _databaseLinks;
+  };
+
+ class t_helmertPar {
+   public:
+     t_helmertPar() {
+       _sysIdentNum = 0;
+       _utilTrafoMessageIndicator = 0;
+       _t0  = 0;
+       _dx  = 0.0;
+       _dy  = 0.0;
+       _dz  = 0.0;
+       _dxr = 0.0;
+       _dyr = 0.0;
+       _dzr = 0.0;
+       _ox  = 0.0;
+       _oy  = 0.0;
+       _oz  = 0.0;
+       _oxr = 0.0;
+       _oyr = 0.0;
+       _ozr = 0.0;
+       _sc  = 0.0;
+       _scr = 0.0;
+     }
+
+     QString IndtoString() {
+       int ind = _utilTrafoMessageIndicator;
+       QString str = "";
+       if (!ind) {
+          str += " not utillized";
+          return str;
+       }
+       // Bit 0
+       if (ind & (1<<0)) {
+         str += "MT1023 ";
+       }
+       // Bit 1
+       if (ind & (1<<1)) {
+         str += "MT1024 ";
+       }
+       // Bit 2
+       if (ind & (1<<2)) {
+         str += "MT1025 ";
+       }
+       // Bit 3
+       if (ind & (1<<3)) {
+         str += "MT1026 ";
+       }
+       // Bit 4
+       if (ind & (1<<4)) {
+         str += "MT1027 ";
+       }
+       // 5 -9
+       if (!(ind & (1<<5)) &&
+           !(ind & (1<<6)) &&
+           !(ind & (1<<7)) &&
+           !(ind & (1<<8)) &&
+           !(ind & (1<<9))) {
+         str += "(and Bit 5-9 is reserved => zero)";
+       }
+       return str;
+     }
+     bool operator==(const t_helmertPar& helmertPar1) const {
+        if (strncmp(_sourceName,  helmertPar1._sourceName, strlen(_sourceName)) == 0 &&
+            strncmp(_targetName,  helmertPar1._targetName, strlen(_targetName)) == 0 &&
+            _sysIdentNum == helmertPar1._sysIdentNum &&
+            _t0 == helmertPar1._t0) {
+          return true;
+        }
+        else {
+          return false;
+        }
+     }
+     void print() {
+       cout << "MT 1301: " << endl;
+       cout << "_sourceName:                " << _sourceName << endl;
+       cout << "_targetName:                " << _targetName << endl;
+       cout << "_sysIdentNum:               " << _sysIdentNum << endl;
+       cout << "_utilTrafoMessageIndicator: " << IndtoString().toStdString().c_str() << endl;
+       bncTime t; t.setmjd(0, _t0);
+       cout << "_t0   :                     " << "MJD " << _t0  << " (" << t.datestr() << ")" << endl;
+       cout <<setw(10) << setprecision(5) << "_dx   :                     " <<  _dx  << endl;
+       cout <<setw(10) << setprecision(5) << "_dy   :                     " <<  _dy  << endl;
+       cout <<setw(10) << setprecision(5) << "_dz   :                     " <<  _dz  << endl;
+       cout <<setw(10) << setprecision(7) << "_dxr  :                     " <<  _dxr << endl;
+       cout <<setw(10) << setprecision(7) << "_dyr  :                     " <<  _dyr << endl;
+       cout <<setw(10) << setprecision(7) << "_dzr  :                     " <<  _dzr << endl;
+       cout <<setw(10) << setprecision(5) << "_ox   :                     " <<  _ox  << endl;
+       cout <<setw(10) << setprecision(5) << "_oy   :                     " <<  _oy  << endl;
+       cout <<setw(10) << setprecision(5) << "_oz   :                     " <<  _oz  << endl;
+       cout <<setw(10) << setprecision(7) << "_oxr  :                     " <<  _oxr << endl;
+       cout <<setw(10) << setprecision(7) << "_oyr  :                     " <<  _oyr << endl;
+       cout <<setw(10) << setprecision(7) << "_ozr  :                     " <<  _ozr << endl;
+       cout <<setw(10) << setprecision(5) << "_sc   :                     " <<  _sc  << endl;
+       cout <<setw(10) << setprecision(7) << "_scr  :                     " <<  _scr << endl;
+       cout << endl;
+     }
+     char           _sourceName[31];
+     char           _targetName[31];
+     int            _sysIdentNum;
+     int            _utilTrafoMessageIndicator;
+     int            _t0;  // reference epoch
+     double         _dx;  // translation in x
+     double         _dy;  // translation in y
+     double         _dz;  // translation in z
+     double         _dxr; // translation rate in x
+     double         _dyr; // translation rate in y
+     double         _dzr; // translation rate in z
+     double         _ox;  // rotation in x
+     double         _oy;  // rotation in y
+     double         _oz;  // rotation in z
+     double         _oxr; // rotation rate in x
+     double         _oyr; // rotation rate in y
+     double         _ozr; // rotation rate in zssss
+     double         _sc;  // scale
+     double         _scr; // scale rate
+   };
+
+
+#endif /* SRC_RTCM3_CRS_H_ */
Index: trunk/BNC/src/RTCM3/crsEncoder.cpp
===================================================================
--- trunk/BNC/src/RTCM3/crsEncoder.cpp	(revision 10534)
+++ trunk/BNC/src/RTCM3/crsEncoder.cpp	(revision 10534)
@@ -0,0 +1,71 @@
+/*
+ * crsEncoder.cpp
+ *
+ *  Created on: Jun 18, 2024
+ *      Author: stuerze
+ */
+
+
+#include "crsEncoder.h"
+
+using namespace std;
+
+// build up RTCM3 for serviceCrs
+////////////////////////////////////////////////////////////////////////////
+int t_crsEncoder::RTCM3(const t_serviceCrs& serviceCrs, char *buffer, size_t size) {
+  STARTDATA
+  INITBLOCK
+  ADDBITS(12, 1300)
+  int N = sizeof(serviceCrs._name) / sizeof(serviceCrs._name[0]);
+  if (N > 31) {N = 31;}
+  ADDBITS(5, N)
+  for(int i = 0; i < N; i++) {
+    ADDBITS(8, serviceCrs._name[i])
+  }
+  SCALEADDBITS(16, 100, serviceCrs._CE)
+  ENDBLOCK
+  return ressize;
+}
+
+// build up RTCM3 for rtcmCrs
+////////////////////////////////////////////////////////////////////////////
+int t_crsEncoder::RTCM3(const t_rtcmCrs& rtcmCrs, char *buffer, size_t size) {
+  STARTDATA
+    INITBLOCK
+
+  ADDBITS(12, 1302)
+  int N = sizeof(rtcmCrs._name) / sizeof(rtcmCrs._name[0]);
+  if (N > 31) {N = 31;}
+  ADDBITS(5, N)
+  for(int i = 0; i < N; i++) {
+    ADDBITS(8, rtcmCrs._name[i])
+  }
+  ADDBITS(1, rtcmCrs._anchor)
+  ADDBITS(5, rtcmCrs._plateNumber)
+  int dblinknum = rtcmCrs._databaseLinks.size();
+  ADDBITS(3, dblinknum);
+  if (dblinknum) {
+    for(int d = 0; d < dblinknum; d++) {
+      N = sizeof(rtcmCrs._databaseLinks[d]) / sizeof(rtcmCrs._databaseLinks[d][0]);
+      for(int i = 0; i < N; i++) {
+        ADDBITS(8, rtcmCrs._databaseLinks[d].toLatin1()[i])
+      }
+    }
+  }
+  ENDBLOCK
+  return ressize;
+}
+
+// build up RTCM3 for
+////////////////////////////////////////////////////////////////////////////
+int t_crsEncoder::RTCM3(const t_helmertPar&  helmertPar, char *buffer, size_t size) {
+
+  STARTDATA
+    INITBLOCK
+
+  ADDBITS(12, 1301)
+
+  ENDBLOCK
+  return ressize;
+}
+
Index: trunk/BNC/src/RTCM3/crsEncoder.h
===================================================================
--- trunk/BNC/src/RTCM3/crsEncoder.h	(revision 10534)
+++ trunk/BNC/src/RTCM3/crsEncoder.h	(revision 10534)
@@ -0,0 +1,27 @@
+/*
+ * crsEncoder.h
+ *
+ *  Created on: Jun 18, 2024
+ *      Author: stuerze
+ */
+
+#ifndef SRC_RTCM3_CRSENCODER_H_
+#define SRC_RTCM3_CRSENCODER_H_
+
+#include <QString>
+#include <QStringList>
+#include "bncutils.h"
+#include "crs.h"
+#include "bits.h"
+
+
+
+class t_crsEncoder {
+ public:
+  static int RTCM3(const t_serviceCrs&  serviceCrs, char *buffer, size_t size);
+  static int RTCM3(const t_rtcmCrs& rtcmCrs, char *buffer, size_t size);
+  static int RTCM3(const t_helmertPar&  helmertPar, char *buffer, size_t size);
+};
+
+
+#endif /* SRC_RTCM3_CRSENCODER_H_ */
Index: trunk/BNC/src/RTCM3/ephEncoder.h
===================================================================
--- trunk/BNC/src/RTCM3/ephEncoder.h	(revision 10533)
+++ trunk/BNC/src/RTCM3/ephEncoder.h	(revision 10534)
@@ -4,4 +4,5 @@
 #include "ephemeris.h"
 #include "bncutils.h"
+#include "bits.h"
 
 class t_ephEncoder {
