Changeset 10692 in ntrip for trunk/BNC/src/GPSDecoder.h


Ignore:
Timestamp:
Jul 8, 2025, 10:07:50 AM (2 months ago)
Author:
stuerze
Message:

RTCM message 1230 (on-change) and the size of each RTCM message is added in scanRTCM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/GPSDecoder.h

    r10691 r10692  
    6262  struct t_typeInfo {
    6363    t_typeInfo() {
    64       type = 0;
    65       size = 0;
     64      _type = 0;
     65      _size = 0;
    6666    };
    67     int    type;
    68     size_t size;
     67    int    _type;
     68    size_t _size;
    6969  };
    7070
     
    7474
    7575    t_antRefPoint() {
    76       xx = yy = zz = height = 0.0;
    77       type = ARP;
    78       height_f = false;
    79       message  = 0;
     76      _xx = _yy = _zz = _height = 0.0;
     77      _type = ARP;
     78      _height_f = false;
     79      _message  = 0;
    8080    };
    8181
    82     double xx;
    83     double yy;
    84     double zz;
    85     t_type type;
    86     double height;
    87     bool   height_f;
    88     int    message;
     82    double _xx;
     83    double _yy;
     84    double _zz;
     85    t_type _type;
     86    double _height;
     87    bool   _height_f;
     88    int    _message;
    8989  };
    9090
     
    9292    t_antInfo() {
    9393    };
    94     char descriptor[256];
    95     char serialnumber[256];
     94    char _descriptor[256];
     95    char _serialnumber[256];
    9696  };
    9797
     
    9999    t_recInfo() {
    100100    };
    101     char descriptor[256];
    102     char serialnumber[256];
    103     char firmware[256];
     101    char _descriptor[256];
     102    char _serialnumber[256];
     103    char _firmware[256];
    104104  };
    105105
     
    107107  public:
    108108    t_GloBiasInfo() {
    109       clear();
     109      init();
    110110    };
    111     bool operator==(const t_GloBiasInfo& biasInfo2) const {
    112       if (staID     == biasInfo2.staID &&
    113           indicator == biasInfo2.indicator &&
    114           L1C_value == biasInfo2.L1C_value &&
    115           L1P_value == biasInfo2.L1P_value &&
    116           L2C_value == biasInfo2.L2C_value &&
    117           L2P_value == biasInfo2.L2P_value  ) {
     111    bool operator!=(const t_GloBiasInfo& gloBiasInfo2) {
     112
     113      if (_staID     != gloBiasInfo2._staID     ||
     114          _indicator != gloBiasInfo2._indicator ||
     115          (fabs(_L1C_value - gloBiasInfo2._L1C_value) > 0.000000000001 ) ||
     116          (fabs(_L1P_value - gloBiasInfo2._L1P_value) > 0.000000000001 ) ||
     117          (fabs(_L2C_value - gloBiasInfo2._L2C_value) > 0.000000000001 ) ||
     118          (fabs(_L2P_value - gloBiasInfo2._L2P_value) > 0.000000000001 )  ) {
     119        setChanged(true);
    118120        return true;
    119121      }
    120122      else {
     123        setChanged(false);
    121124        return false;
    122125      }
    123126    }
    124127
    125     void set(const t_GloBiasInfo& biasInfo) {
    126       staID     = biasInfo.staID;
    127       indicator = biasInfo.indicator;
    128       L1C_value = biasInfo.L1C_value;
    129       L1P_value = biasInfo.L1P_value;
    130       L2C_value = biasInfo.L2C_value;
    131       L2P_value = biasInfo.L2P_value;
    132       changed = true;
     128    void set(const t_GloBiasInfo& gloBiasInfo) {
     129      _staID     = gloBiasInfo._staID;
     130      _indicator = gloBiasInfo._indicator;
     131      _L1C_value = gloBiasInfo._L1C_value;
     132      _L1P_value = gloBiasInfo._L1P_value;
     133      _L2C_value = gloBiasInfo._L2C_value;
     134      _L2P_value = gloBiasInfo._L2P_value;
    133135    }
    134 
    135     void clear() {
    136       staID = 0;
    137       indicator = 0;
    138       L1C_value = 0.0;
    139       L1P_value = 0.0;
    140       L2C_value = 0.0;
    141       L2P_value = 0.0;
    142       changed = false;
     136    void setChanged(bool changed) {
     137      _changed = changed;
     138    }
     139    bool changed() {return _changed;};
     140    void init() {
     141      _staID = 0;
     142      _indicator = 1;
     143      _L1C_value = 0.0;
     144      _L1P_value = 0.0;
     145      _L2C_value = 0.0;
     146      _L2P_value = 0.0;
     147      _changed = false;
    143148    }
    144149    QString toString() {
    145       QString biasIndicator =  (indicator == 1) ? QString("aligned") : QString("unaligned");
     150      QString biasIndicator =  (_indicator == 1) ? QString("aligned") : QString("unaligned");
    146151      QString biasesStr =
    147152          QString(": GLONASS L1/L2 Code-Phase Biases: staID=%1 indicator=%2 L1C=%3 L1P=%4 L2C=%5 L2P=%6")
    148           .arg(staID).arg(biasIndicator)
    149           .arg(L1C_value, 0, 'f', 2)
    150           .arg(L1P_value, 0, 'f', 2)
    151           .arg(L2C_value, 0, 'f', 2)
    152           .arg(L2P_value, 0, 'f', 2);
     153          .arg(_staID).arg(biasIndicator)
     154          .arg(_L1C_value, 0, 'f', 2)
     155          .arg(_L1P_value, 0, 'f', 2)
     156          .arg(_L2C_value, 0, 'f', 2)
     157          .arg(_L2P_value, 0, 'f', 2);
    153158
    154159      return biasesStr;
    155160    }
    156     int      staID;
    157     int      indicator;
    158     double   L1C_value;
    159     double   L1P_value;
    160     double   L2C_value;
    161     double   L2P_value;
    162     bool     changed;
     161
     162    int      _staID;
     163    int      _indicator;
     164    double   _L1C_value;
     165    double   _L1P_value;
     166    double   _L2C_value;
     167    double   _L2P_value;
     168    bool     _changed;
    163169
    164170
     
    175181  QList<t_rtcmCrs>        _rtcmCrs;            // RTCM CRS
    176182  QString                 _gloFrq;             // GLONASS slot
    177   t_GloBiasInfo           _gloBiases;          // RTCM GLO bias information message
     183  t_GloBiasInfo           _gloBiasInfo;          // RTCM GLO bias information message
    178184  bncRinex*               _rnx;                // RINEX writer
    179185};
Note: See TracChangeset for help on using the changeset viewer.