Changeset 9765 in ntrip for trunk/BNC/src/bnccore.cpp


Ignore:
Timestamp:
Jun 20, 2022, 4:54:59 PM (23 months ago)
Author:
stuerze
Message:

some more changes to consider RINEX Version 4 nav file (EPH key only)

File:
1 edited

Legend:

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

    r9760 r9765  
    203203#ifdef BNC_DEBUG_BCEP
    204204  if      (eph->checkState() == t_eph::bad) {
    205     messagePrivate(QString("%1: WRONG EPHEMERIS: %2")
     205    messagePrivate(QString("%1: WRONG %2:%3")
    206206                   .arg(eph->receptStaID())
    207                    .arg(eph->rinexDateStr(eph->TOC(), eph->prn(), 3.0)).toLatin1());
     207                   .arg(eph->navTypeString(eph->navType(), eph->prn(), 99.0))
     208                   .arg(eph->rinexDateStr(eph->TOC(), eph->prn(), 99.0)).toLatin1());
    208209    return failure;
    209210  }
    210211  else if (eph->checkState() == t_eph::outdated) {
    211     messagePrivate(QString("%1: OUTDATED EPHEMERIS: %2")
     212    messagePrivate(QString("%1: OUTDATED %2:%3")
    212213                   .arg(eph->receptStaID())
    213                    .arg(eph->rinexDateStr(eph->TOC(), eph->prn(), 3.0)).toLatin1());
     214                   .arg(eph->navTypeString(eph->navType(), eph->prn(), 99.0))
     215                   .arg(eph->rinexDateStr(eph->TOC(), eph->prn(), 99.0)).toLatin1());
    214216    return failure;
    215217  }
    216218  else if (eph->checkState() == t_eph::unhealthy) {
    217     messagePrivate(QString("%1: UNHEALTHY EPHEMERIS: %2")
     219    messagePrivate(QString("%1: UNHEALTHY %2:%3")
    218220                   .arg(eph->receptStaID())
    219                    .arg(eph->rinexDateStr(eph->TOC(), eph->prn(), 3.0)).toLatin1());
     221                   .arg(eph->navTypeString(eph->navType(), eph->prn(), 99.0))
     222                   .arg(eph->rinexDateStr(eph->TOC(), eph->prn(), 99.0)).toLatin1());
    220223  }
    221224#endif
     
    383386    if (_rinexVers > 2) {
    384387      if ( ! (appendFlagGPS & QIODevice::Append)) {
     388        double rinexVersion = defaultRnxNavVersion4;
     389        if (_rinexVers < 4.0) {
     390          rinexVersion = defaultRnxNavVersion3;
     391        }
    385392        QString line = QString().asprintf("%9.2f%11sN: GNSS NAV DATA    M: Mixed%12sRINEX VERSION / TYPE\n",
    386           defaultRnxNavVersion3, "", "");
     393            rinexVersion, "", "");
    387394        *_ephStreamGPS << line;
    388395        line.clear();
     
    397404        while (it.hasNext()) {
    398405          *_ephStreamGPS << it.next().trimmed().left(60).leftJustified(60) << "COMMENT\n";
     406        }
     407
     408        if (_rinexVers == 4) {
     409          int leapSecs = gnumleap(datTim.date().year(), datTim.date().month(), datTim.date().day());
     410          *_ephStreamGPS << QString("%1").arg(leapSecs, 6, 10, QLatin1Char(' ')).left(60).leftJustified(60)
     411                  << "LEAP SECONDS\n";
    399412        }
    400413
     
    471484    printOutputEph(printFile, _ephStreamGPS, strV2, strV3, strV4);
    472485  }
    473   else if (_rinexVers == 3) {
     486  else if (_rinexVers >= 3) {
    474487    printOutputEph(printFile, _ephStreamGPS, strV2, strV3, strV4);
    475488  }
Note: See TracChangeset for help on using the changeset viewer.