Changeset 11009 in ntrip for trunk/BNC/src/PPP


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

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

Location:
trunk/BNC/src/PPP
Files:
4 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};
Note: See TracChangeset for help on using the changeset viewer.