Changeset 10587 in ntrip for trunk/BNC/src/bncutils.cpp
- Timestamp:
- Dec 10, 2024, 3:57:21 PM (3 days ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/bncutils.cpp
r10577 r10587 266 266 267 267 // update interval: 2h, data sets are valid for 4 hours 268 if (eph-> type() == t_eph::GPS && (dt > 14400.0 || dt < -7200.0)) {268 if (eph->system() == t_eph::GPS && (dt > 14400.0 || dt < -7200.0)) { 269 269 return true; 270 270 } 271 271 // update interval: 3h, data sets are valid for 4 hours 272 else if (eph-> type() == t_eph::Galileo && (dt > 14400.0 || dt < 0.0)) {272 else if (eph->system() == t_eph::Galileo && (dt > 14400.0 || dt < 0.0)) { 273 273 return true; 274 274 } 275 275 // updated every 30 minutes + 5 min 276 else if (eph-> type() == t_eph::GLONASS && (dt > 2100.0 || dt < -2100.0)) {276 else if (eph->system() == t_eph::GLONASS && (dt > 2100.0 || dt < -2100.0)) { 277 277 return true; 278 278 } 279 279 // orbit parameters are valid for 7200 seconds (minimum) 280 else if (eph-> type() == t_eph::QZSS && (dt > 7200.0 || dt < -3600.0)) {280 else if (eph->system() == t_eph::QZSS && (dt > 7200.0 || dt < -3600.0)) { 281 281 return true; 282 282 } 283 283 // maximum update interval: 300 sec 284 else if (eph-> type() == t_eph::SBAS && (dt > 600.0 || dt < -600.0)) {284 else if (eph->system() == t_eph::SBAS && (dt > 600.0 || dt < -600.0)) { 285 285 return true; 286 286 } 287 287 // updates 1h + 5 min 288 else if (eph-> type() == t_eph::BDS && (dt > 3900.0 || dt < 0.0) ) {288 else if (eph->system() == t_eph::BDS && (dt > 3900.0 || dt < 0.0) ) { 289 289 return true; 290 290 } 291 291 // update interval: up to 24 hours 292 else if (eph-> type() == t_eph::IRNSS && (fabs(dt > 86400.0))) {292 else if (eph->system() == t_eph::IRNSS && (fabs(dt > 86400.0))) { 293 293 return true; 294 294 } … … 845 845 // 846 846 //////////////////////////////////////////////////////////////////////////// 847 double accuracyFromIndex(int index, t_eph::e_ type type) {847 double accuracyFromIndex(int index, t_eph::e_system system) { 848 848 double accuracy = -1.0; 849 849 850 if ( type== t_eph::GPS ||851 type== t_eph::BDS ||852 type== t_eph::SBAS||853 type== t_eph::QZSS||854 type== t_eph::IRNSS) {850 if (system == t_eph::GPS || 851 system == t_eph::BDS || 852 system == t_eph::SBAS|| 853 system == t_eph::QZSS|| 854 system == t_eph::IRNSS) { 855 855 if ((index >= 0) && (index <= 6)) { 856 856 if (index == 3) { … … 869 869 } 870 870 } 871 else if ( type== t_eph::Galileo) {871 else if (system == t_eph::Galileo) { 872 872 if ((index >= 0) && (index <= 49)) { 873 873 accuracy = (double(index) / 100.0); … … 891 891 // 892 892 //////////////////////////////////////////////////////////////////////////// 893 int indexFromAccuracy(double accuracy, t_eph::e_ type type) {894 895 if ( type== t_eph::GPS ||896 type== t_eph::BDS ||897 type== t_eph::SBAS ||898 type== t_eph::QZSS ||899 type== t_eph::IRNSS) {893 int indexFromAccuracy(double accuracy, t_eph::e_system system) { 894 895 if (system == t_eph::GPS || 896 system == t_eph::BDS || 897 system == t_eph::SBAS || 898 system == t_eph::QZSS || 899 system == t_eph::IRNSS) { 900 900 901 901 if (accuracy <= 2.40) { … … 949 949 } 950 950 951 if ( type== t_eph::Galileo) {951 if (system == t_eph::Galileo) { 952 952 if (accuracy <= 0.49) { 953 953 return int(ceil(accuracy * 100.0)); … … 967 967 } 968 968 969 return ( type== t_eph::Galileo) ? 255 : 15;969 return (system == t_eph::Galileo) ? 255 : 15; 970 970 } 971 971 972 972 // Returns fit interval in hours from flag 973 973 //////////////////////////////////////////////////////////////////////////// 974 double fitIntervalFromFlag(int flag, double iodc, t_eph::e_ type type) {974 double fitIntervalFromFlag(int flag, double iodc, t_eph::e_system system) { 975 975 double fitInterval = 0.0; 976 976 977 977 switch (flag) { 978 978 case 0: 979 if ( type== t_eph::GPS) {979 if (system == t_eph::GPS) { 980 980 fitInterval = 4.0; 981 981 } 982 else if ( type== t_eph::QZSS) {982 else if (system == t_eph::QZSS) { 983 983 fitInterval = 2.0; 984 984 } 985 985 break; 986 986 case 1: 987 if ( type== t_eph::GPS) {987 if (system == t_eph::GPS) { 988 988 if (iodc >= 240 && iodc <= 247) { 989 989 fitInterval = 8.0;
Note:
See TracChangeset
for help on using the changeset viewer.