Changeset 6755 in ntrip
- Timestamp:
- Apr 1, 2015, 3:03:06 PM (10 years ago)
- Location:
- trunk/BNC/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/ephemeris.cpp
r6621 r6755 1336 1336 // ------------ 1337 1337 int fieldLen = 19; 1338 _URAI = -1; // undefined in RINEX format 1338 1339 1339 1340 int pos[4]; … … 1342 1343 pos[2] = pos[1] + fieldLen; 1343 1344 pos[3] = pos[2] + fieldLen; 1344 1345 double TOTs;1346 double TOEs;1347 double TOEw;1348 1345 1349 1346 // Read eight lines … … 1407 1404 1408 1405 else if ( iLine == 3 ) { 1409 if ( readDbl(line, pos[0], fieldLen, TOEs ) ||1406 if ( readDbl(line, pos[0], fieldLen, _TOEs ) || 1410 1407 readDbl(line, pos[1], fieldLen, _Cic ) || 1411 1408 readDbl(line, pos[2], fieldLen, _OMEGA0) || … … 1428 1425 else if ( iLine == 5 ) { 1429 1426 if ( readDbl(line, pos[0], fieldLen, _IDOT ) || 1430 readDbl(line, pos[2], fieldLen, TOEw) ) {1427 readDbl(line, pos[2], fieldLen, _TOEw) ) { 1431 1428 _checkState = bad; 1432 1429 return; … … 1436 1433 else if ( iLine == 6 ) { 1437 1434 double SatH1; 1438 if ( readDbl(line, pos[1], fieldLen, SatH1) || 1435 if ( readDbl(line, pos[0], fieldLen, _URA ) || 1436 readDbl(line, pos[1], fieldLen, SatH1) || 1439 1437 readDbl(line, pos[2], fieldLen, _TGD1) || 1440 1438 readDbl(line, pos[3], fieldLen, _TGD2) ) { … … 1447 1445 else if ( iLine == 7 ) { 1448 1446 double aodc; 1449 if ( readDbl(line, pos[0], fieldLen, TOTs) ||1447 if ( readDbl(line, pos[0], fieldLen, _TOTs) || 1450 1448 readDbl(line, pos[1], fieldLen, aodc) ) { 1451 1449 _checkState = bad; 1452 1450 return; 1453 1451 } 1454 if ( TOTs == 0.9999e9) { // 0.9999e9 means not known (RINEX standard)1455 TOTs =TOEs;1452 if (_TOTs == 0.9999e9) { // 0.9999e9 means not known (RINEX standard) 1453 _TOTs = _TOEs; 1456 1454 } 1457 1455 _AODC = int(aodc); … … 1459 1457 } 1460 1458 1461 TOEw += 1356; // BDT -> GPS week number1462 _TOE_bdt.set(int( TOEw),TOEs);1459 _TOEw += 1356; // BDT -> GPS week number 1460 _TOE_bdt.set(int(_TOEw), _TOEs); 1463 1461 1464 1462 // GPS->BDT … … 1475 1473 //////////////////////////////////////////////////////////////////////////// 1476 1474 void t_ephBDS::set(const bdsephemeris* ee) { 1475 1476 // RINEX File entries 1477 // -------------------- 1478 _TOTs = 0.0; 1479 _TOEs = 0.0; 1480 _TOEw = 0.0; 1477 1481 1478 1482 _receptDateTime = currentDateAndTimeGPS(); … … 1677 1681 .arg(_sqrt_A, 19, 'e', 12); 1678 1682 1679 out << QString(fmt) 1680 .arg(_TOE_bdt.gpssec(), 19, 'e', 12) 1681 .arg(_Cic, 19, 'e', 12) 1682 .arg(_OMEGA0, 19, 'e', 12) 1683 .arg(_Cis, 19, 'e', 12); 1683 double toes = _TOEs; 1684 if (!toes) { // RTCM stream input 1685 toes = _TOE_bdt.gpssec(); 1686 } 1687 out << QString(fmt) 1688 .arg(toes, 19, 'e', 12) 1689 .arg(_Cic, 19, 'e', 12) 1690 .arg(_OMEGA0, 19, 'e', 12) 1691 .arg(_Cis, 19, 'e', 12); 1684 1692 1685 1693 out << QString(fmt) … … 1689 1697 .arg(_OMEGADOT, 19, 'e', 12); 1690 1698 1691 out << QString(fmt) 1692 .arg(_IDOT, 19, 'e', 12) 1693 .arg(0.0, 19, 'e', 12) 1694 .arg(double(_TOE_bdt.gpsw() - 1356.0), 19, 'e', 12) 1695 .arg(0.0, 19, 'e', 12); 1696 1697 double ura = 0.0; 1699 double toew = _TOEw; 1700 if (!toew) { // RTCM stream input 1701 toew = double(_TOE_bdt.gpsw() - 1356.0); 1702 } 1703 out << QString(fmt) 1704 .arg(_IDOT, 19, 'e', 12) 1705 .arg(0.0, 19, 'e', 12) 1706 .arg(toew, 19, 'e', 12) 1707 .arg(0.0, 19, 'e', 12); 1708 1709 double ura = _URA; // RINEX file input 1698 1710 if ((_URAI < 6) && (_URAI >= 0)) { 1699 1711 ura = ceil(10.0 * pow(2.0, ((double)_URAI/2.0) + 1.0)) / 10.0; … … 1702 1714 ura = ceil(10.0 * pow(2.0, ((double)_URAI/2.0) )) / 10.0; 1703 1715 } 1704 1705 1716 out << QString(fmt) 1706 1717 .arg(ura, 19, 'e', 12) … … 1709 1720 .arg(_TGD2, 19, 'e', 12); 1710 1721 1711 out << QString(fmt) 1712 .arg(_TOE_bdt.gpssec(), 19, 'e', 12) 1713 .arg(double(_AODC), 19, 'e', 12) 1714 .arg("", 19, QChar(' ')) 1715 .arg("", 19, QChar(' ')); 1722 double tots = _TOTs; 1723 if (!tots) { // RTCM stream input 1724 tots = _TOE_bdt.gpssec(); 1725 } 1726 out << QString(fmt) 1727 .arg(tots, 19, 'e', 12) 1728 .arg(double(_AODC), 19, 'e', 12) 1729 .arg("", 19, QChar(' ')) 1730 .arg("", 19, QChar(' ')); 1716 1731 return rnxStr; 1717 1732 } -
trunk/BNC/src/ephemeris.h
r6620 r6755 260 260 int _AODE; 261 261 int _AODC; 262 int _URAI; // [0..15] 262 int _URAI; // [0..15] from RTCM stream 263 double _URA; // [m] from RINEX file 263 264 double _clock_bias; // [s] 264 265 double _clock_drift; // [s/s] … … 282 283 double _TGD2; // [s] 283 284 int _SatH1; // 285 double _TOTs; // [s] of BDT week; RINEX file entry 286 double _TOEs; // [s] of BDT week; RINEX file entry 287 double _TOEw; // [-] BDT week; RINEX file entry 284 288 }; 285 289
Note:
See TracChangeset
for help on using the changeset viewer.