Changeset 10608 in ntrip for trunk/BNC/src/bncclockrinex.cpp


Ignore:
Timestamp:
Feb 13, 2025, 9:50:06 AM (12 months ago)
Author:
stuerze
Message:

inclusion of the 24:00 epoch in orbit and clock product files

File:
1 edited

Legend:

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

    r9908 r10608  
    4747  if (reopen(GPSweek, GPSweeks) == success) {
    4848
    49       QDateTime datTim = dateAndTimeFromGPSweek(GPSweek, GPSweeks);
    50       double sec = fmod(GPSweeks, 60.0);
     49    bncTime epoTime(GPSweek, GPSweeks);
    5150
    52       int numValues = 1;
    53       if (clkRnxSig && clkRnxRate && clkRnxRateSig) {
    54         numValues += 3;
    55       }
    56       if (clkRnxAcc && clkRnxAccSig) {
    57         numValues += 2;
     51    if (epoTime != _lastEpoTime) {
     52
     53      // print out epoch before
     54      if (_lastEpoTime.valid()) {
     55        _out << _oStr.str();
     56        if (_lastEpoTime.daysec() != 0.0) {
     57          _oStr.str(std::string());
     58        }
    5859      }
    5960
    60       _out << "AS " << prn.toLatin1().data()
    61            << datTim.toString("  yyyy MM dd hh mm").toLatin1().data()
    62            << fixed      << setw(10) << setprecision(6)  << sec
    63            << "  " << numValues << "   "
    64            << fortranFormat(clkRnx, 19, 12).toLatin1().data();
     61      _lastEpoTime = epoTime;
     62    }
    6563
    66       if (numValues >=2) {
    67         _out << " " << fortranFormat(clkRnxSig, 19, 12).toLatin1().data() << endl;
    68       }
    69       if (numValues == 4) {
    70         _out << fortranFormat(clkRnxRate, 19, 12).toLatin1().data() << " ";
    71         _out << fortranFormat(clkRnxRateSig, 19, 12).toLatin1().data() << " ";
    72       }
    73       if (numValues == 6) {
    74         _out << fortranFormat(clkRnxAcc, 19, 12).toLatin1().data() << " ";
    75         _out << " " << fortranFormat(clkRnxAccSig, 19, 12).toLatin1().data();
    76       }
    77       _out << endl;
     64    int numValues = 1;
     65    if (clkRnxSig && clkRnxRate && clkRnxRateSig) {
     66      numValues += 3;
     67    }
     68    if (clkRnxAcc && clkRnxAccSig) {
     69      numValues += 2;
     70    }
     71
     72    _oStr << "AS " << prn.toLatin1().data()
     73         << "  " <<  epoTime.datestr(' ') << ' ' << epoTime.timestr(6, ' ')
     74         << "  " << numValues << "   "
     75         << fortranFormat(clkRnx, 19, 12).toLatin1().data();
     76
     77    if (numValues >=2) {
     78      _oStr << " " << fortranFormat(clkRnxSig, 19, 12).toLatin1().data() << endl;
     79    }
     80    if (numValues == 4) {
     81      _oStr << fortranFormat(clkRnxRate, 19, 12).toLatin1().data() << " ";
     82      _oStr << fortranFormat(clkRnxRateSig, 19, 12).toLatin1().data() << " ";
     83    }
     84    if (numValues == 6) {
     85      _oStr << fortranFormat(clkRnxAcc, 19, 12).toLatin1().data() << " ";
     86      _oStr << " " << fortranFormat(clkRnxAccSig, 19, 12).toLatin1().data();
     87    }
     88    _oStr << endl;
    7889
    7990    return success;
Note: See TracChangeset for help on using the changeset viewer.