Changeset 10533 in ntrip for trunk/BNC/src/upload/bncrtnetuploadcaster.cpp
- Timestamp:
- Sep 17, 2024, 4:55:28 PM (8 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/upload/bncrtnetuploadcaster.cpp
r10416 r10533 60 60 } 61 61 62 _crdTrafo = crdTrafo;62 _crdTrafoStr = crdTrafo; 63 63 64 64 _ssrFormat = ssrFormat; … … 135 135 // Transformation Parameters from ITRF2014 to ETRF2000 136 136 // http://etrs89.ign.fr/pub/EUREF-TN-1-Mar-04-2024.pdf 137 if (_crdTrafo == "ETRF2000") {137 if (_crdTrafoStr == "ETRF2000") { 138 138 _dx = 0.0552; 139 139 _dy = 0.0527; … … 158 158 } 159 159 // Transformation Parameters from ITRF2014 to GDA2020 (Ryan Ruddick, GA) 160 else if (_crdTrafo == "GDA2020") {160 else if (_crdTrafoStr == "GDA2020") { 161 161 _dx = 0.0; 162 162 _dy = 0.0; … … 182 182 // Transformation Parameters from IGb14 to SIRGAS2000 (Thanks to Sonia Costa, BRA) 183 183 // June 29 2020: TX:-0.0027 m TY:-0.0025 m TZ:-0.0042 m SCL:1.20 (ppb) no rotations and no rates.*/ 184 else if (_crdTrafo == "SIRGAS2000") {184 else if (_crdTrafoStr == "SIRGAS2000") { 185 185 _dx = -0.0027; 186 186 _dy = -0.0025; … … 204 204 } 205 205 // Transformation Parameters from ITRF2014 to DREF91 206 else if (_crdTrafo == "DREF91") {206 else if (_crdTrafoStr == "DREF91") { 207 207 _dx = 0.0547; 208 208 _dy = 0.0522; … … 226 226 _t0 = 2010.0; 227 227 } 228 else if (_crdTrafo == "Custom") {228 else if (_crdTrafoStr == "Custom") { 229 229 _dx = settings.value("trafo_dx").toDouble(); 230 230 _dy = settings.value("trafo_dy").toDouble(); … … 244 244 } 245 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") {246 if (_crdTrafoStr == "ETRF2000" || 247 _crdTrafoStr == "GDA2020" || 248 _crdTrafoStr == "DREF91" || 249 _crdTrafoStr == "SIRGAS2000") { 250 250 // Transformation Parameters from ITRF2020 to ITRF2014 251 251 // from ITRF web site: https://itrf.ign.fr/en/solutions/transformations … … 329 329 if (nextEpoch != -1 && nextEpoch < iEpoEnd) { 330 330 rtnetStreamBuffer = rtnetStreamBuffer.mid(nextEpoch, nextEpochEnd); 331 lines = rtnetStreamBuffer.split('\n', Q String::SkipEmptyParts);331 lines = rtnetStreamBuffer.split('\n', Qt::SkipEmptyParts); 332 332 if (lines.size() > 2) { 333 333 decodeRtnetEpoch(lines); … … 341 341 } 342 342 343 lines = _rtnetStreamBuffer.left(iEpoEnd).split('\n', Q String::SkipEmptyParts);343 lines = _rtnetStreamBuffer.left(iEpoEnd).split('\n', Qt::SkipEmptyParts); 344 344 345 345 _rtnetStreamBuffer = _rtnetStreamBuffer.mid(iEpoEnd + 3); … … 374 374 memset(&co, 0, sizeof(co)); 375 375 co.EpochTime[CLOCKORBIT_SATGPS] = static_cast<int>(epoTime.gpssec()); 376 double gt = epoTime.gpssec() - gnumleap(year, month, day); 376 377 if (_ssrFormat == "RTCM-SSR") { 377 double gt = epoTime.gpssec() + 3 * 3600 - gnumleap(year, month, day); 378 co.EpochTime[CLOCKORBIT_SATGLONASS] = static_cast<int>(fmod(gt, 86400.0)); 379 } 380 else if (_ssrFormat == "IGS-SSR") { 381 co.EpochTime[CLOCKORBIT_SATGLONASS] = static_cast<int>(epoTime.gpssec()); 382 } 378 gt += 3 * 3600; 379 } 380 co.EpochTime[CLOCKORBIT_SATGLONASS] = static_cast<int>(fmod(gt, 86400.0)); 383 381 co.EpochTime[CLOCKORBIT_SATGALILEO] = static_cast<int>(epoTime.gpssec()); 384 382 co.EpochTime[CLOCKORBIT_SATQZSS] = static_cast<int>(epoTime.gpssec()); 385 383 co.EpochTime[CLOCKORBIT_SATSBAS] = static_cast<int>(epoTime.gpssec()); 386 if (_ssrFormat == "RTCM-SSR") { 387 co.EpochTime[CLOCKORBIT_SATBDS] = static_cast<int>(epoTime.bdssec()); 388 } 389 else if (_ssrFormat == "IGS-SSR") { 390 co.EpochTime[CLOCKORBIT_SATBDS] = static_cast<int>(epoTime.gpssec()); 391 } 384 co.EpochTime[CLOCKORBIT_SATBDS] = static_cast<int>(epoTime.bdssec()); 392 385 co.Supplied[_ssrCorr->COBOFS_CLOCK] = 1; 393 386 co.Supplied[_ssrCorr->COBOFS_ORBIT] = 1; 394 co.SatRefDatum = _ssrCorr->DATUM_ITRF; // ToDo: to decode from RTNET format 387 (_crdTrafoStr == "IGS20") ? 388 co.SatRefDatum = _ssrCorr->DATUM_ITRF : 389 co.SatRefDatum = _ssrCorr->DATUM_LOCAL; 395 390 co.SSRIOD = _IOD; 396 391 co.SSRProviderID = _PID; // 256 .. BKG, 257 ... EUREF 397 392 co.SSRSolutionID = _SID; 393 if (_ssrFormat == "RTCM-SSR") { 394 co.EpochTime[CLOCKORBIT_SATBDS] = static_cast<int>(epoTime.bdssec()); 395 } 396 else if (_ssrFormat == "IGS-SSR") { 397 co.EpochTime[CLOCKORBIT_SATBDS] = static_cast<int>(epoTime.gpssec()); 398 } 399 co.Supplied[_ssrCorr->COBOFS_CLOCK] = 1; 400 co.Supplied[_ssrCorr->COBOFS_ORBIT] = 1; 401 402 403 t_serviceCrs serviceCrs; 404 t_rtcmCrs rtcmCrs; 405 if (_crdTrafoStr == "IGS20") { 406 serviceCrs._CE = serviceCrs._coordinateEpoch = 0; 407 int nc = _crdTrafoStr.length(); 408 if (nc > 31) {nc = 31;} 409 for (int i = 0; i < nc; i++) { 410 serviceCrs._name[i] = 411 rtcmCrs._name[i] = _crdTrafoStr.toStdString()[i]; 412 } 413 serviceCrs._name[nc] = 0; 414 rtcmCrs._name[nc] = 0; 415 rtcmCrs._anchor = 0; // global CRS 416 rtcmCrs._plateNumber = 0; // unknown 417 rtcmCrs._databaseLinks << "ISO.DATUM.979" << "ISO.CRS:980"; 418 } 419 else { 420 if (_crdTrafoStr != "Custom") { 421 serviceCrs._coordinateEpoch = _t0; 422 serviceCrs.setCEFromCoordinateEpoch(); 423 int nc = _crdTrafoStr.length(); 424 if (nc > 31) {nc = 31;} 425 for (int i = 0; i < nc; i++) { 426 serviceCrs._name[i] = _crdTrafoStr.toStdString()[i]; 427 } 428 serviceCrs._name[nc] = 0; 429 QString rtcmcrsname = _crdTrafoStr + QString("(%1)").arg(_t0,4,'d',0); 430 nc = rtcmcrsname.length(); 431 if (nc > 31) {nc = 31;} 432 for (int i = 0; i < nc; i++) { 433 rtcmCrs._name[i] = rtcmcrsname.toStdString()[i]; 434 } 435 rtcmCrs._name[nc] = 0; 436 if (_crdTrafoStr == "ETRF2000") { 437 rtcmCrs._anchor = 1; // plate-fixed CRS 438 rtcmCrs._plateNumber = 7; // Eurasia 439 rtcmCrs._databaseLinks << "ISO.DATUM.187" << "ISO.CRS:260" << "ISO.CRS:457" 440 << "EPSG.DATUM:1186" << "EPSG.CRS:7930" << "EPSG.CRS:7931"; 441 } 442 else if (_crdTrafoStr == "DREF91") { 443 rtcmCrs._anchor = 1; // plate-fixed CRS 444 rtcmCrs._plateNumber = 7; // Eurasia 445 } 446 else if (_crdTrafoStr == "GDA2020") { 447 rtcmCrs._anchor = 1; // plate-fixed CRS 448 rtcmCrs._plateNumber = 4; // Australia 449 rtcmCrs._databaseLinks << "ISO.DATUM.186" << "ISO.CRS:404" << "ISO.CRS:329" 450 << "EPSG.DATUM:1168" << "EPSG.CRS:7842" << "EPSG.CRS:7843"; 451 } 452 else if (_crdTrafoStr == "SIRGAS2000") { 453 rtcmCrs._anchor = 1; // plate-fixed CRS 454 rtcmCrs._plateNumber = 12; // S.America 455 rtcmCrs._databaseLinks << "ISO.DATUM:169" << "ISO.CRS:384" << "ISO.CRS:313" 456 << "EPSG.DATUM:6674" << "EPSG.CRS:4988" << "EPSG.CRS:4989"; 457 } 458 } 459 } 460 398 461 399 462 struct SsrCorr::CodeBias bias; … … 1026 1089 1027 1090 double dc = 0.0; 1028 if (_crdTrafo != "IGS20") {1091 if (_crdTrafoStr != "IGS20") { 1029 1092 crdTrafo14(GPSweek, xP, dc); // ITRF2020 => ITRF2014 1030 1093 crdTrafo(GPSweek, xP, dc); // ITRF2014 to other reference frames … … 1142 1205 ColumnVector meanSta(3); 1143 1206 1144 if (_crdTrafo == "ETRF2000") {1207 if (_crdTrafoStr == "ETRF2000") { 1145 1208 meanSta(1) = 3661090.0; 1146 1209 meanSta(2) = 845230.0; 1147 1210 meanSta(3) = 5136850.0; 1148 1211 } 1149 else if (_crdTrafo == "GDA2020") {1212 else if (_crdTrafoStr == "GDA2020") { 1150 1213 meanSta(1) = -4052050.0; 1151 1214 meanSta(2) = 4212840.0; 1152 1215 meanSta(3) = -2545110.0; 1153 1216 } 1154 else if (_crdTrafo == "SIRGAS2000") {1217 else if (_crdTrafoStr == "SIRGAS2000") { 1155 1218 meanSta(1) = 3740860.0; 1156 1219 meanSta(2) = -4964290.0; 1157 1220 meanSta(3) = -1425420.0; 1158 1221 } 1159 else if (_crdTrafo == "DREF91") {1222 else if (_crdTrafoStr == "DREF91") { 1160 1223 meanSta(1) = 3959579.0; 1161 1224 meanSta(2) = 721719.0; 1162 1225 meanSta(3) = 4931539.0; 1163 1226 } 1164 else if (_crdTrafo == "Custom") {1227 else if (_crdTrafoStr == "Custom") { 1165 1228 meanSta(1) = 0.0; 1166 1229 meanSta(2) = 0.0;
Note:
See TracChangeset
for help on using the changeset viewer.