Changeset 11057 in ntrip for trunk/BNC/src/ephemeris.cpp
- Timestamp:
- Sep 30, 2026, 11:30:26 AM (12 days ago)
- File:
-
- 1 edited
-
trunk/BNC/src/ephemeris.cpp (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/ephemeris.cpp
r10998 r11057 648 648 } 649 649 } 650 651 // CNAV/CNAV-2 records carry no separate t_oe: t_oe = t_oc 652 // (RINEX 4.02 Tables A9/A11, IS-GPS-200 30.3.4.4, IS-GPS-800 3.5.3.7.1). 653 // NavIC L1NV (RINEX 4.02 Table A31): single reference epoch t_oec for 654 // ephemeris and clock (NavIC L1 SPS ICD 6.2.1.6, Appendices A and B). 655 // --------------------------------------------------------------------- 656 if (type() == t_eph::CNAV || type() == t_eph::CNV2 || type() == t_eph::L1NV) { 657 _TOEweek = _TOC.gpsw(); 658 _TOEsec = _TOC.gpssec(); 659 } 650 660 } 651 661 … … 672 682 673 683 double n = n0 + _Delta_n; 684 685 // CNAV/CNAV-2 (IS-GPS-200 Table 30-II) and NavIC L1NV (NavIC L1 SPS 686 // ICD Appendix A): semi-major axis and mean motion difference are 687 // time-variable, A_k = A0 + Adot*tk and 688 // n_A = n0 + Delta_n0 + 1/2*Delta_n0_dot*tk. 689 // n0 is computed from A0 for GPS/QZSS but from A_k for NavIC L1NV. 690 double A = a0; 691 double Adot = 0.0; 692 if (type() == t_eph::CNAV || type() == t_eph::CNV2 || type() == t_eph::L1NV) { 693 Adot = _ADOT; 694 A += _ADOT * tk; 695 n += 0.5 * _Delta_n_dot * tk; 696 if (type() == t_eph::L1NV) { 697 n += sqrt(gmGRS / (A * A * A)) - n0; 698 } 699 } 700 674 701 double M = _M0 + n * tk; 675 702 double E = M; … … 688 715 double sin2u0 = sin(2 * u0); 689 716 double cos2u0 = cos(2 * u0); 690 double r = a0* (1 - _e * cos(E)) + _Crc * cos2u0 + _Crs * sin2u0;717 double r = A * (1 - _e * cos(E)) + _Crc * cos2u0 + _Crs * sin2u0; 691 718 double i = _i0 + _IDOT * tk + _Cic * cos2u0 + _Cis * sin2u0; 692 719 double u = u0 + _Cuc * cos2u0 + _Cus * sin2u0; … … 715 742 double dotom = _OMEGADOT - omegaEarth; 716 743 double doti = _IDOT + (-_Cic * sin2u0 + _Cis * cos2u0) * 2 * dotv; 717 double dotr = a0* _e * sin(E) * dEdM * n744 double dotr = A * _e * sin(E) * dEdM * n + Adot * (1 - _e * cos(E)) 718 745 + (-_Crc * sin2u0 + _Crs * cos2u0) * 2 * dotv; 719 746 double dotx = dotr * cos(u) - r * sin(u) * dotu; … … 740 767 } 741 768 else { 742 xc[3] -= 4.442807633e-10 * _e * sqrt( a0) * sin(E);769 xc[3] -= 4.442807633e-10 * _e * sqrt(A) * sin(E); 743 770 } 744 771 … … 1087 1114 switch (type()) { 1088 1115 case t_eph::LNAV: 1089 case t_eph::CNAV:1090 1116 case t_eph::CNV2: 1091 1117 if (_health == 0.0) { 1118 return 0; 1119 } 1120 else { 1121 return 1; 1122 } 1123 break; 1124 case t_eph::CNAV: 1125 // RINEX 4: bits 52(MSB)-54(LSB) of msg 10 = L1, L2, L5 health. 1126 // An L5-only flag (value 1, common while L5 is not fully 1127 // operational) does not make orbit/clock unusable; the data set 1128 // is unhealthy if L1 or L2 is flagged. 1129 if ((int(_health) & 0x6) == 0) { 1092 1130 return 0; 1093 1131 }
Note:
See TracChangeset
for help on using the changeset viewer.
