Changeset 1772 in ntrip


Ignore:
Timestamp:
Mar 25, 2009, 8:56:14 PM (13 years ago)
Author:
weber
Message:

* empty log message *

Location:
trunk/BNS
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNS/bns.cpp

    r1767 r1772  
    435435//
    436436////////////////////////////////////////////////////////////////////////////
    437 void t_bns::processSatellite(int oldEph, int iCaster, bool trafo,
     437void t_bns::processSatellite(int oldEph, int iCaster, const QString trafo,
    438438                             bool beClocks, t_eph* ep, int GPSweek,
    439439                             double GPSweeks, const QString& prn,
     
    448448
    449449  ColumnVector xyz = xx.Rows(1,3);
    450   if (trafo) {
    451     crdTrafo(GPSweek, xyz);
     450  if (trafo != "IGS05") {
     451    crdTrafo(GPSweek, xyz, trafo);
    452452  }
    453453
     
    498498}
    499499
    500 // Transform Coordinates IGS -> ETRF
    501 ////////////////////////////////////////////////////////////////////////////
    502 void t_bns::crdTrafo(int GPSWeek, ColumnVector& xyz) {
     500// Transform Coordinates
     501////////////////////////////////////////////////////////////////////////////
     502void t_bns::crdTrafo(int GPSWeek, ColumnVector& xyz, const QString trafo) {
     503
     504  bnsSettings settings;
     505
     506  if (trafo == "ETRF2000") {
     507  _dx  =  0.0541;
     508  _dy  =  0.0502;
     509  _dz  = -0.0538;
     510  _dxr = -0.0002;
     511  _dyr =  0.0001;
     512  _dzr = -0.0018;
     513  _ox  =  0.000891;
     514  _oy  =  0.005390;
     515  _oz  = -0.008712;
     516  _oxr =  0.000081;
     517  _oyr =  0.000490;
     518  _ozr = -0.000792;
     519  _sc  =  0.40;
     520  _scr =  0.08;
     521  _t0  =  2000.0;
     522  }
     523  else if (trafo == "Custom") {
     524  _dx  = settings.value("trafo_dx").toInt();
     525  _dy  = settings.value("trafo_dy").toInt();
     526  _dz  = settings.value("trafo_dz").toInt();
     527  _dxr = settings.value("trafo_dxr").toInt();
     528  _dyr = settings.value("trafo_dyr").toInt();
     529  _dzr = settings.value("trafo_dzr").toInt();
     530  _ox  = settings.value("trafo_ox").toInt();
     531  _oy  = settings.value("trafo_oy").toInt();
     532  _oz  = settings.value("trafo_oz").toInt();
     533  _oxr = settings.value("trafo_oxr").toInt();
     534  _oyr = settings.value("trafo_oyr").toInt();
     535  _ozr = settings.value("trafo_ozr").toInt();
     536  _sc  = settings.value("trafo_sc").toInt();
     537  _scr = settings.value("trafo_scr").toInt();
     538  _t0  = settings.value("trafo_t0").toInt();
     539  }
    503540
    504541  // Current epoch minus 2000.0 in years
    505542  // ------------------------------------
    506   double dt = (GPSWeek - (1042.0+6.0/7.0)) / 365.2422 * 7.0;
     543//double dt = (GPSWeek - (1042.0+6.0/7.0)) / 365.2422 * 7.0;
     544  double dt = (GPSWeek - (1042.0+6.0/7.0)) / 365.2422 * 7.0 + 2000.0 - _t0;
    507545
    508546  ColumnVector dx(3);
    509   dx(1) =  0.0541 - dt * 0.0002;
    510   dx(2) =  0.0502 + dt * 0.0001;
    511   dx(3) = -0.0538 - dt * 0.0018;
     547
     548//dx(1) =  0.0541 - dt * 0.0002;
     549//dx(2) =  0.0502 + dt * 0.0001;
     550//dx(3) = -0.0538 - dt * 0.0018;
     551  dx(1) = _dx + dt * _dxr;
     552  dx(2) = _dy + dt * _dyr;
     553  dx(3) = _dz + dt * _dzr;
    512554
    513555  static const double arcSec = 180.0 * 3600.0 / M_PI;
    514   double ox = ( 0.000891 + dt * 0.000081) / arcSec;
    515   double oy = ( 0.005390 + dt * 0.000490) / arcSec;
    516   double oz = (-0.008712 - dt * 0.000792) / arcSec;
    517 
    518   double sc = 1.0 + 0.4e-9 + dt * 0.08e-9;
     556
     557//double ox = ( 0.000891 + dt * 0.000081) / arcSec;
     558//double oy = ( 0.005390 + dt * 0.000490) / arcSec;
     559//double oz = (-0.008712 - dt * 0.000792) / arcSec;
     560  double ox = (_ox + dt * _oxr) / arcSec;
     561  double oy = (_oy + dt * _oyr) / arcSec;
     562  double oz = (_oz + dt * _ozr) / arcSec;
     563
     564//double sc = 1.0 + 0.4e-9 + dt * 0.08e-9;
     565  double sc = 1.0 + _sc * 1e-9 + dt * _scr * 1e-9;
    519566
    520567  Matrix rMat(3,3);
  • trunk/BNS/bns.h

    r1740 r1772  
    6161  void openCaster();
    6262  void readEpoch();
    63   void processSatellite(int oldEph, int iCaster, bool trafo, bool beClocks,
     63  void processSatellite(int oldEph, int iCaster, const QString trafo, bool beClocks,
    6464                        t_eph* ep, int GPSweek, double GPSweeks,
    6565                        const QString& prn, const ColumnVector& xx,
    6666                        struct ClockOrbit::SatData* sd, QString& outLine);
    67   void crdTrafo(int GPSWeek, ColumnVector& xyz);
     67  void crdTrafo(int GPSWeek, ColumnVector& xyz, const QString trafo);
    6868
    6969  QTcpServer*               _clkServer;
     
    8080  bnsSP3*                   _sp3;
    8181  QByteArray                _clkLine;
     82  double _dx;
     83  double _dy;
     84  double _dz;
     85  double _dxr;
     86  double _dyr;
     87  double _dzr;
     88  double _ox;
     89  double _oy;
     90  double _oz;
     91  double _oxr;
     92  double _oyr;
     93  double _ozr;
     94  double _sc;
     95  double _scr;
     96  double _t0;
    8297};
    8398#endif
  • trunk/BNS/bnscaster.cpp

    r1728 r1772  
    5555  // Reference frame
    5656  // ---------------
    57   if (settings.value(QString("refSys_%1").arg(_ic)).toString() == "ETRF2000") {
    58     _crdTrafo = true;
    59   }
    60   else {
    61     _crdTrafo = false;
    62   }
     57  _crdTrafo = settings.value(QString("refSys_%1").arg(_ic)).toString();
    6358
    6459  if ( Qt::CheckState(settings.value(QString("beClocks%1").arg(_ic)).toInt())
  • trunk/BNS/bnscaster.h

    r1698 r1772  
    1313  void printAscii(const QString& line);
    1414  bool usedSocket() const {return _outSocket;}
    15   bool crdTrafo() const {return _crdTrafo;}
     15  QString crdTrafo() const {return _crdTrafo;}
    1616  bool beClocks() const {return _beClocks;}
    1717  int  ic() const {return _ic;}
     
    2828  QFile*       _outFile;
    2929  QTextStream* _outStream;
    30   bool         _crdTrafo;
     30  QString      _crdTrafo;
    3131  bool         _beClocks;
    3232  int          _ic;
  • trunk/BNS/bnscustomtrafo.cpp

    r1771 r1772  
    3232 bnsSettings settings;
    3333
    34  _dxLineEdit = new QLineEdit(settings.value("dx").toString());
    35  _dyLineEdit = new QLineEdit(settings.value("dy").toString());
    36  _dzLineEdit = new QLineEdit(settings.value("dz").toString());
    37  _dxrLineEdit = new QLineEdit(settings.value("dxr").toString());
    38  _dyrLineEdit = new QLineEdit(settings.value("dyr").toString());
    39  _dzrLineEdit = new QLineEdit(settings.value("dzr").toString());
    40  _oxLineEdit = new QLineEdit(settings.value("ox").toString());
    41  _oyLineEdit = new QLineEdit(settings.value("oy").toString());
    42  _ozLineEdit = new QLineEdit(settings.value("oz").toString());
    43  _oxrLineEdit = new QLineEdit(settings.value("oxr").toString());
    44  _oyrLineEdit = new QLineEdit(settings.value("oyr").toString());
    45  _ozrLineEdit = new QLineEdit(settings.value("ozr").toString());
    46  _scLineEdit = new QLineEdit(settings.value("sc").toString());
    47  _scrLineEdit = new QLineEdit(settings.value("scr").toString());
    48  _t0LineEdit = new QLineEdit(settings.value("t0").toString());
     34 _dxLineEdit = new QLineEdit(settings.value("trafo_dx").toString());
     35 _dyLineEdit = new QLineEdit(settings.value("trafo_dy").toString());
     36 _dzLineEdit = new QLineEdit(settings.value("trafo_dz").toString());
     37 _dxrLineEdit = new QLineEdit(settings.value("trafo_dxr").toString());
     38 _dyrLineEdit = new QLineEdit(settings.value("trafo_dyr").toString());
     39 _dzrLineEdit = new QLineEdit(settings.value("trafo_dzr").toString());
     40 _oxLineEdit = new QLineEdit(settings.value("trafo_ox").toString());
     41 _oyLineEdit = new QLineEdit(settings.value("trafo_oy").toString());
     42 _ozLineEdit = new QLineEdit(settings.value("trafo_oz").toString());
     43 _oxrLineEdit = new QLineEdit(settings.value("trafo_oxr").toString());
     44 _oyrLineEdit = new QLineEdit(settings.value("trafo_oyr").toString());
     45 _ozrLineEdit = new QLineEdit(settings.value("trafo_ozr").toString());
     46 _scLineEdit = new QLineEdit(settings.value("trafo_sc").toString());
     47 _scrLineEdit = new QLineEdit(settings.value("trafo_scr").toString());
     48 _t0LineEdit = new QLineEdit(settings.value("trafo_t0").toString());
    4949
    5050  // WhatsThis
     
    9595  editLayout->addWidget(new QLabel(tr("dZr [m/y]")),      1, 4, Qt::AlignRight);
    9696  editLayout->addWidget(_dzrLineEdit,                     1, 5);
    97   editLayout->addWidget(new QLabel(tr("   oX(t0) [mas]")),2, 0, Qt::AlignRight);
     97  editLayout->addWidget(new QLabel(tr("   oX(t0) [as]")), 2, 0, Qt::AlignRight);
    9898  editLayout->addWidget(_oxLineEdit,                      2, 1);
    99   editLayout->addWidget(new QLabel(tr("   oY(t0) [mas]")),2, 2, Qt::AlignRight);
     99  editLayout->addWidget(new QLabel(tr("   oY(t0) [as]")), 2, 2, Qt::AlignRight);
    100100  editLayout->addWidget(_oyLineEdit,                      2, 3);
    101   editLayout->addWidget(new QLabel(tr("   oZ(t0) [mas]")),2, 4, Qt::AlignRight);
     101  editLayout->addWidget(new QLabel(tr("   oZ(t0) [as]")), 2, 4, Qt::AlignRight);
    102102  editLayout->addWidget(_ozLineEdit,                      2, 5);
    103   editLayout->addWidget(new QLabel(tr("oXr [mas/y]")),    3, 0, Qt::AlignRight);
     103  editLayout->addWidget(new QLabel(tr("oXr [as/y]")),     3, 0, Qt::AlignRight);
    104104  editLayout->addWidget(_oxrLineEdit,                     3, 1);
    105   editLayout->addWidget(new QLabel(tr("oYr [mas/y]")),    3, 2, Qt::AlignRight);
     105  editLayout->addWidget(new QLabel(tr("oYr [as/y]")),     3, 2, Qt::AlignRight);
    106106  editLayout->addWidget(_oyrLineEdit,                     3, 3);
    107   editLayout->addWidget(new QLabel(tr("oZr [mas/y]")),    3, 4, Qt::AlignRight);
     107  editLayout->addWidget(new QLabel(tr("oZr [as/y]")),     3, 4, Qt::AlignRight);
    108108  editLayout->addWidget(_ozrLineEdit,                     3, 5);
    109   editLayout->addWidget(new QLabel(tr("S(t0) [10^-9]")),    4, 0, Qt::AlignRight);
     109  editLayout->addWidget(new QLabel(tr("S(t0) [10^-9]")),  4, 0, Qt::AlignRight);
    110110  editLayout->addWidget(_scLineEdit,                      4, 1);
    111   editLayout->addWidget(new QLabel(tr("Sr [10^-9/y]")),     4, 2, Qt::AlignRight);
     111  editLayout->addWidget(new QLabel(tr("Sr [10^-9/y]")),   4, 2, Qt::AlignRight);
    112112  editLayout->addWidget(_scrLineEdit,                     4, 3);
    113113  editLayout->addWidget(new QLabel(tr("t0 [y]")),         4, 4, Qt::AlignRight);
     
    170170
    171171    bnsSettings settings;
    172     settings.setValue("dx",   _dxLineEdit->text());
    173     settings.setValue("dy",   _dyLineEdit->text());
    174     settings.setValue("dz",   _dzLineEdit->text());
    175     settings.setValue("dxr",  _dxrLineEdit->text());
    176     settings.setValue("dyr",  _dyrLineEdit->text());
    177     settings.setValue("dzr",  _dzrLineEdit->text());
    178     settings.setValue("ox",   _oxLineEdit->text());
    179     settings.setValue("oy",   _oyLineEdit->text());
    180     settings.setValue("oz",   _ozLineEdit->text());
    181     settings.setValue("oxr",  _oxrLineEdit->text());
    182     settings.setValue("oyr",  _oyrLineEdit->text());
    183     settings.setValue("ozr",  _ozrLineEdit->text());
    184     settings.setValue("sc",   _scLineEdit->text());
    185     settings.setValue("scr",  _scrLineEdit->text());
    186     settings.setValue("t0",   _t0LineEdit->text());
     172    settings.setValue("trafo_dx",   _dxLineEdit->text());
     173    settings.setValue("trafo_dy",   _dyLineEdit->text());
     174    settings.setValue("trafo_dz",   _dzLineEdit->text());
     175    settings.setValue("trafo_dxr",  _dxrLineEdit->text());
     176    settings.setValue("trafo_dyr",  _dyrLineEdit->text());
     177    settings.setValue("trafo_dzr",  _dzrLineEdit->text());
     178    settings.setValue("trafo_ox",   _oxLineEdit->text());
     179    settings.setValue("trafo_oy",   _oyLineEdit->text());
     180    settings.setValue("trafo_oz",   _ozLineEdit->text());
     181    settings.setValue("trafo_oxr",  _oxrLineEdit->text());
     182    settings.setValue("trafo_oyr",  _oyrLineEdit->text());
     183    settings.setValue("trafo_ozr",  _ozrLineEdit->text());
     184    settings.setValue("trafo_sc",   _scLineEdit->text());
     185    settings.setValue("trafo_scr",  _scrLineEdit->text());
     186    settings.setValue("trafo_t0",   _t0LineEdit->text());
    187187
    188188  } else {
  • trunk/BNS/bnssettings.cpp

    r1771 r1772  
    6262    setValue("outFile_3",   "");
    6363
    64     setValue("dx",    "0.0541");
    65     setValue("dy",    "0.0502");
    66     setValue("dz",   "-0.0538");
    67     setValue("dxr",  "-0.0002");
    68     setValue("dyr",   "0.0001");
    69     setValue("dzr",  "-0.0018");
    70     setValue("ox",     "0.891");
    71     setValue("oy",     "5.390");
    72     setValue("oz",    "-8.712");
    73     setValue("oxr",    "0.081");
    74     setValue("oyr",    "0.490");
    75     setValue("ozr",   "-0.792");
    76     setValue("sc",      "0.40");
    77     setValue("scr",     "0.08");
    78     setValue("t0",    "2000.0");
     64    setValue("trafo_dx",    "0.0541");
     65    setValue("trafo_dy",    "0.0502");
     66    setValue("trafo_dz",   "-0.0538");
     67    setValue("trafo_dxr",  "-0.0002");
     68    setValue("trafo_dyr",   "0.0001");
     69    setValue("trafo_dzr",  "-0.0018");
     70    setValue("trafo_ox",  "0.000891");
     71    setValue("trafo_oy",  "0.005390");
     72    setValue("trafo_oz", "-0.008712");
     73    setValue("trafo_oxr", "0.000081");
     74    setValue("trafo_oyr", "0.000490");
     75    setValue("trafo_ozr","-0.000792");
     76    setValue("trafo_sc",      "0.40");
     77    setValue("trafo_scr",     "0.08");
     78    setValue("trafo_t0",    "2000.0");
    7979
    8080    setValue("rnxPath",     "");
Note: See TracChangeset for help on using the changeset viewer.