Changeset 10628 in ntrip


Ignore:
Timestamp:
Mar 17, 2025, 4:58:50 PM (3 days ago)
Author:
stuerze
Message:
 
Location:
trunk/BNC/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/BNC/src/ephemeris.cpp

    r10619 r10628  
    6060    bool useCorr) const {
    6161
    62   if (_checkState == bad || _checkState == unhealthy
    63       || _checkState == outdated) {
     62  if (_checkState == bad ||
     63      _checkState == unhealthy ||
     64      _checkState == outdated) {
    6465    return failure;
    6566  }
     
    10471048}
    10481049
     1050// Health status of GPS Ephemeris (virtual)
     1051////////////////////////////////////////////////////////////////////////////
     1052unsigned int t_ephGPS::isUnhealthy() const {
     1053
     1054  switch (system()) {
     1055    case t_eph::GPS:
     1056    case t_eph::QZSS:
     1057      switch (type()) {
     1058        case  t_eph::LNAV:
     1059        case  t_eph::CNAV:
     1060        case  t_eph::CNV2:
     1061          if (_health == 0.0) {
     1062            return 0;
     1063          }
     1064          else {
     1065            return 1;
     1066          }
     1067          break;
     1068      }
     1069      break;
     1070    case t_eph::NavIC:
     1071      switch (type()) {
     1072        case t_eph::LNAV:
     1073          if (_health == 0.0) { // L1 & S healthy
     1074            return 0;
     1075          }
     1076          if (_health == 1.0 || // L5 healthy and S unhealthy,
     1077              _health == 2.0 || // L5 unhealthy and S healthy
     1078              _health == 3.0) { // both L5 and S unhealthy
     1079            return 1;
     1080          }
     1081          break;
     1082        case t_eph::L1NV:
     1083          if (_health == 0.0) { // All navigation data on L1-SPS signal OK
     1084            return 0;
     1085          }
     1086          if (_health == 1.0) { // Some or all navigation data on L1-SPS signal bad
     1087            return 1;
     1088          }
     1089          break;
     1090      }
     1091      break;
     1092  }
     1093  return 0;
     1094}
     1095
    10491096// Constructor
    10501097//////////////////////////////////////////////////////////////////////////////
     
    10571104  // Source RINEX version < 4
    10581105  if (type() == t_eph::undefined) {
    1059     // cannot be determined from input data 
     1106    // cannot be determined from input data
    10601107    // but is set to be able to work with old RINEX files in BNC applications
    10611108    _type = t_eph::FDMA_M;
     
    23312378unsigned int t_ephSBAS::isUnhealthy() const {
    23322379
    2333   // Bit 5
    2334   bool URAindexIs15 = (int(_health) & (1 << 5));
     2380// Bit 5
     2381  bool URAindexIs15 =  bitExtracted(int(_health), 1, 5);
    23352382  if (URAindexIs15) {
    23362383    // in this case it is recommended
     
    23392386  }
    23402387
     2388  // Bit 4
     2389  bool MT17HealthIsUnavailable = bitExtracted(int(_health), 1, 4);
     2390  if (MT17HealthIsUnavailable) {
     2391    return 0;
     2392  }
     2393
    23412394  // Bit 0-3
    2342   int MT17health = (int(_health)) & (0x0f);
     2395  int MT17health = bitExtracted(int(_health), 4, 0);
    23432396  if (MT17health) {
    23442397    return 1;
    23452398  }
    2346 
    2347   // Bit 4
    2348   //  bool MT17HealthIsUnavailable = (int(_health) & (1<<4));
    2349   //  is not used because the MT17health bits can be independently set if URA index is 15
    23502399
    23512400  return 0;
     
    28752924unsigned int t_ephBDS::isUnhealthy() const {
    28762925
    2877   if (type() == t_eph::CNV1 || type() == t_eph::CNV2
    2878       || type() == t_eph::CNV3) {
     2926  if (type() == t_eph::CNV1 ||
     2927      type() == t_eph::CNV2 ||
     2928      type() == t_eph::CNV3) {
    28792929    return static_cast<unsigned int>(_health);
    28802930  }
  • TabularUnified trunk/BNC/src/ephemeris.h

    r10619 r10628  
    142142  virtual QString toString(double version) const;
    143143  virtual unsigned int  IOD() const { return static_cast<unsigned int>(_IODE); }
    144   virtual unsigned int  isUnhealthy() const { return static_cast<unsigned int>(_health); }
     144  //virtual unsigned int  isUnhealthy() const { return static_cast<unsigned int>(_health);}
     145  virtual unsigned int isUnhealthy() const;
    145146  double TGD() const {return _TGD;} // Timing Group Delay (P1-P2 DCB)
    146147
Note: See TracChangeset for help on using the changeset viewer.