Index: trunk/BNS/bns.pro
===================================================================
--- trunk/BNS/bns.pro	(revision 1770)
+++ trunk/BNS/bns.pro	(revision 1771)
@@ -28,5 +28,6 @@
 HEADERS =             bns.h   bnswindow.h   bnshlpdlg.h   bnshtml.h   \
           bnseph.h    bnsutils.h bnsrinex.h bnssp3.h bnsoutf.h        \
-          bnscaster.h RTCM/clock_orbit_rtcm.h bnssettings.h bnsapp.h
+          bnscaster.h RTCM/clock_orbit_rtcm.h bnssettings.h bnsapp.h  \
+          bnscustomtrafo.h
 
 HEADERS += newmat/controlw.h newmat/include.h newmat/myexcept.h  \
@@ -36,5 +37,5 @@
 SOURCES = bnsmain.cpp bns.cpp bnswindow.cpp bnshlpdlg.cpp bnshtml.cpp  \
           bnseph.cpp  bnsutils.cpp bnsrinex.cpp bnssp3.cpp bnsoutf.cpp \
-          bnscaster.cpp bnssettings.cpp bnsapp.cpp                     \
+          bnscaster.cpp bnssettings.cpp bnsapp.cpp bnscustomtrafo.cpp  \
           RTCM/clock_orbit_rtcm.c
 
Index: trunk/BNS/bnscustomtrafo.cpp
===================================================================
--- trunk/BNS/bnscustomtrafo.cpp	(revision 1771)
+++ trunk/BNS/bnscustomtrafo.cpp	(revision 1771)
@@ -0,0 +1,203 @@
+/* -------------------------------------------------------------------------
+ * BKG NTRIP Server
+ * -------------------------------------------------------------------------
+ *
+ * Class:      bnscustomtrafo
+ *
+ * Purpose:    This class sets Helmert Transformation Parameters
+ *
+ * Author:     G. Weber
+ *
+ * Created:    22-Mar-2009
+ *
+ * Changes:
+ *
+ * -----------------------------------------------------------------------*/
+
+#include "bnscustomtrafo.h"
+#include "bnssettings.h"
+
+using namespace std;
+
+// Constructor
+////////////////////////////////////////////////////////////////////////////
+bnsCustomTrafo::bnsCustomTrafo(QWidget* parent) : QDialog(parent) {
+
+  setMinimumSize(400,150);
+  QVBoxLayout* mainLayout = new QVBoxLayout(this);
+  QGridLayout* editLayout = new QGridLayout;
+
+  setWindowTitle(tr("Custom Transformation Parameters"));
+
+ bnsSettings settings;
+
+ _dxLineEdit = new QLineEdit(settings.value("dx").toString());
+ _dyLineEdit = new QLineEdit(settings.value("dy").toString());
+ _dzLineEdit = new QLineEdit(settings.value("dz").toString());
+ _dxrLineEdit = new QLineEdit(settings.value("dxr").toString());
+ _dyrLineEdit = new QLineEdit(settings.value("dyr").toString());
+ _dzrLineEdit = new QLineEdit(settings.value("dzr").toString());
+ _oxLineEdit = new QLineEdit(settings.value("ox").toString());
+ _oyLineEdit = new QLineEdit(settings.value("oy").toString());
+ _ozLineEdit = new QLineEdit(settings.value("oz").toString());
+ _oxrLineEdit = new QLineEdit(settings.value("oxr").toString());
+ _oyrLineEdit = new QLineEdit(settings.value("oyr").toString());
+ _ozrLineEdit = new QLineEdit(settings.value("ozr").toString());
+ _scLineEdit = new QLineEdit(settings.value("sc").toString());
+ _scrLineEdit = new QLineEdit(settings.value("scr").toString());
+ _t0LineEdit = new QLineEdit(settings.value("t0").toString());
+
+  // WhatsThis
+  // ---------
+  _dxLineEdit->setWhatsThis(tr("<p>Set translation in X at epoch t0.</p>"));
+  _dyLineEdit->setWhatsThis(tr("<p>Set translation in Y at epoch t0.</p>"));
+  _dzLineEdit->setWhatsThis(tr("<p>Set translation in Z at epoch t0.</p>"));
+  _dxrLineEdit->setWhatsThis(tr("<p>Set translation rate in X.</p>"));
+  _dyrLineEdit->setWhatsThis(tr("<p>Set translation rate in Y.</p>"));
+  _dzrLineEdit->setWhatsThis(tr("<p>Set translation rate in Z.</p>"));
+  _oxLineEdit->setWhatsThis(tr("<p>Set rotation in X at epoch t0.</p>"));
+  _oyLineEdit->setWhatsThis(tr("<p>Set rotation in Y at epoch t0.</p>"));
+  _ozLineEdit->setWhatsThis(tr("<p>Set rotation in Z at epoch t0.</p>"));
+  _oxrLineEdit->setWhatsThis(tr("<p>Set rotation rate in X.</p>"));
+  _oyrLineEdit->setWhatsThis(tr("<p>Set rotation rate in Y.</p>"));
+  _ozrLineEdit->setWhatsThis(tr("<p>Set rotation rate in Z.</p>"));
+  _scLineEdit->setWhatsThis(tr("<p>Set scale at epoch t0.</p>"));
+  _scrLineEdit->setWhatsThis(tr("<p>Set scale rate.</p>"));
+  _t0LineEdit->setWhatsThis(tr("<p>Set reference epoch e.g. 2000.0</p>"));
+
+  int ww = QFontMetrics(font()).width('w');
+  _dxLineEdit->setMaximumWidth(9*ww);
+  _dyLineEdit->setMaximumWidth(9*ww);
+  _dzLineEdit->setMaximumWidth(9*ww);
+  _dxrLineEdit->setMaximumWidth(9*ww);
+  _dyrLineEdit->setMaximumWidth(9*ww);
+  _dzrLineEdit->setMaximumWidth(9*ww);
+  _oxLineEdit->setMaximumWidth(9*ww);
+  _oyLineEdit->setMaximumWidth(9*ww);
+  _ozLineEdit->setMaximumWidth(9*ww);
+  _oxrLineEdit->setMaximumWidth(9*ww);
+  _oyrLineEdit->setMaximumWidth(9*ww);
+  _ozrLineEdit->setMaximumWidth(9*ww);
+  _scLineEdit->setMaximumWidth(9*ww);
+  _scrLineEdit->setMaximumWidth(9*ww);
+  _t0LineEdit->setMaximumWidth(9*ww);
+
+  editLayout->addWidget(new QLabel(tr("dX(t0) [m]")),     0, 0, Qt::AlignRight);
+  editLayout->addWidget(_dxLineEdit,                      0, 1);
+  editLayout->addWidget(new QLabel(tr("dY(t0) [m]")),     0, 2, Qt::AlignRight);
+  editLayout->addWidget(_dyLineEdit,                      0, 3);
+  editLayout->addWidget(new QLabel(tr("dZ(t0) [m]")),     0, 4, Qt::AlignRight);
+  editLayout->addWidget(_dzLineEdit,                      0, 5);
+  editLayout->addWidget(new QLabel(tr("dXr [m/y]")),      1, 0, Qt::AlignRight);
+  editLayout->addWidget(_dxrLineEdit,                     1, 1);
+  editLayout->addWidget(new QLabel(tr("dYr [m/y]")),      1, 2, Qt::AlignRight);
+  editLayout->addWidget(_dyrLineEdit,                     1, 3);
+  editLayout->addWidget(new QLabel(tr("dZr [m/y]")),      1, 4, Qt::AlignRight);
+  editLayout->addWidget(_dzrLineEdit,                     1, 5);
+  editLayout->addWidget(new QLabel(tr("   oX(t0) [mas]")),2, 0, Qt::AlignRight);
+  editLayout->addWidget(_oxLineEdit,                      2, 1);
+  editLayout->addWidget(new QLabel(tr("   oY(t0) [mas]")),2, 2, Qt::AlignRight);
+  editLayout->addWidget(_oyLineEdit,                      2, 3);
+  editLayout->addWidget(new QLabel(tr("   oZ(t0) [mas]")),2, 4, Qt::AlignRight);
+  editLayout->addWidget(_ozLineEdit,                      2, 5);
+  editLayout->addWidget(new QLabel(tr("oXr [mas/y]")),    3, 0, Qt::AlignRight);
+  editLayout->addWidget(_oxrLineEdit,                     3, 1);
+  editLayout->addWidget(new QLabel(tr("oYr [mas/y]")),    3, 2, Qt::AlignRight);
+  editLayout->addWidget(_oyrLineEdit,                     3, 3);
+  editLayout->addWidget(new QLabel(tr("oZr [mas/y]")),    3, 4, Qt::AlignRight);
+  editLayout->addWidget(_ozrLineEdit,                     3, 5);
+  editLayout->addWidget(new QLabel(tr("S(t0) [10^-9]")),    4, 0, Qt::AlignRight);
+  editLayout->addWidget(_scLineEdit,                      4, 1);
+  editLayout->addWidget(new QLabel(tr("Sr [10^-9/y]")),     4, 2, Qt::AlignRight);
+  editLayout->addWidget(_scrLineEdit,                     4, 3);
+  editLayout->addWidget(new QLabel(tr("t0 [y]")),         4, 4, Qt::AlignRight);
+  editLayout->addWidget(_t0LineEdit,                      4, 5);
+  editLayout->addWidget(new QLabel("Specify up to 14 Helmert Transformation Parameters for transformation from IGS05"), 5, 0, 1, 6, Qt::AlignCenter);
+  editLayout->addWidget(new QLabel("into target reference system."), 6, 0, 1, 6, Qt::AlignCenter);
+
+  mainLayout->addLayout(editLayout);
+
+  _buttonWhatsThis = new QPushButton(tr("Help=Shift+F1"), this);
+  connect(_buttonWhatsThis, SIGNAL(clicked()), this, SLOT(slotWhatsThis()));
+ 
+  _buttonCancel = new QPushButton(tr("Cancel"), this);
+  connect(_buttonCancel, SIGNAL(clicked()), this, SLOT(reject()));
+
+  _buttonOK = new QPushButton(tr("OK"), this);
+  connect(_buttonOK, SIGNAL(clicked()), this, SLOT(accept()));
+
+  _buttonOK->setDefault(true);
+
+  QHBoxLayout* buttonLayout = new QHBoxLayout;
+
+  buttonLayout->addWidget(_buttonWhatsThis);
+  buttonLayout->addStretch(1);
+  buttonLayout->addWidget(_buttonCancel);
+  buttonLayout->addWidget(_buttonOK);
+
+  mainLayout->addLayout(buttonLayout);
+}
+
+// Destructor
+////////////////////////////////////////////////////////////////////////////
+bnsCustomTrafo::~bnsCustomTrafo() {
+  delete _buttonCancel;
+  delete _buttonOK;
+  delete _buttonWhatsThis;
+}
+
+// Accept slot
+////////////////////////////////////////////////////////////////////////////
+void bnsCustomTrafo::accept() {
+
+  QStringList* mountPoints = new QStringList;
+
+  if ( !_dxLineEdit->text().isEmpty()  &&
+       !_dyLineEdit->text().isEmpty()  &&
+       !_dzLineEdit->text().isEmpty()  &&
+       !_dxrLineEdit->text().isEmpty() &&
+       !_dyrLineEdit->text().isEmpty() &&
+       !_dzrLineEdit->text().isEmpty() &&
+       !_oxLineEdit->text().isEmpty()  &&
+       !_oyLineEdit->text().isEmpty()  &&
+       !_ozLineEdit->text().isEmpty()  &&
+       !_oxrLineEdit->text().isEmpty() &&
+       !_oyrLineEdit->text().isEmpty() &&
+       !_ozrLineEdit->text().isEmpty() &&
+       !_scLineEdit->text().isEmpty()  &&
+       !_scrLineEdit->text().isEmpty() &&
+       !_t0LineEdit->text().isEmpty() ) {
+
+    bnsSettings settings;
+    settings.setValue("dx",   _dxLineEdit->text());
+    settings.setValue("dy",   _dyLineEdit->text());
+    settings.setValue("dz",   _dzLineEdit->text());
+    settings.setValue("dxr",  _dxrLineEdit->text());
+    settings.setValue("dyr",  _dyrLineEdit->text());
+    settings.setValue("dzr",  _dzrLineEdit->text());
+    settings.setValue("ox",   _oxLineEdit->text());
+    settings.setValue("oy",   _oyLineEdit->text());
+    settings.setValue("oz",   _ozLineEdit->text());
+    settings.setValue("oxr",  _oxrLineEdit->text());
+    settings.setValue("oyr",  _oyrLineEdit->text());
+    settings.setValue("ozr",  _ozrLineEdit->text());
+    settings.setValue("sc",   _scLineEdit->text());
+    settings.setValue("scr",  _scrLineEdit->text());
+    settings.setValue("t0",   _t0LineEdit->text());
+
+  } else {
+   QMessageBox::warning(this, tr("Warning"),
+                               tr("Incomplete settings"),
+                               QMessageBox::Ok);
+  }
+
+  emit newMountPoints(mountPoints);
+
+  QDialog::accept();
+}
+
+// Whats This Help
+void bnsCustomTrafo::slotWhatsThis() {
+QWhatsThis::enterWhatsThisMode();
+}
+
Index: trunk/BNS/bnscustomtrafo.h
===================================================================
--- trunk/BNS/bnscustomtrafo.h	(revision 1771)
+++ trunk/BNS/bnscustomtrafo.h	(revision 1771)
@@ -0,0 +1,45 @@
+#ifndef BNSCUSTOMTRAFO_H
+#define BNSCUSTOMTRAFO_H
+
+#include <QtCore>
+#include <QtGui>
+#include <QWhatsThis>
+
+class bnsCustomTrafo : public QDialog {
+  Q_OBJECT
+
+  public:
+    bnsCustomTrafo(QWidget* parent);
+    ~bnsCustomTrafo();
+
+  signals:
+    void newMountPoints(QStringList* mountPoints);
+
+  private slots:
+    virtual void accept();
+    void slotWhatsThis();
+
+  private:
+    QLineEdit*   _dxLineEdit;
+    QLineEdit*   _dyLineEdit;
+    QLineEdit*   _dzLineEdit;
+    QLineEdit*   _dxrLineEdit;
+    QLineEdit*   _dyrLineEdit;
+    QLineEdit*   _dzrLineEdit;
+    QLineEdit*   _oxLineEdit;
+    QLineEdit*   _oyLineEdit;
+    QLineEdit*   _ozLineEdit;
+    QLineEdit*   _oxrLineEdit;
+    QLineEdit*   _oyrLineEdit;
+    QLineEdit*   _ozrLineEdit;
+    QLineEdit*   _scLineEdit;
+    QLineEdit*   _scrLineEdit;
+    QLineEdit*   _t0LineEdit;
+
+    QPushButton* _buttonGet;
+    QPushButton* _buttonCancel;
+    QPushButton* _buttonOK;
+    QPushButton* _buttonWhatsThis;
+};
+
+#endif
Index: trunk/BNS/bnshelp.html
===================================================================
--- trunk/BNS/bnshelp.html	(revision 1770)
+++ trunk/BNS/bnshelp.html	(revision 1771)
@@ -338,5 +338,6 @@
 <ul>
 <li>IGS05 which stands for the GNSS-based IGS realization of the International Terrestrial Reference Frame 2005 (ITRF2005), and</li>
-<li>ETRF2000 which stands for the European Terestrial Reference Frame 2000 adopted by EUREF.</li>
+<li>ETRF2000 which stands for the European Terestrial Reference Frame 2000 adopted by EUREF, and</li>
+<li>'Custom' which allows a transformation of Broadcast Corrections from the IGS05 system to any other system through specifying up to 14 Helmert Transformation Parameters.</li>
 </ul>
 </p>
@@ -368,6 +369,6 @@
 </p>
 <p>
-Contact [igs-ip@bkg.bund.de] if you would like to see further Helmert transformation parameters implemented in BNS to support other national or regional reference system.
-<p>
+<u>Custom:</u> The default numbers shown as an example are those for a transformation from ITRF2005 to ETRF2000'.
+</p>
 
 
Index: trunk/BNS/bnssettings.cpp
===================================================================
--- trunk/BNS/bnssettings.cpp	(revision 1770)
+++ trunk/BNS/bnssettings.cpp	(revision 1771)
@@ -62,4 +62,20 @@
     setValue("outFile_3",   "");
 
+    setValue("dx",    "0.0541");
+    setValue("dy",    "0.0502");
+    setValue("dz",   "-0.0538");
+    setValue("dxr",  "-0.0002");
+    setValue("dyr",   "0.0001");
+    setValue("dzr",  "-0.0018");
+    setValue("ox",     "0.891");
+    setValue("oy",     "5.390");
+    setValue("oz",    "-8.712");
+    setValue("oxr",    "0.081");
+    setValue("oyr",    "0.490");
+    setValue("ozr",   "-0.792");
+    setValue("sc",      "0.40");
+    setValue("scr",     "0.08");
+    setValue("t0",    "2000.0");
+
     setValue("rnxPath",     "");
     setValue("rnxIntr",     "1 min");
Index: trunk/BNS/bnswindow.cpp
===================================================================
--- trunk/BNS/bnswindow.cpp	(revision 1770)
+++ trunk/BNS/bnswindow.cpp	(revision 1771)
@@ -21,4 +21,5 @@
 #include "bnshlpdlg.h" 
 #include "bnssettings.h" 
+#include "bnscustomtrafo.h" 
 
 using namespace std;
@@ -178,5 +179,5 @@
   _refSys_1_ComboBox = new QComboBox;
   _refSys_1_ComboBox->setEditable(false);
-  _refSys_1_ComboBox->addItems(QString("IGS05,ETRF2000").split(","));
+  _refSys_1_ComboBox->addItems(QString("IGS05,ETRF2000,Custom").split(","));
   int ii = _refSys_1_ComboBox->findText(settings.value("refSys_1").toString());
   if (ii != -1) {
@@ -196,5 +197,5 @@
   _refSys_2_ComboBox = new QComboBox;
   _refSys_2_ComboBox->setEditable(false);
-  _refSys_2_ComboBox->addItems(QString("IGS05,ETRF2000").split(","));
+  _refSys_2_ComboBox->addItems(QString("IGS05,ETRF2000,Custom").split(","));
   ii = _refSys_2_ComboBox->findText(settings.value("refSys_2").toString());
   if (ii != -1) {
@@ -214,5 +215,5 @@
   _refSys_3_ComboBox = new QComboBox;
   _refSys_3_ComboBox->setEditable(false);
-  _refSys_3_ComboBox->addItems(QString("IGS05,ETRF2000").split(","));
+  _refSys_3_ComboBox->addItems(QString("IGS05,ETRF2000,Custom").split(","));
   ii = _refSys_3_ComboBox->findText(settings.value("refSys_3").toString());
   if (ii != -1) {
@@ -437,5 +438,6 @@
 
   tab_cas1->setLayout(layout_cas1);
-
+  connect(_refSys_1_ComboBox, SIGNAL(currentIndexChanged(const QString &)),
+          this, SLOT(customTrafo(const QString)));
   connect(_outHost_1_LineEdit, SIGNAL(textChanged(const QString &)),
           this, SLOT(bnsText(const QString &)));
@@ -488,5 +490,6 @@
 
   tab_cas2->setLayout(layout_cas2);
-
+  connect(_refSys_2_ComboBox, SIGNAL(currentIndexChanged(const QString &)),
+          this, SLOT(customTrafo(const QString)));
   connect(_outHost_2_LineEdit, SIGNAL(textChanged(const QString &)),
           this, SLOT(bnsText(const QString &)));
@@ -539,5 +542,6 @@
 
   tab_cas3->setLayout(layout_cas3);
-
+  connect(_refSys_3_ComboBox, SIGNAL(currentIndexChanged(const QString &)),
+          this, SLOT(customTrafo(const QString)));
   connect(_outHost_3_LineEdit, SIGNAL(textChanged(const QString &)),
           this, SLOT(bnsText(const QString &)));
@@ -814,5 +818,4 @@
   settings.setValue("outFile_3",   _outFile_3_LineEdit->text());
   settings.setValue("beClocks3",   _beClocks2CheckBox->checkState());
-
   settings.setValue("rnxPath",     _rnxPathLineEdit->text());
   settings.setValue("rnxIntr",     _rnxIntrComboBox->currentText());
@@ -954,8 +957,10 @@
     _ephPortLineEdit->setStyleSheet("background-color: white");
     _ephEchoLineEdit->setStyleSheet("background-color: white");
+    _ephPortLineEdit->setEnabled(true);
     _ephEchoLineEdit->setEnabled(true);
     } else {
     _ephPortLineEdit->setStyleSheet("background-color: lightGray");
     _ephEchoLineEdit->setStyleSheet("background-color: lightGray");
+    _ephPortLineEdit->setEnabled(false);
     _ephEchoLineEdit->setEnabled(false);
     }
@@ -1109,2 +1114,13 @@
 
 }
+
+//  Custom transformation parameters
+////////////////////////////////////////////////////////////////////////////
+void bnsWindow::customTrafo(const QString &text){
+  if (text == "Custom" ) {
+    bnsCustomTrafo* dlg = new bnsCustomTrafo(this);
+    dlg->exec();
+    delete dlg;
+  }
+}
+  
Index: trunk/BNS/bnswindow.h
===================================================================
--- trunk/BNS/bnswindow.h	(revision 1770)
+++ trunk/BNS/bnswindow.h	(revision 1771)
@@ -4,4 +4,5 @@
 #include <QtGui>
 #include <QWhatsThis>
+#include <QMessageBox>
 
 #include "bns.h"
@@ -33,4 +34,5 @@
   void slotError(const QByteArray msg);
   void bnsText(const QString &text);
+  void customTrafo(const QString &text);
 
  private slots:
