Changeset 8234 in ntrip for trunk/BNC/src/RTCM/RTCM2Decoder.cpp


Ignore:
Timestamp:
Jan 5, 2018, 10:52:16 AM (6 years ago)
Author:
stuerze
Message:

antenna and receiver info from message type 1007, 1008 and 1033 completed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/RTCM/RTCM2Decoder.cpp

    r8204 r8234  
    202202    if (_PP.ID() == 3) {
    203203      if (_msg03.validMsg) {
    204         _antList.push_back(t_antInfo());
    205 
    206         this->getStaCrd(_antList.back().xx, _antList.back().yy,
    207             _antList.back().zz);
    208 
    209         _antList.back().type = t_antInfo::APC;
     204        _antList.push_back(t_antRefPoint());
     205
     206        this->getStaCrd(_antList.back().xx, _antList.back().yy, _antList.back().zz);
     207
     208        _antList.back().type = t_antRefPoint::APC;
    210209        _antList.back().message = _PP.ID();
    211210      }
    212211    } else if (_PP.ID() == 23) {
    213       if (_msg23.validMsg && !_antType.contains(_msg23.antType.c_str())) {
    214         _antType.push_back(_msg23.antType.c_str());
     212      if (_msg23.validMsg) {
     213        int antlen = strlen(_msg23.antType.c_str());
     214        int serlen = strlen(_msg23.antSN.c_str());
     215        if ((antlen) &&
     216            (_antType.empty() || strncmp(_antType.back().descriptor, _msg23.antType.c_str(), antlen) != 0)) {
     217          _antType.push_back(t_antInfo());
     218          memcpy(_antType.back().descriptor, _msg23.antType.c_str(), antlen);
     219          _antType.back().descriptor[antlen] = 0;
     220          if (serlen) {
     221            memcpy(_antType.back().serialnumber,  _msg23.antSN.c_str(), serlen);
     222            _antType.back().serialnumber[serlen] = 0;
     223          }
     224        }
    215225      }
    216226    } else if (_PP.ID() == 24) {
    217227      if (_msg24.validMsg) {
    218         _antList.push_back(t_antInfo());
     228        _antList.push_back(t_antRefPoint());
    219229
    220230        _antList.back().xx = _msg24.x;
     
    225235        _antList.back().height = _msg24.h;
    226236
    227         _antList.back().type = t_antInfo::ARP;
     237        _antList.back().type = t_antRefPoint::ARP;
    228238        _antList.back().message = _PP.ID();
    229239      }
Note: See TracChangeset for help on using the changeset viewer.