Ignore:
Timestamp:
Nov 26, 2022, 11:08:43 PM (4 months ago)
Author:
stuerze
Message:

some updates towards IGS20

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/upload/bncrtnetuploadcaster.cpp

    r9888 r9911  
    243243    _t0 = settings.value("trafo_t0").toDouble();
    244244  }
     245    // TODO: the following lines can be deleted if all parameters are updated regarding ITRF2020
     246  if (_crdTrafo == "ETRF2000" ||
     247      _crdTrafo == "GDA2020"  ||
     248      _crdTrafo == "DREF91"   ||
     249      _crdTrafo == "SIRGAS2000") {
     250       // Transformation Parameters from ITRF2020 to ITRF2014
     251       // from ITRF web site: https://itrf.ign.fr/en/solutions/transformations
     252   _dx14  = -0.0014;
     253   _dy14  = -0.0009;
     254   _dz14  =  0.0014;
     255   _dxr14 =  0.0000;
     256   _dyr14 = -0.0001;
     257   _dzr14 = -0.0002;
     258   _ox14  =  0.0000;
     259   _oy14  =  0.0000;
     260   _oz14  =  0.0000;
     261   _oxr14 =  0.0000;
     262   _oyr14 =  0.0000;
     263   _ozr14 =  0.0000;
     264   _sc14  = -0.4200;
     265   _scr14 =  0.0000;
     266   _t014  =  2015.0;
     267 }
    245268}
    246269
     
    10151038
    10161039  double dc = 0.0;
    1017   if (_crdTrafo != "IGS14") {
    1018     crdTrafo(GPSweek, xP, dc);
     1040  if (_crdTrafo != "IGS20") {
     1041    crdTrafo14(GPSweek, xP, dc); // ITRF2020 => ITRF2014
     1042    crdTrafo(GPSweek, xP, dc);   // ITRF2014 to other reference frames
    10191043  }
    10201044
     
    11511175  }
    11521176  else if (_crdTrafo == "Custom") {
    1153     meanSta(1) = 0.0; // TODO
    1154     meanSta(2) = 0.0; // TODO
    1155     meanSta(3) = 0.0; // TODO
     1177    meanSta(1) = 0.0;
     1178    meanSta(2) = 0.0;
     1179    meanSta(3) = 0.0;
    11561180  }
    11571181
     
    11751199}
    11761200
     1201// Transform Coordinates
     1202////////////////////////////////////////////////////////////////////////////
     1203void bncRtnetUploadCaster::crdTrafo14(int GPSWeek, ColumnVector& xyz,
     1204    double& dc) {
     1205
     1206  // Current epoch minus 2000.0 in years
     1207  // ------------------------------------
     1208  double dt = (GPSWeek - (1042.0 + 6.0 / 7.0)) / 365.2422 * 7.0 + 2000.0 - _t0;
     1209
     1210  ColumnVector dx(3);
     1211
     1212  dx(1) = _dx14 + dt * _dxr14;
     1213  dx(2) = _dy14 + dt * _dyr14;
     1214  dx(3) = _dz14 + dt * _dzr14;
     1215
     1216  static const double arcSec = 180.0 * 3600.0 / M_PI;
     1217
     1218  double ox = (_ox14 + dt * _oxr14) / arcSec;
     1219  double oy = (_oy14 + dt * _oyr14) / arcSec;
     1220  double oz = (_oz14 + dt * _ozr14) / arcSec;
     1221
     1222  double sc = 1.0 + _sc14 * 1e-9 + dt * _scr14 * 1e-9;
     1223
     1224  // Specify approximate center of area
     1225  // ----------------------------------
     1226  ColumnVector meanSta(3);
     1227  meanSta(1) = 0.0; // TODO
     1228  meanSta(2) = 0.0; // TODO
     1229  meanSta(3) = 0.0; // TODO
     1230
     1231  // Clock correction proportional to topocentric distance to satellites
     1232  // -------------------------------------------------------------------
     1233  double rho = (xyz - meanSta).NormFrobenius();
     1234  dc = rho * (sc - 1.0) / sc / t_CST::c;
     1235
     1236  Matrix rMat(3, 3);
     1237  rMat(1, 1) = 1.0;
     1238  rMat(1, 2) = -oz;
     1239  rMat(1, 3) = oy;
     1240  rMat(2, 1) = oz;
     1241  rMat(2, 2) = 1.0;
     1242  rMat(2, 3) = -ox;
     1243  rMat(3, 1) = -oy;
     1244  rMat(3, 2) = ox;
     1245  rMat(3, 3) = 1.0;
     1246
     1247  xyz = sc * rMat * xyz + dx;
     1248}
     1249
     1250// Update Interval
     1251////////////////////////////////////////////////////////////////////////////
    11771252int bncRtnetUploadCaster::determineUpdateInd(double samplingRate) {
    11781253
     
    12191294}
    12201295
     1296// Check corrections
     1297////////////////////////////////////////////////////////////////////////////
    12211298bool bncRtnetUploadCaster::corrIsOutOfRange(struct SsrCorr::ClockOrbit::SatData* sd) {
    12221299
Note: See TracChangeset for help on using the changeset viewer.