Changeset 8903 in ntrip
 Timestamp:
 Mar 18, 2020, 11:08:50 AM (6 months ago)
 Location:
 trunk/BNC/src
 Files:

 4 edited
Legend:
 Unmodified
 Added
 Removed

trunk/BNC/src/RTCM3/RTCM3Decoder.cpp
r8852 r8903 1073 1073 GETBITS(eph._L2PFlag, 1) 1074 1074 GETBITS(fitIntervalFalg, 1) 1075 if (fitIntervalFalg == 0) { 1076 eph._fitInterval = 4.0; 1077 } 1075 eph._fitInterval = fitIntervalFromFlag(fitIntervalFalg, eph._IODC, eph.type()); 1078 1076 eph._TOT = 0.9999e9; 1079 1077 … … 1238 1236 GETBITS(eph._IODC, 10) 1239 1237 GETBITS(fitIntervalFalg, 1) 1240 if (fitIntervalFalg == 0) { 1241 eph._fitInterval = 2.0; 1242 } 1238 eph._fitInterval = fitIntervalFromFlag(fitIntervalFalg, eph._IODC, eph.type()); 1243 1239 eph._TOT = 0.9999e9; 1244 1240 
trunk/BNC/src/bncutils.cpp
r8801 r8903 317 317 const ColumnVector& rsw, ColumnVector& xyz) { 318 318 319 ColumnVector along = vv / vv. norm_Frobenius();320 ColumnVector cross = crossproduct(rr, vv); cross /= cross. norm_Frobenius();319 ColumnVector along = vv / vv.NormFrobenius(); 320 ColumnVector cross = crossproduct(rr, vv); cross /= cross.NormFrobenius(); 321 321 ColumnVector radial = crossproduct(along, cross); 322 322 … … 334 334 const ColumnVector& xyz, ColumnVector& rsw) { 335 335 336 ColumnVector along = vv / vv. norm_Frobenius();337 ColumnVector cross = crossproduct(rr, vv); cross /= cross. norm_Frobenius();336 ColumnVector along = vv / vv.NormFrobenius(); 337 ColumnVector cross = crossproduct(rr, vv); cross /= cross.NormFrobenius(); 338 338 ColumnVector radial = crossproduct(along, cross); 339 339 … … 808 808 } 809 809 810 // 811 //////////////////////////////////////////////////////////////////////////// 810 812 double accuracyFromIndex(int index, t_eph::e_type type) { 811 813 double accuracy = 1.0; … … 869 871 } 870 872 873 // 874 //////////////////////////////////////////////////////////////////////////// 871 875 int indexFromAccuracy(double accuracy, t_eph::e_type type) { 872 876 … … 944 948 945 949 return (type == t_eph::Galileo) ? 255 : 15; 950 } 951 952 // Returns fit interval in hours from flag 953 //////////////////////////////////////////////////////////////////////////// 954 double fitIntervalFromFlag(int flag, double iodc, t_eph::e_type type) { 955 double fitInterval = 0.0; 956 957 switch (flag) { 958 case 0: 959 if (type == t_eph::GPS) { 960 fitInterval = 4.0; 961 } 962 else if (type == t_eph::QZSS) { 963 fitInterval = 2.0; 964 } 965 break; 966 case 1: 967 if (type == t_eph::GPS) { 968 if (iodc >= 240 && iodc <= 247) { 969 fitInterval = 8.0; 970 } 971 else if ((iodc >= 248 && iodc <= 255)  972 (iodc == 496) ) { 973 fitInterval = 14.0; 974 } 975 else if ((iodc >= 497 && iodc <= 503)  976 (iodc >= 2021 && iodc <= 1023) ) { 977 fitInterval = 26.0; 978 } 979 else { 980 fitInterval = 6.0; 981 } 982 } 983 break; 984 } 985 return fitInterval; 946 986 } 947 987 
trunk/BNC/src/bncutils.h
r8775 r8903 34 34 #include <bncconst.h> 35 35 #include <ephemeris.h> 36 37 class t_eph; 38 39 const double RHO_DEG = 180.0 / M_PI; 40 const double RHO_SEC = 3600.0 * 180.0 / M_PI; 41 const double MJD_J2000 = 51544.5; 42 43 static const QVector<int> ssrUpdateInt = QVector<int>() << 1 << 2 << 5 << 10 << 15 << 30 44 << 60 << 120 << 240 << 300 << 600 45 << 900 << 1800 << 3600 << 7200 46 << 10800; 36 47 37 48 void expandEnvVar(QString& str); … … 137 148 138 149 int indexFromAccuracy(double accuracy, t_eph::e_type type); 150 151 double fitIntervalFromFlag(int flag, double iodc, t_eph::e_type type); 139 152 140 153 double associatedLegendreFunction(int n, int m, double t); 
trunk/BNC/src/ephemeris.cpp
r8800 r8903 62 62 return failure; 63 63 } 64 const QVector<int> updateInt = QVector<int>() << 1 << 2 << 5 << 10 << 15 << 30 65 << 60 << 120 << 240 << 300 << 600 66 << 900 << 1800 << 3600 << 7200 67 << 10800; 64 68 65 xc.ReSize(6); 69 66 vv.ReSize(3); … … 75 72 double dtO = tt  _orbCorr>_time; 76 73 if (_orbCorr>_updateInt) { 77 dtO = (0.5 * updateInt[_orbCorr>_updateInt]);74 dtO = (0.5 * ssrUpdateInt[_orbCorr>_updateInt]); 78 75 } 79 76 ColumnVector dx(3); … … 97 94 double dtC = tt  _clkCorr>_time; 98 95 if (_clkCorr>_updateInt) { 99 dtC = (0.5 * updateInt[_clkCorr>_updateInt]);96 dtC = (0.5 * ssrUpdateInt[_clkCorr>_updateInt]); 100 97 } 101 98 xc[3] += _clkCorr>_dClk + _clkCorr>_dotDClk * dtC + _clkCorr>_dotDotDClk * dtC * dtC; … … 704 701 static const double C20 = 1082.6257e6; 705 702 706 double rho = rr. norm_Frobenius();703 double rho = rr.NormFrobenius(); 707 704 double t1 = gmWGS/(rho*rho*rho); 708 705 double t2 = 3.0/2.0 * C20 * (gmWGS*AE*AE) / (rho*rho*rho*rho*rho);
Note: See TracChangeset
for help on using the changeset viewer.