Changeset 4055 in ntrip for trunk/BNC/rinex
- Timestamp:
- Apr 26, 2012, 1:11:41 PM (13 years ago)
- Location:
- trunk/BNC/rinex
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/rinex/rnxobsfile.cpp
r4054 r4055 716 716 } 717 717 718 if (_header._version < 3.0) { 719 QString hlp; 720 QTextStream(&hlp) << QString("%1").arg(_header._obsTypesV2.size(), 6); 721 for (int ii = 0; ii < _header._obsTypesV2.size(); ii++) { 722 QTextStream(&hlp) << QString("%1").arg(_header._obsTypesV2[ii], 6); 723 if (ii > 0 && (ii % 8 == 0 || ii == _header._obsTypesV2.size()-1)) { 724 *_stream << hlp.leftJustified(60) << "# / TYPES OF OBSERV\n"; 725 hlp = QString().leftJustified(6); 726 } 727 } 728 } 729 else { 730 QMapIterator<char, QVector<QString> > it(_header._obsTypesV3); 731 while (it.hasNext()) { 732 it.next(); 733 char sys = it.key(); 734 const QVector<QString>& types = it.value(); 735 QString hlp; 736 QTextStream(&hlp) << QString("%1 %2").arg(sys).arg(types.size(), 3); 737 for (int ii = 0; ii < types.size(); ii++) { 738 QTextStream(&hlp) << QString(" %1").arg(types[ii], -3); 739 if (ii > 0 && (ii % 12 == 0 || ii == types.size()-1)) { 740 *_stream << hlp.leftJustified(60) << "SYS / # / OBS TYPES\n"; 741 hlp = QString().leftJustified(6); 742 } 743 } 744 } 745 } 718 *_stream << obsTypesStrings().join(""); 746 719 747 720 *_stream << QString("%1") … … 768 741 .leftJustified(60) 769 742 << "END OF HEADER\n"; 743 } 744 745 // Write Observation Types 746 //////////////////////////////////////////////////////////////////////////// 747 QStringList t_rnxObsFile::obsTypesStrings() { 748 749 QStringList strList; 750 751 if (_header._version < 3.0) { 752 QString hlp; 753 QTextStream(&hlp) << QString("%1").arg(_header._obsTypesV2.size(), 6); 754 for (int ii = 0; ii < _header._obsTypesV2.size(); ii++) { 755 QTextStream(&hlp) << QString("%1").arg(_header._obsTypesV2[ii], 6); 756 if (ii > 0 && (ii % 8 == 0 || ii == _header._obsTypesV2.size()-1)) { 757 strList.append(hlp.leftJustified(60) + "# / TYPES OF OBSERV\n"); 758 hlp = QString().leftJustified(6); 759 } 760 } 761 } 762 else { 763 QMapIterator<char, QVector<QString> > it(_header._obsTypesV3); 764 while (it.hasNext()) { 765 it.next(); 766 char sys = it.key(); 767 const QVector<QString>& types = it.value(); 768 QString hlp; 769 QTextStream(&hlp) << QString("%1 %2").arg(sys).arg(types.size(), 3); 770 for (int ii = 0; ii < types.size(); ii++) { 771 QTextStream(&hlp) << QString(" %1").arg(types[ii], -3); 772 if (ii > 0 && (ii % 12 == 0 || ii == types.size()-1)) { 773 strList.append(hlp.leftJustified(60) + "SYS / # / OBS TYPES\n"); 774 hlp = QString().leftJustified(6); 775 } 776 } 777 } 778 } 779 780 return strList; 770 781 } 771 782 … … 1034 1045 1035 1046 if (!same) { 1036 writeHeader();1037 } 1038 } 1047 *_stream << obsTypesStrings().join(""); 1048 } 1049 } -
trunk/BNC/rinex/rnxobsfile.h
r4053 r4055 142 142 void checkNewHeader(const t_rnxObsHeader& header); 143 143 void writeHeader(); 144 QStringList obsTypesStrings(); 144 145 void writeEpoch(const t_rnxEpo* epo); 145 146
Note:
See TracChangeset
for help on using the changeset viewer.