Changeset 11009 in ntrip


Ignore:
Timestamp:
Sep 9, 2026, 12:08:46 PM (5 hours ago)
Author:
stuerze
Message:

updates regarding RTCM-SSR: metadata usage in PPP, if available

Location:
trunk/BNC/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/PPP/pppClient.cpp

    r10952 r11009  
    112112void t_pppClient::putTec(const t_vTec* vTec) {
    113113  _obsPool->putTec(new t_vTec(*vTec));
     114}
     115
     116//
     117//////////////////////////////////////////////////////////////////////////////
     118void t_pppClient::putMetaData(const t_metaData* metaData) {
     119  _obsPool->putMetaData(new t_metaData(*metaData));
    114120}
    115121
     
    457463  // Tides
    458464  // -----
    459   station->setTideDsplEarth(_tides->earth(time, station->xyzApr()));
     465  // SSR Metadata (model correction type 3 = solid earth tides) tells us
     466  // whether - and with which model - the correction stream's generation
     467  // system already accounted for solid earth tides. To stay consistent with
     468  // the orbit/clock corrections, mirror that choice here: skip our own
     469  // correction if the provider applied none, apply our default model if the
     470  // provider used its own default, and fall back to our default (with a
     471  // warning) if the provider used some other, unsupported model - we have no
     472  // way to reproduce an unknown model exactly. Absent any Metadata message
     473  // (e.g. RTNET or older streams), keep today's unconditional behavior.
     474  bool applyEarthTide = true;
     475  const t_metaData* metaData = _obsPool->metaData();
     476  if (metaData) {
     477    for (unsigned ii = 0; ii < metaData->_entries.size(); ii++) {
     478      const t_metaDataEntry& entry = metaData->_entries[ii];
     479      if (entry._typeIndicator == 3) { // solid earth tides
     480        if (!entry._applicationIndicator) {
     481          applyEarthTide = false;
     482        }
     483        else if (entry._nonDefaultIndicator) {
     484          LOG << "WARNING: SSR Metadata signals a non-default solid earth "
     485              << "tide model (identifier " << entry._nonDefaultIdentifier
     486              << "); applying BNC's default model anyway, results may be "
     487              << "inconsistent" << endl;
     488        }
     489        break;
     490      }
     491    }
     492  }
     493  if (applyEarthTide) {
     494    station->setTideDsplEarth(_tides->earth(time, station->xyzApr()));
     495  }
     496  else {
     497    ColumnVector tideDsplEarth(3); tideDsplEarth = 0.0;
     498    station->setTideDsplEarth(tideDsplEarth);
     499  }
    460500  station->setTideDsplOcean(_tides->ocean(time, station->xyzApr(), station->name()));
    461501
  • trunk/BNC/src/PPP/pppClient.h

    r10938 r11009  
    2828  void putEphemeris(const t_eph* eph);
    2929  void putTec(const t_vTec* vTec);
     30  void putMetaData(const t_metaData* metaData);
    3031  void putOrbCorrections(const std::vector<t_orbCorr*>& corr);
    3132  void putClkCorrections(const std::vector<t_clkCorr*>& corr);
  • trunk/BNC/src/PPP/pppObsPool.cpp

    r10791 r11009  
    5252  }
    5353  _vTec = 0;
     54  _metaData = 0;
    5455}
    5556
     
    6465  }
    6566  delete _vTec;
     67  delete _metaData;
    6668  while (_epochs.size() > 0) {
    6769    delete _epochs.front();
     
    144146//
    145147/////////////////////////////////////////////////////////////////////////////
     148void t_pppObsPool::putMetaData(t_metaData* metaData) {
     149  delete _metaData;
     150  _metaData = new t_metaData(*metaData);
     151  delete metaData;
     152}
     153
     154//
     155/////////////////////////////////////////////////////////////////////////////
    146156void t_pppObsPool::putEpoch(const bncTime& epoTime, vector<t_pppSatObs*>& obsVector,
    147157                            bool pseudoObsIono) {
  • trunk/BNC/src/PPP/pppObsPool.h

    r10791 r11009  
    3333  void putPhaseBias(t_satPhaseBias* satPhaseBias);
    3434  void putTec(t_vTec* _vTec);
     35  void putMetaData(t_metaData* metaData);
    3536  void clearCodeBiases(char sys);
    3637  void clearPhaseBiases(char sys);
     
    4647  }
    4748  const t_vTec* vTec() const {return _vTec;}
     49  const t_metaData* metaData() const {return _metaData;}
    4850
    4951  t_epoch* lastEpoch() {
     
    6062  t_satPhaseBias*          _satPhaseBiases[t_prn::MAXPRN+1];
    6163  t_vTec*                  _vTec;
     64  t_metaData*              _metaData;
    6265  std::deque<t_epoch*>     _epochs;
    6366};
  • trunk/BNC/src/pppRun.cpp

    r10805 r11009  
    104104    connect(BNC_CORE, SIGNAL(newTec(t_vTec)),
    105105            this, SLOT(slotNewTec(t_vTec)),conType);
     106
     107    connect(BNC_CORE, SIGNAL(newMetaData(t_metaData)),
     108            this, SLOT(slotNewMetaData(t_metaData)),conType);
    106109
    107110    connect(BNC_CORE, SIGNAL(newOrbCorrections(QList<t_orbCorr>)),
     
    467470//
    468471////////////////////////////////////////////////////////////////////////////
     472void t_pppRun::slotNewMetaData(t_metaData metaData) {
     473  if (metaData._entries.size() == 0) {
     474    return;
     475  }
     476
     477  if (_opt->_realTime) {
     478    if (_opt->_corrMount.empty() || _opt->_corrMount != metaData._staID) {
     479      return;
     480    }
     481  }
     482  _pppClient->putMetaData(&metaData);
     483}
     484
     485//
     486////////////////////////////////////////////////////////////////////////////
    469487void t_pppRun::slotNewOrbCorrections(QList<t_orbCorr> orbCorr) {
    470488  if (orbCorr.size() == 0) {
     
    607625    connect(_corrFile, SIGNAL(newOrbCorrections(QList<t_orbCorr>)), this, SLOT(slotNewOrbCorrections(QList<t_orbCorr>)));
    608626    connect(_corrFile, SIGNAL(newClkCorrections(QList<t_clkCorr>)), this, SLOT(slotNewClkCorrections(QList<t_clkCorr>)));
     627    connect(_corrFile, SIGNAL(newMetaData(t_metaData)), this, SLOT(slotNewMetaData(t_metaData)));
    609628    if (_opt->_biasFile.empty()) {
    610629      connect(_corrFile, SIGNAL(newCodeBiases(QList<t_satCodeBias>)), this, SLOT(slotNewCodeBiases(QList<t_satCodeBias>)));
  • trunk/BNC/src/pppRun.h

    r10791 r11009  
    4141  void slotNewBDSEph(t_ephBDS);
    4242  void slotNewTec(t_vTec);
     43  void slotNewMetaData(t_metaData);
    4344  void slotNewOrbCorrections(QList<t_orbCorr> orbCorr);
    4445  void slotNewClkCorrections(QList<t_clkCorr> clkCorr);
Note: See TracChangeset for help on using the changeset viewer.