Changeset 11047 in ntrip for trunk/BNC/src/bncephuser.cpp


Ignore:
Timestamp:
Sep 28, 2026, 11:17:34 AM (10 hours ago)
Author:
stuerze
Message:

updates regarding RTCM-SSR and some ovarall improvements

File:
1 edited

Legend:

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

    r11021 r11047  
    185185//
    186186////////////////////////////////////////////////////////////////////////////
     187bool bncEphUser::radialDistanceOk(const t_eph* eph) {
     188  ColumnVector xc(6);
     189  ColumnVector vv(3);
     190  if (eph->getCrd(eph->TOC(), xc, vv, false) != success) {
     191    return false;
     192  }
     193  double rr = xc.Rows(1,3).NormFrobenius();
     194
     195  const double MINDIST = 2.e7;
     196  const double MAXDIST = 6.e7;
     197  if (rr < MINDIST || rr > MAXDIST || std::isnan(rr)) {
     198    return false;
     199  }
     200  return true;
     201}
     202
     203//
     204////////////////////////////////////////////////////////////////////////////
    187205void bncEphUser::checkEphemeris(t_eph* eph, bool realTime) {
    188206
    … …  
    211229  // Simple Check - check satellite radial distance
    212230  // ----------------------------------------------
     231  if (!radialDistanceOk(eph)) {
     232    eph->setCheckState(t_eph::bad);
     233    return;
     234  }
    213235  ColumnVector xc(6);
    214236  ColumnVector vv(3);
    215   if (eph->getCrd(eph->TOC(), xc, vv, false) != success) {
    216     eph->setCheckState(t_eph::bad);
    217     return;
    218   }
    219   double rr = xc.Rows(1,3).NormFrobenius();
    220 
    221   const double MINDIST = 2.e7;
    222   const double MAXDIST = 6.e7;
    223   if (rr < MINDIST || rr > MAXDIST || std::isnan(rr)) {
    224     eph->setCheckState(t_eph::bad);
    225     return;
    226   }
     237  eph->getCrd(eph->TOC(), xc, vv, false);
    227238
    228239  // Check consistency with older ephemeris
Note: See TracChangeset for help on using the changeset viewer.