Changeset 1268 in ntrip for trunk/BNC/bncgetthread.cpp


Ignore:
Timestamp:
Dec 2, 2008, 10:31:46 PM (15 years ago)
Author:
zdenek
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncgetthread.cpp

    r1239 r1268  
    755755            bool dump = true;
    756756
    757             // RTCMv2 XYZ
    758             // ----------
    759             RTCM2Decoder* decoder2 = dynamic_cast<RTCM2Decoder*>(_decoder);
    760             if ( decoder2 && !_rnx_set_position ) {
    761               double stax, stay, staz;
    762               double dL1[3], dL2[3];
    763               if ( decoder2->getStaCrd(stax, stay, staz,
    764                                        dL1[0], dL1[1], dL1[2],
    765                                        dL2[0], dL2[1], dL2[2]) == success ) {
    766 
    767                 if ( _checkMountPoint == _staID || _checkMountPoint == "ALL" ) {
    768                   QString ant1;
    769                   ant1 =  QString("%1 ").arg(stax,0,'f',4);
    770                   emit(newMessage(_staID + ": ARP X " + ant1.toAscii() + "m" ));
    771                   ant1 =  QString("%1 ").arg(stay,0,'f',4);
    772                   emit(newMessage(_staID + ": ARP Y " + ant1.toAscii() + "m" ));
    773                   ant1 =  QString("%1 ").arg(staz,0,'f',4);
    774                   emit(newMessage(_staID + ": ARP Z " + ant1.toAscii() + "m" ));
    775                   ant1 =  QString("%1 ").arg(dL1[0],0,'f',4);
    776                   emit(newMessage(_staID + ": L1 APC DX " + ant1.toAscii() + "m" ));
    777                   ant1 =  QString("%1 ").arg(dL1[1],0,'f',4);
    778                   emit(newMessage(_staID + ": L1 APC DY " + ant1.toAscii() + "m" ));
    779                   ant1 =  QString("%1 ").arg(dL1[2],0,'f',4);
    780                   emit(newMessage(_staID + ": L1 APC DZ " + ant1.toAscii() + "m" ));
    781                   ant1 =  QString("%1 ").arg(dL2[0],0,'f',4);
    782                   emit(newMessage(_staID + ": L2 APC DX " + ant1.toAscii() + "m" ));
    783                   ant1 =  QString("%1 ").arg(dL2[1],0,'f',4);
    784                   emit(newMessage(_staID + ": L2 APC DY " + ant1.toAscii() + "m" ));
    785                   ant1 =  QString("%1 ").arg(dL2[2],0,'f',4);
    786                   emit(newMessage(_staID + ": L2 APC DZ " + ant1.toAscii() + "m" ));
    787                 }
    788                 _rnx_set_position = true;
    789               }
    790            
     757            //// // RTCMv2 XYZ
     758            //// // ----------
     759            //// RTCM2Decoder* decoder2 = dynamic_cast<RTCM2Decoder*>(_decoder);
     760            //// if ( decoder2 && !_rnx_set_position ) {
     761            ////   double stax, stay, staz;
     762            ////   double dL1[3], dL2[3];
     763            ////   if ( decoder2->getStaCrd(stax, stay, staz,
     764            ////                            dL1[0], dL1[1], dL1[2],
     765            ////                            dL2[0], dL2[1], dL2[2]) == success ) {
     766            ////
     767            ////     if ( _checkMountPoint == _staID || _checkMountPoint == "ALL" ) {
     768            ////       QString ant1;
     769            ////       ant1 =  QString("%1 ").arg(stax,0,'f',4);
     770            ////       emit(newMessage(_staID + ": ARP X " + ant1.toAscii() + "m" ));
     771            ////       ant1 =  QString("%1 ").arg(stay,0,'f',4);
     772            ////       emit(newMessage(_staID + ": ARP Y " + ant1.toAscii() + "m" ));
     773            ////       ant1 =  QString("%1 ").arg(staz,0,'f',4);
     774            ////       emit(newMessage(_staID + ": ARP Z " + ant1.toAscii() + "m" ));
     775            ////       ant1 =  QString("%1 ").arg(dL1[0],0,'f',4);
     776            ////       emit(newMessage(_staID + ": L1 APC DX " + ant1.toAscii() + "m" ));
     777            ////       ant1 =  QString("%1 ").arg(dL1[1],0,'f',4);
     778            ////       emit(newMessage(_staID + ": L1 APC DY " + ant1.toAscii() + "m" ));
     779            ////       ant1 =  QString("%1 ").arg(dL1[2],0,'f',4);
     780            ////       emit(newMessage(_staID + ": L1 APC DZ " + ant1.toAscii() + "m" ));
     781            ////       ant1 =  QString("%1 ").arg(dL2[0],0,'f',4);
     782            ////       emit(newMessage(_staID + ": L2 APC DX " + ant1.toAscii() + "m" ));
     783            ////       ant1 =  QString("%1 ").arg(dL2[1],0,'f',4);
     784            ////       emit(newMessage(_staID + ": L2 APC DY " + ant1.toAscii() + "m" ));
     785            ////       ant1 =  QString("%1 ").arg(dL2[2],0,'f',4);
     786            ////       emit(newMessage(_staID + ": L2 APC DZ " + ant1.toAscii() + "m" ));
     787            ////     }
     788            ////        _rnx_set_position = true;
     789            ////   }
     790            ////
    791791
    792792            if ( dump ) {
     
    830830          }
    831831
    832           // RTCMv3 antenna XYZ
     832          // antenna XYZ
    833833          // ------------------
    834           if (0<_decoder->_antList5.size()) {
    835             QString ant1,ant2,ant3;
    836             for (int ii=0;ii<_decoder->_antList5.size();ii+=3) {
    837               ant1 =  QString("%1 ").arg(_decoder->_antList5[ii+0]*0.0001,0,'f',4);
    838               ant2 =  QString("%1 ").arg(_decoder->_antList5[ii+1]*0.0001,0,'f',4);
    839               ant3 =  QString("%1 ").arg(_decoder->_antList5[ii+2]*0.0001,0,'f',4);
    840               emit(newMessage(_staID + ": ARP (ITRF) X " + ant1.toAscii() + "m" ));
    841               emit(newMessage(_staID + ": ARP (ITRF) Y " + ant2.toAscii() + "m"));
    842               emit(newMessage(_staID + ": ARP (ITRF) Z " + ant3.toAscii() + "m"));
    843             }
    844           }
    845 
    846           // RTCMv3 antenna XYZ-H
    847           // --------------------
    848           if (0<_decoder->_antList6.size()) {
    849             QString ant1,ant2,ant3,ant4;
    850             for (int ii=0;ii<_decoder->_antList6.size();ii+=4) {
    851               ant1 =  QString("%1 ").arg(_decoder->_antList6[ii+0]*0.0001,0,'f',4);
    852               ant2 =  QString("%1 ").arg(_decoder->_antList6[ii+1]*0.0001,0,'f',4);
    853               ant3 =  QString("%1 ").arg(_decoder->_antList6[ii+2]*0.0001,0,'f',4);
    854               ant4 =  QString("%1 ").arg(_decoder->_antList6[ii+3]*0.0001,0,'f',4);
    855               emit(newMessage(_staID + ": ARP (ITRF) X " + ant1.toAscii() + "m" ));
    856               emit(newMessage(_staID + ": ARP (ITRF) Y " + ant2.toAscii() + "m"));
    857               emit(newMessage(_staID + ": ARP (ITRF) Z " + ant3.toAscii() + "m"));
    858               emit(newMessage(_staID + ": Antenna height above ARP "  + ant4.toAscii() + "m"));
     834          if (0<_decoder->_antList.size()) {
     835            for (int ii=0;ii<_decoder->_antList.size();++ii) {
     836              QByteArray ant1,ant2,ant3, antT;
     837              ant1 = QString("%1 ").arg(_decoder->_antList[ii].xx,0,'f',4).toAscii();
     838              ant2 = QString("%1 ").arg(_decoder->_antList[ii].yy,0,'f',4).toAscii();
     839              ant3 = QString("%1 ").arg(_decoder->_antList[ii].zz,0,'f',4).toAscii();
     840              switch (_decoder->_antList[ii].type) {
     841              case GPSDecoder::t_antInfo::ARP: antT = "ARP"; break;
     842              case GPSDecoder::t_antInfo::APC: antT = "APC"; break;
     843              }
     844              emit(newMessage(_staID + ": " + antT + " (ITRF) X " + ant1 + "m"));
     845              emit(newMessage(_staID + ": " + antT + " (ITRF) Y " + ant2 + "m"));
     846              emit(newMessage(_staID + ": " + antT + " (ITRF) Z " + ant3 + "m"));
     847              if (_decoder->_antList[ii].height_f) {
     848                QByteArray ant4 = QString("%1 ").arg(_decoder->_antList[ii].height,0,'f',4).toAscii();
     849                emit(newMessage(_staID + ": Antenna height above marker "  + ant4 + "m"));
     850              }
    859851            }
    860852          }
     
    862854        _decoder->_typeList.clear();
    863855        _decoder->_antType.clear();
    864         _decoder->_antList5.clear();
    865         _decoder->_antList6.clear();
     856        _decoder->_antList.clear();
    866857      }
    867858
Note: See TracChangeset for help on using the changeset viewer.