Changeset 622 in ntrip for trunk/BNC/RTCM
- Timestamp:
- Dec 16, 2007, 4:27:13 PM (17 years ago)
- Location:
- trunk/BNC/RTCM
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/RTCM/GPSDecoder.h
r621 r622 29 29 #include <QList> 30 30 31 class Observation : public QObject{ 32 public: 33 Observation() { 34 flags = 0; 35 StatID[0] = '\0'; 36 satSys = 'G'; 37 satNum = 0; 38 slot = 0; 39 GPSWeek = 0; 40 GPSWeeks = 0.0; 41 C1 = 0.0; 42 C2 = 0.0; 43 P1 = 0.0; 44 P2 = 0.0; 45 L1 = 0.0; 46 L2 = 0.0; 47 S1 = 0.0; 48 S2 = 0.0; 49 SNR1 = 0; 50 SNR2 = 0; 51 } 31 class t_obsInternal { 32 public: 52 33 int flags; 53 34 char StatID[20+1];// Station ID … … 69 50 }; 70 51 71 typedef QPointer<Observation> p_obs; 52 class t_obs : public QObject{ 53 public: 54 55 t_obs() { 56 _o.flags = 0; 57 _o.StatID[0] = '\0'; 58 _o.satSys = 'G'; 59 _o.satNum = 0; 60 _o.slot = 0; 61 _o.GPSWeek = 0; 62 _o.GPSWeeks = 0.0; 63 _o.C1 = 0.0; 64 _o.C2 = 0.0; 65 _o.P1 = 0.0; 66 _o.P2 = 0.0; 67 _o.L1 = 0.0; 68 _o.L2 = 0.0; 69 _o.S1 = 0.0; 70 _o.S2 = 0.0; 71 _o.SNR1 = 0; 72 _o.SNR2 = 0; 73 } 74 75 t_obsInternal _o; 76 }; 77 78 typedef QPointer<t_obs> p_obs; 72 79 73 80 class GPSDecoder { 74 public: 75 virtual void Decode(char* buffer, int bufLen) = 0; 76 virtual ~GPSDecoder() {} 77 QList<p_obs> _obsList; 81 public: 82 virtual void Decode(char* buffer, int bufLen) = 0; 83 84 virtual ~GPSDecoder() { 85 QListIterator<p_obs> it(_obsList); 86 while (it.hasNext()) { 87 delete it.next(); 88 } 89 } 90 91 QList<p_obs> _obsList; 78 92 }; 79 93 -
trunk/BNC/RTCM/RTCM2Decoder.cpp
r621 r622 58 58 59 59 RTCM2Decoder::~RTCM2Decoder() { 60 QListIterator<p_obs> it(_obsList);61 while (it.hasNext()) {62 delete it.next();63 }64 _obsList.clear();65 60 } 66 61 … … 91 86 92 87 for (int iSat=0; iSat < _ObsBlock.nSat; iSat++) { 93 Observation* obs = new Observation();88 p_obs obs = new t_obs(); 94 89 if (_ObsBlock.PRN[iSat] > 100) { 95 obs-> satNum = _ObsBlock.PRN[iSat] % 100;96 obs-> satSys = 'R';90 obs->_o.satNum = _ObsBlock.PRN[iSat] % 100; 91 obs->_o.satSys = 'R'; 97 92 } 98 93 else { 99 obs-> satNum = _ObsBlock.PRN[iSat];100 obs-> satSys = 'G';94 obs->_o.satNum = _ObsBlock.PRN[iSat]; 95 obs->_o.satSys = 'G'; 101 96 } 102 obs-> GPSWeek = epochWeek;103 obs-> GPSWeeks = epochSecs;104 obs-> C1 = _ObsBlock.rng_C1[iSat];105 obs-> P1 = _ObsBlock.rng_P1[iSat];106 obs-> P2 = _ObsBlock.rng_P2[iSat];107 obs-> L1 = _ObsBlock.resolvedPhase_L1(iSat);108 obs-> L2 = _ObsBlock.resolvedPhase_L2(iSat);97 obs->_o.GPSWeek = epochWeek; 98 obs->_o.GPSWeeks = epochSecs; 99 obs->_o.C1 = _ObsBlock.rng_C1[iSat]; 100 obs->_o.P1 = _ObsBlock.rng_P1[iSat]; 101 obs->_o.P2 = _ObsBlock.rng_P2[iSat]; 102 obs->_o.L1 = _ObsBlock.resolvedPhase_L1(iSat); 103 obs->_o.L2 = _ObsBlock.resolvedPhase_L2(iSat); 109 104 110 105 _obsList.push_back(obs);
Note:
See TracChangeset
for help on using the changeset viewer.