Changeset 689 in ntrip for trunk/BNC/bncrinex.cpp


Ignore:
Timestamp:
Feb 15, 2008, 1:42:04 PM (16 years ago)
Author:
weber
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncrinex.cpp

    r675 r689  
    404404      else if (line.indexOf("# / TYPES OF OBSERV") != -1) {
    405405        if (_rinexVers == 3) {
    406           _out << "G    6 C1C L1C S1C C2P L2P S2P                              SYS / # / OBS TYPES" << endl;
    407           _out << "R    6 C1C L1C S1C C2P L2P S2P                              SYS / # / OBS TYPES" << endl;
    408           _out << "S    6 C1C L1C S1C C2P L2P S2P                              SYS / # / OBS TYPES" << endl;
     406// Changed declaration of data types, consistent with Rinex3 Perlt 
     407          _out << "G   10 C1C C1P L1C S1C C2X C2P L2X S2X L2P S2P              SYS / # / OBS TYPES" << endl;
     408          _out << "R   10 C1C C1P L1C S1C C2C C2P L2C S2C L2P S2P              SYS / # / OBS TYPES" << endl;
     409          _out << "S    3 C1C L1C S1C                                          SYS / # / OBS TYPES" << endl;
    409410        }
    410411        else {
     
    420421                      _mountPoint.path())).leftJustified(60, ' ', true);
    421422        _out << hlp.toAscii().data() << "COMMENT" << endl;
     423      }
     424// Added header line for Rinex3 regarding mandatory MARKER TYPE field Perlt
     425      else if (line.indexOf("MARKER NAME") != -1) {
     426        if (_rinexVers == 3) {
     427          _out << line.toAscii().data() << endl;
     428          _out << setw(71) << "GEODETIC                                                    MARKER TYPE" << endl;
     429        }
     430        else {
     431          _out << line.toAscii().data() << endl;
     432        }
     433// End
    422434      }
    423435      else {
     
    447459    _out.setf(ios::left);
    448460    _out << setw(60) << _statID.data()                               << "MARKER NAME"          << endl;
     461// Added header line for Rinex3 regarding mandatory MARKER TYPE field Perlt
     462    if (_rinexVers == 3) {
     463      _out << setw(60) << "unknown"                                  << "MARKER TYPE      "    << endl;
     464    }
     465// End
    449466    _out << setw(60) << "unknown             unknown"                << "OBSERVER / AGENCY"    << endl;
    450467    _out << setw(20) << "unknown"   
     
    464481         << "                  "                                     << "ANTENNA: DELTA H/E/N" << endl;
    465482    if (_rinexVers == 3) {
    466       _out << "G    6 C1C L1C S1C C2P L2P S2P                              SYS / # / OBS TYPES" << endl;
    467       _out << "R    6 C1C L1C S1C C2P L2P S2P                              SYS / # / OBS TYPES" << endl;
    468       _out << "S    6 C1C L1C S1C C2P L2P S2P                              SYS / # / OBS TYPES" << endl;
     483// Changed declaration of data types, consistent with Rinex3 Perlt 
     484      _out << "G   10 C1C C1P L1C S1C C2X C2P L2X S2X L2P S2P              SYS / # / OBS TYPES" << endl;
     485      _out << "R   10 C1C C1P L1C S1C C2C C2P L2C S2C L2P S2P              SYS / # / OBS TYPES" << endl;
     486      _out << "S    3 C1C L1C S1C                                          SYS / # / OBS TYPES" << endl;
    469487
    470488    }
     
    545563  // ---------------
    546564  if (_rinexVers == 3) {
     565    char sbasflag = 'S';
    547566    _out << datTim.toString("> yyyy MM dd hh mm ").toAscii().data()
    548567         << setw(10) << setprecision(7) << sec
     
    552571    while (it.hasNext()) {
    553572      p_obs obs = it.next();
     573// Changed data output, C1P, C2C|X, L2C|X, S2C|X added. Changed Output for SBAS Perlt 
     574      if (sbasflag != obs->_o.satSys) {
    554575      _out << obs->_o.satSys
    555576           << setw(2) << setfill('0') << obs->_o.satNum << setfill(' ')
    556577           << setw(14) << setprecision(3) << obs->_o.C1 << "  " 
     578           << setw(14) << setprecision(3) << obs->_o.P1 << "  " 
    557579           << setw(14) << setprecision(3) << obs->_o.L1 << " "
    558580           << setw(1)                     << obs->_o.SNR1
    559581           << setw(14) << setprecision(3) << obs->_o.S1 << "  "
    560            << setw(14) << setprecision(3) << obs->_o.P2 << "  "
    561            << setw(14) << setprecision(3) << obs->_o.L2 << " "
    562            << setw(1)                     << obs->_o.SNR2
    563            << setw(14) << setprecision(3) << obs->_o.S2
    564            << endl;
     582           << setw(14) << setprecision(3) << obs->_o.C2 << "  " 
     583           << setw(14) << setprecision(3) << obs->_o.P2 << "  " ;
     584      if ((obs->_o.C2 != 0.0) && (obs->_o.P2 == 0.0)) {
     585       _out << setw(14) << setprecision(3) << obs->_o.L2 << " "
     586            << setw(1)                     << obs->_o.SNR2
     587            << setw(14) << setprecision(3) << obs->_o.S2 << "  "
     588            << "                              ";
     589      }
     590      else {
     591       _out << "                                "
     592            << setw(14) << setprecision(3) << obs->_o.L2 << " "
     593            << setw(1)                     << obs->_o.SNR2
     594            << setw(14) << setprecision(3) << obs->_o.S2;
     595      }
     596      _out << endl;
     597      }
     598      else {
     599      _out << obs->_o.satSys
     600           << setw(2) << setfill('0') << obs->_o.satNum << setfill(' ')
     601           << setw(14) << setprecision(3) << obs->_o.C1 << "  " 
     602           << setw(14) << setprecision(3) << obs->_o.P1 << "  " 
     603           << setw(14) << setprecision(3) << obs->_o.L1 << " "
     604           << setw(1)                     << obs->_o.SNR1
     605           << setw(14) << setprecision(3) << obs->_o.S1 << endl;
     606      }
    565607      delete obs;
    566608    }
Note: See TracChangeset for help on using the changeset viewer.