- Timestamp:
- Oct 9, 2014, 3:30:47 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/rinex/rnxobsfile.cpp
r6193 r6216 779 779 _header._obsTypes.clear(); 780 780 if (useObsTypes.size() == 0) { 781 _header._obsTypes = header._obsTypes; 781 if (int(_header._version) == int(header._version)) { 782 _header._obsTypes = header._obsTypes; 783 } 784 else if (int(_header._version) == 2) { 785 char sys0 = t_rnxObsHeader::defaultSystems[0].toAscii(); 786 for (int iObs = 0; iObs < header._obsTypes[sys0].size(); iObs++) { 787 _header._obsTypes[sys0].push_back(header.obsType(sys0, iObs, _header._version)); 788 } 789 for (int iSys = 1; iSys < t_rnxObsHeader::defaultSystems.length(); iSys++) { 790 char sysI = t_rnxObsHeader::defaultSystems[iSys].toAscii(); 791 _header._obsTypes[sysI] = _header._obsTypes[sys0]; 792 } 793 } 794 else if (int(_header._version) == 3) { 795 char sys0 = t_rnxObsHeader::defaultSystems[0].toAscii(); 796 for (int iSys = 0; iSys < t_rnxObsHeader::defaultSystems.length(); iSys++) { 797 char sysI = t_rnxObsHeader::defaultSystems[iSys].toAscii(); 798 for (int iObs = 0; iObs < header._obsTypes[sys0].size(); iObs++) { 799 _header._obsTypes[sysI].push_back(header.obsType(sys0, iObs, _header._version)); 800 } 801 } 802 } 782 803 } 783 804 else { 784 805 if (_header._version < 3.0) { 785 806 char sys0 = t_rnxObsHeader::defaultSystems[0].toAscii(); 786 for (int i i = 0; ii < useObsTypes.size(); ii++) {787 _header._obsTypes[sys0].push_back(useObsTypes[i i]);788 } 789 for (int i i = 1; ii < t_rnxObsHeader::defaultSystems.length(); ii++) {790 char sysI = t_rnxObsHeader::defaultSystems[i i].toAscii();807 for (int iObs = 0; iObs < useObsTypes.size(); iObs++) { 808 _header._obsTypes[sys0].push_back(useObsTypes[iObs]); 809 } 810 for (int iSys = 1; iSys < t_rnxObsHeader::defaultSystems.length(); iSys++) { 811 char sysI = t_rnxObsHeader::defaultSystems[iSys].toAscii(); 791 812 _header._obsTypes[sysI] = _header._obsTypes[sys0]; 792 813 } 793 814 } 794 815 else { 795 for (int i i = 0; ii < useObsTypes.size(); ii++) {796 if (useObsTypes[i i].indexOf(":") != -1) {797 QStringList hlp = useObsTypes[i i].split(":", QString::SkipEmptyParts);816 for (int iObs = 0; iObs < useObsTypes.size(); iObs++) { 817 if (useObsTypes[iObs].indexOf(":") != -1) { 818 QStringList hlp = useObsTypes[iObs].split(":", QString::SkipEmptyParts); 798 819 if (hlp.size() == 2 && hlp[0].length() == 1) { 799 820 char sys = hlp[0][0].toAscii(); … … 803 824 } 804 825 else { 805 QString type = useObsTypes[i i];806 for (int i i = 0; ii < t_rnxObsHeader::defaultSystems.length(); ii++) {807 char sys = t_rnxObsHeader::defaultSystems[i i].toAscii();826 QString type = useObsTypes[iObs]; 827 for (int iSys = 0; iSys < t_rnxObsHeader::defaultSystems.length(); iSys++) { 828 char sys = t_rnxObsHeader::defaultSystems[iSys].toAscii(); 808 829 _header._obsTypes[sys].push_back(type); 809 830 } … … 858 879 char sys = rnxSat.prn.system(); 859 880 860 for (int iType = 0; iType < nTypes(sys); iType++) {861 if (iType > 0 && iType% 5 == 0) {881 for (int iTypeV2 = 0; iTypeV2 < nTypes(sys); iTypeV2++) { 882 if (iTypeV2 > 0 && iTypeV2 % 5 == 0) { 862 883 *_stream << endl; 863 884 } 864 QString type = obsType(sys, iType, epo->version); 865 if (!rnxSat.obs.contains(type)) { 866 *_stream << QString().leftJustified(16); 867 } 868 else { 869 const t_rnxObs& rnxObs = rnxSat.obs[type]; 870 if (rnxObs.value == 0.0) { 871 *_stream << QString().leftJustified(16); 872 } 873 else { 874 *_stream << QString("%1").arg(rnxObs.value, 14, 'f', 3); 875 if (rnxObs.lli != 0.0) { 876 *_stream << QString("%1").arg(rnxObs.lli,1); 885 QString typeV2 = obsType(sys, iTypeV2); 886 bool found = false; 887 QMapIterator<QString, t_rnxObs> itObs(rnxSat.obs); 888 while (itObs.hasNext()) { 889 itObs.next(); 890 const QString& type = itObs.key(); 891 const t_rnxObs& rnxObs = itObs.value(); 892 if (typeV2 == type3to2(sys, type)) { 893 found = true; 894 if (rnxObs.value == 0.0) { 895 *_stream << QString().leftJustified(16); 877 896 } 878 897 else { 879 *_stream << ' '; 898 *_stream << QString("%1").arg(rnxObs.value, 14, 'f', 3); 899 if (rnxObs.lli != 0.0) { 900 *_stream << QString("%1").arg(rnxObs.lli,1); 901 } 902 else { 903 *_stream << ' '; 904 } 905 if (rnxObs.snr != 0.0) { 906 *_stream << QString("%1").arg(rnxObs.snr,1); 907 } 908 else { 909 *_stream << ' '; 910 } 880 911 } 881 if (rnxObs.snr != 0.0) { 882 *_stream << QString("%1").arg(rnxObs.snr,1); 883 } 884 else { 885 *_stream << ' '; 886 } 887 } 912 break; 913 } 914 } 915 if (!found) { 916 *_stream << QString().leftJustified(16); 888 917 } 889 918 }
Note:
See TracChangeset
for help on using the changeset viewer.