- Timestamp:
- Jan 27, 2011, 3:39:07 PM (14 years ago)
- Location:
- trunk/BNC
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncephuser.cpp
r2908 r2911 149 149 } 150 150 } 151 152 // 153 //////////////////////////////////////////////////////////////////////////// 154 void t_corr::readLine(const QString& line) { 155 156 QTextStream in(line.toAscii()); 157 158 int messageType; 159 int updateInterval; 160 int GPSweek; 161 double GPSweeks; 162 QString prn; 163 164 in >> messageType >> updateInterval >> GPSweek >> GPSweeks >> prn; 165 166 tt.set(GPSweek, GPSweeks); 167 168 if ( messageType == COTYPE_GPSCOMBINED || 169 messageType == COTYPE_GLONASSCOMBINED ) { 170 rao.ReSize(3); rao = 0.0; 171 dotRao.ReSize(3); dotRao = 0.0; 172 dotDotRao.ReSize(3); dotDotRao = 0.0; 173 dClk = 0.0; 174 dotDClk = 0.0; 175 dotDotDClk = 0.0; 176 in >> iod 177 >> dClk >> rao[0] >> rao[1] >> rao[2] 178 >> dotDClk >> dotRao[0] >> dotRao[1] >> dotRao[2] 179 >> dotDotDClk >> dotDotRao[0] >> dotDotRao[1] >> dotDotRao[2]; 180 dClk /= t_CST::c; 181 dotDClk /= t_CST::c; 182 dotDotDClk /= t_CST::c; 183 raoSet = true; 184 dClkSet = true; 185 } 186 else if ( messageType == COTYPE_GPSORBIT || 187 messageType == COTYPE_GLONASSORBIT ) { 188 rao.ReSize(3); rao = 0.0; 189 dotRao.ReSize(3); dotRao = 0.0; 190 dotDotRao.ReSize(3); dotDotRao = 0.0; 191 in >> iod 192 >> rao[0] >> rao[1] >> rao[2] 193 >> dotRao[0] >> dotRao[1] >> dotRao[2] 194 >> dotDotRao[0] >> dotDotRao[1] >> dotDotRao[2]; 195 raoSet = true; 196 } 197 else if ( messageType == COTYPE_GPSCLOCK || 198 messageType == COTYPE_GLONASSCLOCK ) { 199 int dummyIOD; 200 dClk = 0.0; 201 dotDClk = 0.0; 202 dotDotDClk = 0.0; 203 in >> dummyIOD >> dClk >> dotDClk >> dotDotDClk; 204 dClk /= t_CST::c; 205 dotDClk /= t_CST::c; 206 dotDotDClk /= t_CST::c; 207 dClkSet = true; 208 } 209 } -
trunk/BNC/bncephuser.h
r2905 r2911 33 33 #include "RTCM3/ephemeris.h" 34 34 35 extern "C" { 36 #include "clock_orbit_rtcm.h" 37 } 38 35 39 class t_corr { 36 40 public: … … 40 44 } 41 45 bool ready() {return raoSet && dClkSet;} 46 47 static bool relevantMessageType(int msgType) { 48 return ( msgType == COTYPE_GPSCOMBINED || 49 msgType == COTYPE_GLONASSCOMBINED || 50 msgType == COTYPE_GPSORBIT || 51 msgType == COTYPE_GPSCLOCK || 52 msgType == COTYPE_GLONASSORBIT || 53 msgType == COTYPE_GLONASSCLOCK ); 54 } 55 56 void readLine(const QString& line); 57 42 58 bncTime tt; 43 59 int iod; -
trunk/BNC/bncpppclient.cpp
r2905 r2911 50 50 #include "bncsettings.h" 51 51 52 extern "C" {53 #include "clock_orbit_rtcm.h"54 }55 56 52 using namespace std; 57 53 … … 280 276 QListIterator<QString> it(corrList); 281 277 while (it.hasNext()) { 282 QTextStream in(it.next().toAscii()); 278 QString line = it.next(); 279 280 QTextStream in(&line); 283 281 int messageType; 284 282 int updateInterval; … … 288 286 in >> messageType >> updateInterval >> GPSweek >> GPSweeks >> prn; 289 287 290 if ( messageType == COTYPE_GPSCOMBINED || 291 messageType == COTYPE_GLONASSCOMBINED || 292 messageType == COTYPE_GPSORBIT || 293 messageType == COTYPE_GPSCLOCK || 294 messageType == COTYPE_GLONASSORBIT || 295 messageType == COTYPE_GLONASSCLOCK ) { 296 288 if ( t_corr::relevantMessageType(messageType) ) { 297 289 t_corr* cc = 0; 298 290 if (_corr.contains(prn)) { … … 304 296 } 305 297 306 cc->tt.set(GPSweek, GPSweeks); 307 _corr_tt.set(GPSweek, GPSweeks); 308 309 if ( messageType == COTYPE_GPSCOMBINED || 310 messageType == COTYPE_GLONASSCOMBINED ) { 311 cc->rao.ReSize(3); cc->rao = 0.0; 312 cc->dotRao.ReSize(3); cc->dotRao = 0.0; 313 cc->dotDotRao.ReSize(3); cc->dotDotRao = 0.0; 314 cc->dClk = 0.0; 315 cc->dotDClk = 0.0; 316 cc->dotDotDClk = 0.0; 317 in >> cc->iod 318 >> cc->dClk >> cc->rao[0] >> cc->rao[1] >> cc->rao[2] 319 >> cc->dotDClk >> cc->dotRao[0] >> cc->dotRao[1] >> cc->dotRao[2] 320 >> cc->dotDotDClk >> cc->dotDotRao[0] >> cc->dotDotRao[1] >> cc->dotDotRao[2]; 321 cc->dClk /= t_CST::c; 322 cc->dotDClk /= t_CST::c; 323 cc->dotDotDClk /= t_CST::c; 324 cc->raoSet = true; 325 cc->dClkSet = true; 326 } 327 else if ( messageType == COTYPE_GPSORBIT || 328 messageType == COTYPE_GLONASSORBIT ) { 329 cc->rao.ReSize(3); cc->rao = 0.0; 330 cc->dotRao.ReSize(3); cc->dotRao = 0.0; 331 cc->dotDotRao.ReSize(3); cc->dotDotRao = 0.0; 332 in >> cc->iod 333 >> cc->rao[0] >> cc->rao[1] >> cc->rao[2] 334 >> cc->dotRao[0] >> cc->dotRao[1] >> cc->dotRao[2] 335 >> cc->dotDotRao[0] >> cc->dotDotRao[1] >> cc->dotDotRao[2]; 336 cc->raoSet = true; 337 } 338 else if ( messageType == COTYPE_GPSCLOCK || 339 messageType == COTYPE_GLONASSCLOCK ) { 340 int dummyIOD; 341 cc->dClk = 0.0; 342 cc->dotDClk = 0.0; 343 cc->dotDotDClk = 0.0; 344 in >> dummyIOD >> cc->dClk >> cc->dotDClk >> cc->dotDotDClk; 345 cc->dClk /= t_CST::c; 346 cc->dotDClk /= t_CST::c; 347 cc->dotDotDClk /= t_CST::c; 348 cc->dClkSet = true; 349 } 298 cc->readLine(line); 299 _corr_tt = cc->tt; 350 300 } 351 301 else if ( messageType == BTYPE_GPS ) {
Note:
See TracChangeset
for help on using the changeset viewer.