- Timestamp:
- Oct 6, 2006, 5:12:52 PM (18 years ago)
- Location:
- trunk/BNC
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/RTCM/RTCM2.cpp
r210 r214 1059 1059 void RTCM2::Decode(char* buffer, int bufLen) { 1060 1060 1061 rtcm2::RTCM2packet PP;1062 rtcm2::RTCM2_Obs ObsBlock;1063 1064 1061 _buffer.append(buffer, bufLen); 1065 1062 … … 1069 1066 1070 1067 while(true) { 1071 PP.getPacket(_buffer);1072 if (! PP.valid()) break;1073 1074 if ( PP.ID()==18 ||PP.ID()==19 ) {1075 ObsBlock.extract(PP);1076 if (! ObsBlock.valid()) continue;1068 _PP.getPacket(_buffer); 1069 if (!_PP.valid()) break; 1070 1071 if ( _PP.ID()==18 || _PP.ID()==19 ) { 1072 _ObsBlock.extract(_PP); 1073 if (!_ObsBlock.valid()) continue; 1077 1074 1078 1075 int epochWeek; 1079 1076 double epochSecs; 1080 ObsBlock.resolveEpoch(refWeek, refSecs, epochWeek, epochSecs);1077 _ObsBlock.resolveEpoch(refWeek, refSecs, epochWeek, epochSecs); 1081 1078 1082 for (int iSat=0; iSat < ObsBlock.nSat; iSat++) {1083 if ( ObsBlock.PRN[iSat] <= 32) {1079 for (int iSat=0; iSat < _ObsBlock.nSat; iSat++) { 1080 if (_ObsBlock.PRN[iSat] <= 32) { 1084 1081 Observation* obs = new Observation(); 1085 1082 1086 obs->SVPRN = ObsBlock.PRN[iSat];1083 obs->SVPRN = _ObsBlock.PRN[iSat]; 1087 1084 obs->GPSWeek = epochWeek; 1088 1085 obs->GPSWeeks = (int) epochSecs; 1089 obs->sec = ObsBlock.secs;1086 obs->sec = _ObsBlock.secs; 1090 1087 obs->pCodeIndicator = 0; 1091 obs->C1 = ObsBlock.rng_C1[iSat];1092 obs->P2 = ObsBlock.rng_P2[iSat];1093 obs->L1 = ObsBlock.resolvedPhase_L1(iSat);1094 obs->L2 = ObsBlock.resolvedPhase_L2(iSat);1088 obs->C1 = _ObsBlock.rng_C1[iSat]; 1089 obs->P2 = _ObsBlock.rng_P2[iSat]; 1090 obs->L1 = _ObsBlock.resolvedPhase_L1(iSat); 1091 obs->L2 = _ObsBlock.resolvedPhase_L2(iSat); 1095 1092 1096 1093 m_lObsList.push_back(obs); … … 1098 1095 } 1099 1096 1100 ObsBlock.clear();1097 _ObsBlock.clear(); 1101 1098 } 1102 1099 } -
trunk/BNC/RTCM/RTCM2.h
r207 r214 38 38 #include <vector> 39 39 40 // ---------------- begin added by LM --------------------------------------41 #include "GPSDecoder.h"42 class RTCM2 : public GPSDecoder {43 public:44 RTCM2();45 ~RTCM2();46 void Decode(char* buffer = 0, int bufLen = 0);47 private:48 string _buffer;49 };50 // ----------------- end added by LM ---------------------------------------51 52 40 // 53 41 // namespace rtcm2 … … 337 325 }; // End of namespace rtcm2 338 326 327 // ---------------- begin added by LM -------------------------------------- 328 #include "GPSDecoder.h" 329 class RTCM2 : public GPSDecoder { 330 public: 331 RTCM2(); 332 ~RTCM2(); 333 void Decode(char* buffer = 0, int bufLen = 0); 334 private: 335 string _buffer; 336 rtcm2::RTCM2_Obs _ObsBlock; 337 rtcm2::RTCM2packet _PP; 338 }; 339 // ----------------- end added by LM --------------------------------------- 340 339 341 #endif // include blocker -
trunk/BNC/bncgetthread.cpp
r207 r214 83 83 hlp.setPath(mountPoint.path()); 84 84 85 if (hlp.path().isEmpty()) { 86 hlp.setPath("/"); 87 } 88 89 QByteArray reqStr = "GET " + hlp.path().toAscii() + 90 " HTTP/1.0\r\n" 91 "User-Agent: NTRIP BNC 1.0\r\n" 92 "Authorization: Basic " + 93 userAndPwd.toBase64() + "\r\n\r\n"; 85 QByteArray reqStr; 86 if ( proxyHost.isEmpty() ) { 87 if (hlp.path().indexOf("/") != 0) hlp.setPath("/"); 88 reqStr = "GET " + hlp.path().toAscii() + 89 " HTTP/1.0\r\n" 90 "User-Agent: NTRIP BNC 1.0\r\n" 91 "Authorization: Basic " + 92 userAndPwd.toBase64() + "\r\n\r\n"; 93 } else { 94 reqStr = "GET " + hlp.toEncoded() + 95 " HTTP/1.0\r\n" 96 "User-Agent: NTRIP BNC 1.0\r\n" 97 "Authorization: Basic " + 98 userAndPwd.toBase64() + "\r\n\r\n"; 99 } 94 100 95 101 msg += reqStr; -
trunk/BNC/bncutils.cpp
r210 r214 60 60 QTime time = QTime::currentTime(); 61 61 62 double deltat = d ate.toJulianDay() - 2400000.5 -44244.0 +62 double deltat = double(date.toJulianDay()) - 2444244.0 + 63 63 ((( time.msec() / 1000.0 64 64 + time.second() ) / 60.0
Note:
See TracChangeset
for help on using the changeset viewer.