Changeset 11179 in ntrip for trunk/BNC/src/pppRun.cpp


Ignore:
Timestamp:
Nov 6, 2026, 4:05:20 PM (6 hours ago)
Author:
stuerze
Message:

structuered logging is added and bug is fixed in SP3 file writing

File:
1 edited

Legend:

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

    r11136 r11179  
    7070  connect(this, SIGNAL(newMessage(QByteArray,bool)),
    7171          BNC_CORE, SLOT(slotMessage(const QByteArray,bool)));
     72  connect(this, SIGNAL(newLogRecord(t_logRecord,bool)),
     73          BNC_CORE, SLOT(slotLogRecord(t_logRecord,bool)));
     74  t_logRecord::registerStation(QByteArray(_opt->_roverName.c_str()));
    7275
    7376  connect(this,     SIGNAL(newPosition(QByteArray, bncTime, QVector<double>)),
    … …  
    463466        }
    464467      }
    465       emit newMessage(QByteArray(log.str().c_str()), true);
     468      if (output._error) {
     469        emit newLogRecord(t_logRecord(t_logRecord::warning, "ppp", "ppp_epoch_failed",
     470                                      staID, QByteArray(log.str().c_str())), true);
     471      }
     472      else {
     473        t_logRecord rec(t_logRecord::info, "ppp", "ppp_position", staID,
     474                        QByteArray(log.str().c_str()));
     475        rec.add("epoch", QByteArray((output._epoTime.datestr() + 'T' +
     476                                     output._epoTime.timestr(3)).c_str()))
     477           .add("x", output._xyzRover[0], 4)
     478           .add("y", output._xyzRover[1], 4)
     479           .add("z", output._xyzRover[2], 4)
     480           .add("dn", output._neu[0], 4)
     481           .add("de", output._neu[1], 4)
     482           .add("du", output._neu[2], 4)
     483           .add("trp0", output._trp0, 4)
     484           .add("trp", output._trp, 4)
     485           .add("trp_stdev", output._trpStdev, 4)
     486           .add("num_sat", output._numSat)
     487           .add("hdop", output._hDop, 2)
     488           .add("fixed", output._fixRatio > 0.0)
     489           .add("fix_percent", int(100*output._fixRatio));
     490        emit newLogRecord(rec, true);
     491      }
    466492    }
    467493    else {
Note: See TracChangeset for help on using the changeset viewer.