Changeset 8801 in ntrip for trunk/BNC/src/bncutils.cpp
- Timestamp:
- Sep 20, 2019, 2:46:25 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/bncutils.cpp
r8790 r8801 173 173 } 174 174 } 175 176 175 } 177 176 … … 810 809 811 810 double accuracyFromIndex(int index, t_eph::e_type type) { 811 double accuracy = -1.0; 812 812 813 813 if (type == t_eph::GPS || … … 817 817 if ((index >= 0) && (index <= 6)) { 818 818 if (index == 3) { 819 returnceil(10.0 * pow(2.0, (double(index) / 2.0) + 1.0)) / 10.0;819 accuracy = ceil(10.0 * pow(2.0, (double(index) / 2.0) + 1.0)) / 10.0; 820 820 } 821 821 else { 822 returnfloor(10.0 * pow(2.0, (double(index) / 2.0) + 1.0)) / 10.0;822 accuracy = floor(10.0 * pow(2.0, (double(index) / 2.0) + 1.0)) / 10.0; 823 823 } 824 824 } 825 825 else if ((index > 6) && (index <= 15)) { 826 return(10.0 * pow(2.0, (double(index) - 2.0))) / 10.0;826 accuracy = (10.0 * pow(2.0, (double(index) - 2.0))) / 10.0; 827 827 } 828 828 else { 829 return8192.0;829 accuracy = 8192.0; 830 830 } 831 831 } 832 832 else if (type == t_eph::Galileo) { 833 834 833 if ((index >= 0) && (index <= 49)) { 835 return(double(index) / 100.0);834 accuracy = (double(index) / 100.0); 836 835 } 837 836 else if ((index > 49) && (index <= 74)) { 838 return(50.0 + (double(index) - 50.0) * 2.0) / 100.0;837 accuracy = (50.0 + (double(index) - 50.0) * 2.0) / 100.0; 839 838 } 840 839 else if ((index > 74) && (index <= 99)) { 841 return1.0 + (double(index) - 75.0) * 0.04;840 accuracy = 1.0 + (double(index) - 75.0) * 0.04; 842 841 } 843 842 else if ((index > 99) && (index <= 125)) { 844 return2.0 + (double(index) - 100.0) * 0.16;843 accuracy = 2.0 + (double(index) - 100.0) * 0.16; 845 844 } 846 845 else { 847 return-1.0;846 accuracy = -1.0; 848 847 } 849 848 } … … 851 850 if ((index >= 0) && (index <= 6)) { 852 851 if (index == 1) { 853 return2.8;852 accuracy = 2.8; 854 853 } 855 854 else if (index == 3) { 856 return5.7;855 accuracy = 5.7; 857 856 } 858 857 else if (index == 5) { 859 return11.3;858 accuracy = 11.3; 860 859 } 861 860 else { 862 returnpow(2, 1 + index / 2);861 accuracy = pow(2, 1 + index / 2); 863 862 } 864 863 } 865 864 else if ((index > 6) && (index <= 15)) { 866 return pow(2, index - 1); 867 } 868 } 869 870 return double(index); 865 accuracy = pow(2, index - 2); 866 } 867 } 868 return accuracy; 871 869 } 872 870
Note:
See TracChangeset
for help on using the changeset viewer.