Changeset 4483 in ntrip


Ignore:
Timestamp:
Aug 3, 2012, 8:22:05 PM (12 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/bncrinex.cpp

    r4482 r4483  
    9191  _userName = _userName.leftJustified(20, ' ', true);
    9292
    93   if ( Qt::CheckState(settings.value("rnxV3").toInt()) == Qt::Checked) {
    94     _rinexVers = 3;   
    95   }
    96   else {
    97     _rinexVers = 2;
    98   }
    99 
    100   _approxPos[0] = _approxPos[1] = _approxPos[2] = 0.0;
    101 
    10293  _samplingRate = settings.value("rnxSampl").toInt();
    10394
     
    138129bncRinex::~bncRinex() {
    139130  bncSettings settings;
    140   if ((_rinexVers == 3) && ( Qt::CheckState(settings.value("rnxAppend").toInt()) != Qt::Checked) ) {
     131  if ((_header._version >= 3.0) && ( Qt::CheckState(settings.value("rnxAppend").toInt()) != Qt::Checked) ) {
    141132    _out << ">                              4  1" << endl;
    142133    _out << "END OF FILE" << endl;
     
    237228    }
    238229  }
     230
     231  bncSettings settings;
     232  if ( Qt::CheckState(settings.value("rnxV3").toInt()) == Qt::Checked) {
     233    _header._version = 3.01;   
     234  }
     235  else {
     236    _header._version = 2.12;
     237  }
    239238}
    240239
     
    438437  // Epoch header line: RINEX Version 3
    439438  // ----------------------------------
    440   if (_rinexVers == 3) {
     439  if (_header._version >= 3.0) {
    441440    _out << datTim.toString("> yyyy MM dd hh mm ").toAscii().data()
    442441         << setw(10) << setprecision(7) << sec
     
    502501    // RINEX Version 3
    503502    // ---------------
    504     if (_rinexVers == 3) {
     503    if (_header._version >= 3.0) {
    505504      _out << rinexSatLine(obs, lli1, lli2, lli5);
    506505      _out << endl;
     
    510509    // ---------------
    511510    else {
    512       _out << setw(14) << setprecision(3) << obs.measdata("C1", _rinexVers)  << ' '  << ' '
    513            << setw(14) << setprecision(3) << obs.measdata("P1", _rinexVers)  << ' '  << ' '
    514            << setw(14) << setprecision(3) << obs.measdata("L1", _rinexVers)  << lli1 << ' '
    515            << setw(14) << setprecision(3) << obs.measdata("S1", _rinexVers)  << ' '  << ' '
    516            << setw(14) << setprecision(3) << obs.measdata("C2", _rinexVers)  << ' '  << ' ' << endl
    517            << setw(14) << setprecision(3) << obs.measdata("P2", _rinexVers)  << ' '  << ' '
    518            << setw(14) << setprecision(3) << obs.measdata("L2", _rinexVers)  << lli2 << ' '
    519            << setw(14) << setprecision(3) << obs.measdata("S2", _rinexVers)  << endl;
     511      _out << setw(14) << setprecision(3) << obs.measdata("C1", _header._version)  << ' '  << ' '
     512           << setw(14) << setprecision(3) << obs.measdata("P1", _header._version)  << ' '  << ' '
     513           << setw(14) << setprecision(3) << obs.measdata("L1", _header._version)  << lli1 << ' '
     514           << setw(14) << setprecision(3) << obs.measdata("S1", _header._version)  << ' '  << ' '
     515           << setw(14) << setprecision(3) << obs.measdata("C2", _header._version)  << ' '  << ' ' << endl
     516           << setw(14) << setprecision(3) << obs.measdata("P2", _header._version)  << ' '  << ' '
     517           << setw(14) << setprecision(3) << obs.measdata("L2", _header._version)  << lli2 << ' '
     518           << setw(14) << setprecision(3) << obs.measdata("S2", _header._version)  << endl;
    520519    }
    521520  }
     
    527526////////////////////////////////////////////////////////////////////////////
    528527void bncRinex::closeFile() {
    529   if (_rinexVers == 3) {
     528  if (_header._version == 3) {
    530529    _out << ">                              4  1" << endl;
    531530    _out << "END OF FILE" << endl;
     
    555554  const QVector<QString>& types = _header._obsTypesV3[obs.satSys];
    556555  for (int ii = 0; ii < types.size(); ii++) {
    557     double value = obs.measdata(types[ii], _rinexVers);
     556    double value = obs.measdata(types[ii], _header._version);
    558557    str << setw(14) << setprecision(3) << value;
    559558    if      (value != 0.0 && types[ii].indexOf("L1") == 0) {
  • trunk/BNC/src/bncrinex.h

    r4482 r4483  
    4949   int samplingRate() const {return _samplingRate;}
    5050
    51    void setApproxPos(double stax, double stay, double staz) {
    52      _approxPos[0] = stax;
    53      _approxPos[1] = stay;
    54      _approxPos[2] = staz;
    55    }
    56 
    5751   std::string rinexSatLine(const t_obs& obs, char lli1, char lli2, char lli5);
    5852
     
    8579   bool          _reconnectFlag;
    8680   QDate         _skeletonDate;
    87    int           _rinexVers;
    88    double        _approxPos[3];
    8981   int           _samplingRate;
    9082
Note: See TracChangeset for help on using the changeset viewer.