Changeset 7767 in ntrip for trunk


Ignore:
Timestamp:
Feb 11, 2016, 2:38:46 PM (3 years ago)
Author:
stuerze
Message:

some bugs in SINEX TRO header line fixed

File:
1 edited

Legend:

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

    r7766 r7767  
    6060  int dayOfYear = datTim.date().dayOfYear();
    6161  QString yy    = datTim.toString("yy");
    62 
    6362  QString creationTime = QString("%1:%2:%3").arg(yy)
    6463                                            .arg(dayOfYear, 3, 10, QLatin1Char('0'))
    6564                                            .arg(daysec   , 5, 10, QLatin1Char('0'));
    6665  QString startTime = creationTime;
    67   QString endTime = QString("%1:%2:%3").arg(yy)
    68                                        .arg(dayOfYear, 3, 10, QLatin1Char('0'))
    69                                        .arg(84600    , 5, 10);
    70 
    7166  QString intStr = settings.value("PPP/snxtroIntr").toString();
    7267  int intr, indHlp = 0;
     
    8378    intr *= 86400;
    8479  }
    85 
    86   QString numberOfEpochs = QString("%1").arg(intr * _sampl, 5, 10, QLatin1Char('0'));
     80  int nominalStartSec = daysec - (int(fmod(double(daysec), double(intr))));
     81  int nominalEndSec = nominalStartSec + intr - _sampl;
     82  QString endTime = QString("%1:%2:%3").arg(yy)
     83                                       .arg(dayOfYear     , 3, 10, QLatin1Char('0'))
     84                                       .arg(nominalEndSec , 5, 10, QLatin1Char('0'));
     85  int numEpochs = ((nominalEndSec - daysec) / _sampl) +1;
     86  QString epo  = QString("%1").arg(numEpochs, 5, 10, QLatin1Char('0'));
    8787  QString ac   = QString("%1").arg(settings.value("PPP/snxtroAc").toString(),3,QLatin1Char('0'));
    8888  QString sol  = QString("%1").arg(settings.value("PPP/snxtroSol").toString(),4,QLatin1Char('0'));
    8989  QString corr = settings.value("PPP/corrMount").toString();
     90
    9091  _out << "%=TRO 2.00 " << ac.toStdString() << " "
    91        << creationTime.toStdString()   << " "  << ac.toStdString() << " "
    92        << startTime.toStdString()      << " "  << endTime.toStdString() << " P "
    93        << numberOfEpochs.toStdString() << " 0 " << " T " << endl;
     92       << creationTime.toStdString() << " " << ac.toStdString() << " "
     93       << startTime.toStdString()    << " " << endTime.toStdString() << " P "
     94       << epo.toStdString() << " 0 " << " T " << endl;
    9495
    9596  _out << "+FILE/REFERENCE" << endl;
Note: See TracChangeset for help on using the changeset viewer.