- Timestamp:
- Mar 25, 2009, 8:56:14 PM (16 years ago)
- Location:
- trunk/BNS
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNS/bns.cpp
r1767 r1772 435 435 // 436 436 //////////////////////////////////////////////////////////////////////////// 437 void t_bns::processSatellite(int oldEph, int iCaster, booltrafo,437 void t_bns::processSatellite(int oldEph, int iCaster, const QString trafo, 438 438 bool beClocks, t_eph* ep, int GPSweek, 439 439 double GPSweeks, const QString& prn, … … 448 448 449 449 ColumnVector xyz = xx.Rows(1,3); 450 if (trafo ) {451 crdTrafo(GPSweek, xyz );450 if (trafo != "IGS05") { 451 crdTrafo(GPSweek, xyz, trafo); 452 452 } 453 453 … … 498 498 } 499 499 500 // Transform Coordinates IGS -> ETRF 501 //////////////////////////////////////////////////////////////////////////// 502 void t_bns::crdTrafo(int GPSWeek, ColumnVector& xyz) { 500 // Transform Coordinates 501 //////////////////////////////////////////////////////////////////////////// 502 void 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 } 503 540 504 541 // Current epoch minus 2000.0 in years 505 542 // ------------------------------------ 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; 507 545 508 546 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; 512 554 513 555 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; 519 566 520 567 Matrix rMat(3,3); -
trunk/BNS/bns.h
r1740 r1772 61 61 void openCaster(); 62 62 void readEpoch(); 63 void processSatellite(int oldEph, int iCaster, booltrafo, bool beClocks,63 void processSatellite(int oldEph, int iCaster, const QString trafo, bool beClocks, 64 64 t_eph* ep, int GPSweek, double GPSweeks, 65 65 const QString& prn, const ColumnVector& xx, 66 66 struct ClockOrbit::SatData* sd, QString& outLine); 67 void crdTrafo(int GPSWeek, ColumnVector& xyz );67 void crdTrafo(int GPSWeek, ColumnVector& xyz, const QString trafo); 68 68 69 69 QTcpServer* _clkServer; … … 80 80 bnsSP3* _sp3; 81 81 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; 82 97 }; 83 98 #endif -
trunk/BNS/bnscaster.cpp
r1728 r1772 55 55 // Reference frame 56 56 // --------------- 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(); 63 58 64 59 if ( Qt::CheckState(settings.value(QString("beClocks%1").arg(_ic)).toInt()) -
trunk/BNS/bnscaster.h
r1698 r1772 13 13 void printAscii(const QString& line); 14 14 bool usedSocket() const {return _outSocket;} 15 boolcrdTrafo() const {return _crdTrafo;}15 QString crdTrafo() const {return _crdTrafo;} 16 16 bool beClocks() const {return _beClocks;} 17 17 int ic() const {return _ic;} … … 28 28 QFile* _outFile; 29 29 QTextStream* _outStream; 30 bool_crdTrafo;30 QString _crdTrafo; 31 31 bool _beClocks; 32 32 int _ic; -
trunk/BNS/bnscustomtrafo.cpp
r1771 r1772 32 32 bnsSettings settings; 33 33 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("t 0").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()); 49 49 50 50 // WhatsThis … … 95 95 editLayout->addWidget(new QLabel(tr("dZr [m/y]")), 1, 4, Qt::AlignRight); 96 96 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); 98 98 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); 100 100 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); 102 102 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); 104 104 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); 106 106 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); 108 108 editLayout->addWidget(_ozrLineEdit, 3, 5); 109 editLayout->addWidget(new QLabel(tr("S(t0) [10^-9]")), 109 editLayout->addWidget(new QLabel(tr("S(t0) [10^-9]")), 4, 0, Qt::AlignRight); 110 110 editLayout->addWidget(_scLineEdit, 4, 1); 111 editLayout->addWidget(new QLabel(tr("Sr [10^-9/y]")), 111 editLayout->addWidget(new QLabel(tr("Sr [10^-9/y]")), 4, 2, Qt::AlignRight); 112 112 editLayout->addWidget(_scrLineEdit, 4, 3); 113 113 editLayout->addWidget(new QLabel(tr("t0 [y]")), 4, 4, Qt::AlignRight); … … 170 170 171 171 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("t 0", _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()); 187 187 188 188 } else { -
trunk/BNS/bnssettings.cpp
r1771 r1772 62 62 setValue("outFile_3", ""); 63 63 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("t 0", "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"); 79 79 80 80 setValue("rnxPath", "");
Note:
See TracChangeset
for help on using the changeset viewer.