Changeset 6432 in ntrip
- Timestamp:
- Dec 25, 2014, 6:11:49 PM (10 years ago)
- Location:
- trunk/BNC/src
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/RTCM3/RTCM3Decoder.cpp
r6383 r6432 74 74 _checkMountPoint = settings.value("miscMount").toString(); 75 75 76 connect(this, SIGNAL(newGPSEph(gpsephemeris*)), 77 BNC_CORE, SLOT(slotNewGPSEph(gpsephemeris*))); 78 connect(this, SIGNAL(newGlonassEph(glonassephemeris*, const QString&)), 79 BNC_CORE, SLOT(slotNewGlonassEph(glonassephemeris*, const QString&))); 80 connect(this, SIGNAL(newGalileoEph(galileoephemeris*)), 81 BNC_CORE, SLOT(slotNewGalileoEph(galileoephemeris*))); 82 connect(this, SIGNAL(newSBASEph(sbasephemeris*)), 83 BNC_CORE, SLOT(slotNewSBASEph(sbasephemeris*))); 76 connect(this, SIGNAL(newGPSEph(t_ephGPS)), BNC_CORE, SLOT(slotNewGPSEph(t_ephGPS))); 77 connect(this, SIGNAL(newGlonassEph(t_ephGlo)), BNC_CORE, SLOT(slotNewGlonassEph(t_ephGlo))); 78 connect(this, SIGNAL(newGalileoEph(t_ephGal)), BNC_CORE, SLOT(slotNewGalileoEph(t_ephGal))); 79 connect(this, SIGNAL(newSBASEph(t_ephSBAS)), BNC_CORE, SLOT(slotNewSBASEph(t_ephSBAS))); 84 80 85 81 // Mode can be either observations or corrections … … 378 374 else if (rr == 1019) { 379 375 decoded = true; 380 emit newGPSEph(new gpsephemeris(parser.ephemerisGPS)); 376 t_ephGPS eph; eph.set(&parser.ephemerisGPS); 377 emit newGPSEph(eph); 381 378 } 382 379 … … 386 383 parser.ephemerisGLONASS.almanac_number <= PRN_GLONASS_NUM) { 387 384 decoded = true; 388 emit newGlonassEph(new glonassephemeris(parser.ephemerisGLONASS), _staID); 385 t_ephGlo eph; eph.set(&parser.ephemerisGLONASS); 386 emit newGlonassEph(eph); 389 387 } 390 388 … … 393 391 else if (rr == 1045 || rr == 1046) { 394 392 decoded = true; 395 emit newGalileoEph(new galileoephemeris(parser.ephemerisGALILEO)); 393 t_ephGal eph; eph.set(&parser.ephemerisGALILEO); 394 emit newGalileoEph(eph); 396 395 } 397 396 … … 400 399 else if (rr == 1044) { 401 400 decoded = true; 402 emit newGPSEph(new gpsephemeris(parser.ephemerisGPS)); 401 t_ephGPS eph; eph.set(&parser.ephemerisGPS); 402 emit newGPSEph(eph); 403 403 } 404 404 … … 407 407 else if (rr == 1043) { 408 408 decoded = true; 409 emit newSBASEph(new sbasephemeris(parser.ephemerisSBAS)); 409 t_ephSBAS eph; eph.set(&parser.ephemerisSBAS); 410 emit newSBASEph(eph); 410 411 } 411 412 } -
trunk/BNC/src/RTCM3/RTCM3Decoder.h
r6383 r6432 32 32 #include "RTCM3coDecoder.h" 33 33 #include "bncrawfile.h" 34 #include "ephemeris.h" 34 35 35 36 extern "C" { … … 47 48 signals: 48 49 void newMessage(QByteArray msg,bool showOnScreen); 49 void newGPSEph( gpsephemeris* gpseph);50 void newGlonassEph( glonassephemeris* glonasseph, const QString& staID);51 void newSBASEph( sbasephemeris* sbaseph);52 void newGalileoEph( galileoephemeris* galileoeph);50 void newGPSEph(t_ephGPS eph); 51 void newGlonassEph(t_ephGlo eph); 52 void newSBASEph(t_ephSBAS eph); 53 void newGalileoEph(t_ephGal eph); 53 54 54 55 private: -
trunk/BNC/src/bnccaster.cpp
r6392 r6432 276 276 qRegisterMetaType<t_satObs>("t_satObs"); 277 277 qRegisterMetaType< QList<t_satObs> >("QList<t_satObs>"); 278 qRegisterMetaType<gpsephemeris>("gpsephemeris");279 qRegisterMetaType<glonassephemeris>("glonassephemeris");280 qRegisterMetaType<galileoephemeris>("galileoephemeris");281 qRegisterMetaType<sbasephemeris>("sbasephemeris");282 278 283 279 connect(getThread, SIGNAL(newObs(QByteArray, QList<t_satObs>)), -
trunk/BNC/src/bnccore.cpp
r6384 r6432 79 79 #endif 80 80 81 // Lists of Ephemeris82 // ------------------83 for (int ii = PRN_GPS_START; ii <= PRN_GPS_END; ii++) {84 _gpsEph[ii-PRN_GPS_START] = 0;85 }86 for (int ii = PRN_QZSS_START; ii <= PRN_QZSS_END; ii++) {87 _qzssEph[ii-PRN_QZSS_START] = 0;88 }89 for (int ii = PRN_GLONASS_START; ii <= PRN_GLONASS_END; ii++) {90 _glonassEph[ii-PRN_GLONASS_START] = 0;91 }92 for (int ii = PRN_GALILEO_START; ii <= PRN_GALILEO_END; ii++) {93 _galileoEph[ii-PRN_GALILEO_START] = 0;94 }95 for (int ii = PRN_SBAS_START; ii <= PRN_SBAS_END; ii++) {96 _sbasEph[ii-PRN_SBAS_START] = 0;97 }98 99 81 // Eph file(s) 100 82 // ----------- … … 132 114 qRegisterMetaType< QVector<double> >("QVector<double>"); 133 115 qRegisterMetaType<bncTime>("bncTime"); 116 qRegisterMetaType<t_ephGPS>("t_ephGPS"); 117 qRegisterMetaType<t_ephGlo>("t_ephGlo"); 118 qRegisterMetaType<t_ephGal>("t_ephGal"); 119 qRegisterMetaType<t_ephSBAS>("t_ephSBAS"); 120 qRegisterMetaType<t_ephCompass>("t_ephCompass"); 134 121 } 135 122 … … 148 135 delete _ephStreamGlonass; 149 136 delete _ephFileGlonass; 150 }151 for (int ii = PRN_GPS_START; ii <= PRN_GPS_END; ii++) {152 delete _gpsEph[ii-PRN_GPS_START];153 }154 for (int ii = PRN_QZSS_START; ii <= PRN_QZSS_END; ii++) {155 delete _qzssEph[ii-PRN_QZSS_START];156 }157 for (int ii = PRN_GLONASS_START; ii <= PRN_GLONASS_END; ii++) {158 delete _glonassEph[ii-PRN_GLONASS_START];159 }160 for (int ii = PRN_GALILEO_START; ii <= PRN_GALILEO_END; ii++) {161 delete _galileoEph[ii-PRN_GALILEO_START];162 }163 for (int ii = PRN_SBAS_START; ii <= PRN_SBAS_END; ii++) {164 delete _sbasEph[ii-PRN_SBAS_START];165 137 } 166 138 … … 227 199 // New GPS Ephemeris 228 200 //////////////////////////////////////////////////////////////////////////// 229 void t_bncCore::slotNewGPSEph( gpsephemeris* gpseph) {201 void t_bncCore::slotNewGPSEph(t_ephGPS eph) { 230 202 231 203 QMutexLocker locker(&_mutex); 232 204 233 gpsephemeris copy_gpseph = *gpseph; 234 emit newEphGPS(copy_gpseph); 205 emit newGPSEph(eph); 235 206 236 207 printEphHeader(); 237 208 238 gpsephemeris** ee = &_gpsEph[gpseph->satellite-1]; 239 if (PRN_GPS_START <= gpseph->satellite && gpseph->satellite <= PRN_GPS_END) { 240 ee = &_gpsEph[gpseph->satellite - PRN_GPS_START]; 241 } 242 else if (PRN_QZSS_START <= gpseph->satellite && gpseph->satellite <= PRN_QZSS_END) { 243 ee = &_qzssEph[gpseph->satellite - PRN_QZSS_START]; 244 } 245 246 if ( *ee != 0 && gpseph->GPSweek == (*ee)->GPSweek && gpseph->TOC == (*ee)->TOC ) { 247 checkEphemeris(*ee, gpseph); 248 } 249 250 if ( *ee == 0 || 251 gpseph->GPSweek > (*ee)->GPSweek || 252 (gpseph->GPSweek == (*ee)->GPSweek && gpseph->TOC > (*ee)->TOC) ) { 253 delete *ee; 254 *ee = gpseph; 255 printGPSEph(gpseph, true); 209 if (_ephUser.putNewEph(&eph) == success) { 210 printEph(eph, true); 256 211 } 257 212 else { 258 printGPSEph(gpseph, false); 259 delete gpseph; 213 printEph(eph, false); 260 214 } 261 215 } … … 263 217 // New Glonass Ephemeris 264 218 //////////////////////////////////////////////////////////////////////////// 265 void t_bncCore::slotNewGlonassEph( glonassephemeris* glonasseph, const QString& staID) {219 void t_bncCore::slotNewGlonassEph(t_ephGlo eph) { 266 220 267 221 QMutexLocker locker(&_mutex); 268 222 269 // Check wrong Ephemerides 270 // ----------------------- 271 if (glonasseph->x_pos == 0.0 && 272 glonasseph->y_pos == 0.0 && 273 glonasseph->z_pos == 0.0) { 274 delete glonasseph; 275 return; 276 } 277 278 glonassephemeris copy_glonasseph = *glonasseph; 279 emit newEphGlonass(copy_glonasseph); 223 emit newGlonassEph(eph); 280 224 281 225 printEphHeader(); 282 226 283 glonassephemeris** ee = &_glonassEph[glonasseph->almanac_number-1]; 284 285 int wwOld, towOld, wwNew, towNew; 286 if (*ee != 0) { 287 wwOld = (*ee)->GPSWeek; 288 towOld = (*ee)->GPSTOW; 289 updatetime(&wwOld, &towOld, (*ee)->tb*1000, 0); // Moscow -> GPS 290 291 wwNew = glonasseph->GPSWeek; 292 towNew = glonasseph->GPSTOW; 293 updatetime(&wwNew, &towNew, glonasseph->tb*1000, 0); // Moscow -> GPS 294 } 295 296 if ( *ee == 0 || 297 wwNew > wwOld || 298 (wwNew == wwOld && towNew > towOld) ) { 299 delete *ee; 300 *ee = glonasseph; 301 printGlonassEph(glonasseph, true, staID); 227 if (_ephUser.putNewEph(&eph) == success) { 228 printEph(eph, true); 302 229 } 303 230 else { 304 printGlonassEph(glonasseph, false, staID); 305 delete glonasseph; 231 printEph(eph, false); 306 232 } 307 233 } … … 309 235 // New Galileo Ephemeris 310 236 //////////////////////////////////////////////////////////////////////////// 311 void t_bncCore::slotNewGalileoEph( galileoephemeris* galileoeph) {237 void t_bncCore::slotNewGalileoEph(t_ephGal eph) { 312 238 313 239 QMutexLocker locker(&_mutex); 314 240 315 galileoephemeris copy_galileoeph = *galileoeph; 316 emit newEphGalileo(copy_galileoeph); 241 emit newGalileoEph(eph); 317 242 318 243 printEphHeader(); 319 244 320 int galIndex = galileoeph->satellite; 321 /* GIOVE */ 322 if(galIndex == 51) galIndex = 1; 323 else if(galIndex == 52) galIndex = 16; 324 if (galIndex < 0 || galIndex > PRN_GALILEO_END - PRN_GALILEO_START) { 325 emit( newMessage("Wrong Galileo Satellite Number", true) ); 326 exit(1); 327 } 328 329 galileoephemeris** ee = &_galileoEph[galIndex]; 330 331 if ( *ee == 0 || 332 galileoeph->Week > (*ee)->Week || 333 (galileoeph->Week == (*ee)->Week && galileoeph->TOC > (*ee)->TOC) ) { 334 delete *ee; 335 *ee = galileoeph; 336 printGalileoEph(galileoeph, true); 245 if (_ephUser.putNewEph(&eph) == success) { 246 printEph(eph, true); 337 247 } 338 248 else { 339 printGalileoEph(galileoeph, false); 340 delete galileoeph; 341 } 342 } 249 printEph(eph, false); 250 } 251 } 252 253 // New SBAS Ephemeris 254 //////////////////////////////////////////////////////////////////////////// 255 void t_bncCore::slotNewSBASEph(t_ephSBAS eph) { 256 257 QMutexLocker locker(&_mutex); 258 259 emit newSBASEph(eph); 260 261 printEphHeader(); 262 263 if (_ephUser.putNewEph(&eph) == success) { 264 printEph(eph, true); 265 } 266 else { 267 printEph(eph, false); 268 } 269 } 270 343 271 344 272 // Print Header of the output File(s) … … 393 321 else { 394 322 _ephFileNameGPS = ephFileNameGPS; 395 }396 397 for (int ii = PRN_GPS_START; ii <= PRN_GPS_END; ii++) {398 delete _gpsEph[ii-PRN_GPS_START];399 _gpsEph[ii-PRN_GPS_START] = 0;400 }401 for (int ii = PRN_QZSS_START; ii <= PRN_QZSS_END; ii++) {402 delete _qzssEph[ii-PRN_QZSS_START];403 _qzssEph[ii-PRN_QZSS_START] = 0;404 }405 for (int ii = PRN_GLONASS_START; ii <= PRN_GLONASS_END; ii++) {406 delete _glonassEph[ii-PRN_GLONASS_START];407 _glonassEph[ii-PRN_GLONASS_START] = 0;408 }409 for (int ii = PRN_GALILEO_START; ii <= PRN_GALILEO_END; ii++) {410 delete _galileoEph[ii-PRN_GALILEO_START];411 _galileoEph[ii-PRN_GALILEO_START] = 0;412 }413 for (int ii = PRN_SBAS_START; ii <= PRN_SBAS_END; ii++) {414 delete _sbasEph[ii-PRN_SBAS_START];415 _sbasEph[ii-PRN_SBAS_START] = 0;416 323 } 417 324 … … 523 430 } 524 431 525 // Print One GPS Ephemeris 526 //////////////////////////////////////////////////////////////////////////// 527 void t_bncCore::printGPSEph(gpsephemeris* ep, bool printFile) { 528 529 t_ephGPS eph; 530 eph.set(ep); 432 // Print One Ephemeris 433 //////////////////////////////////////////////////////////////////////////// 434 void t_bncCore::printEph(const t_eph& eph, bool printFile) { 531 435 532 436 QString strV2 = eph.toString(t_rnxNavFile::defaultRnxNavVersion2); 533 437 QString strV3 = eph.toString(t_rnxObsHeader::defaultRnxObsVersion3); 534 438 535 printOutput(printFile, _ephStreamGPS, strV2, strV3);536 }537 538 // Print One Glonass Ephemeris539 ////////////////////////////////////////////////////////////////////////////540 void t_bncCore::printGlonassEph(glonassephemeris* ep, bool printFile, const QString& /* staID */) {541 542 t_ephGlo eph;543 eph.set(ep);544 545 QString strV2 = eph.toString(t_rnxNavFile::defaultRnxNavVersion2);546 QString strV3 = eph.toString(t_rnxObsHeader::defaultRnxObsVersion3);547 548 //// beg test Dirk549 // QString hlp = strV2;550 // cout << hlp.replace('\n', ' ').toAscii().data() << ' ' << staID.toAscii().data() << endl;551 //// end test Dirk552 553 439 printOutput(printFile, _ephStreamGlonass, strV2, strV3); 554 }555 556 // Print One Galileo Ephemeris557 ////////////////////////////////////////////////////////////////////////////558 void t_bncCore::printGalileoEph(galileoephemeris* ep, bool printFile) {559 560 t_ephGal eph;561 eph.set(ep);562 563 QString strV2 = eph.toString(t_rnxNavFile::defaultRnxNavVersion2);564 QString strV3 = eph.toString(t_rnxObsHeader::defaultRnxObsVersion3);565 566 printOutput(printFile, _ephStreamGalileo, strV2, strV3);567 440 } 568 441 … … 764 637 } 765 638 766 // Check Ephemeris Consistency767 ////////////////////////////////////////////////////////////////////////////768 void t_bncCore::checkEphemeris(gpsephemeris* oldEph, gpsephemeris* newEph) {769 if (oldEph->clock_bias != newEph->clock_bias ||770 oldEph->clock_drift != newEph->clock_drift ||771 oldEph->clock_driftrate != newEph->clock_driftrate) {772 QString msg = currentDateAndTimeGPS().toString(Qt::ISODate) +773 QString(" %1 EPH DIFFERS\n").arg(oldEph->satellite);774 messagePrivate(msg.toAscii());775 }776 }777 778 779 639 // 780 640 //////////////////////////////////////////////////////////////////////////// … … 822 682 } 823 683 824 // New SBAS Ephemeris825 ////////////////////////////////////////////////////////////////////////////826 void t_bncCore::slotNewSBASEph(sbasephemeris* sbaseph) {827 QMutexLocker locker(&_mutex);828 829 // Check wrong Ephemerides830 // -----------------------831 if (sbaseph->x_pos == 0.0 &&832 sbaseph->y_pos == 0.0 &&833 sbaseph->z_pos == 0.0) {834 delete sbaseph;835 return;836 }837 838 sbasephemeris copy_sbaseph = *sbaseph;839 emit newEphSBAS(copy_sbaseph);840 841 printEphHeader();842 843 sbasephemeris** ee = &_sbasEph[sbaseph->satellite - PRN_SBAS_START];844 845 bool replace = false;846 if (*ee != 0) {847 bncTime oldTime((*ee)->GPSweek_TOE, double((*ee)->TOE));848 bncTime newTime(sbaseph->GPSweek_TOE, double(sbaseph->TOE));849 if (newTime > oldTime) {850 replace = true;851 }852 }853 854 if ( *ee == 0 || replace) {855 delete *ee;856 *ee = sbaseph;857 printSBASEph(sbaseph, true);858 }859 else {860 printSBASEph(sbaseph, false);861 delete sbaseph;862 }863 }864 865 // Print One SBAS Ephemeris866 ////////////////////////////////////////////////////////////////////////////867 void t_bncCore::printSBASEph(sbasephemeris* ep, bool printFile) {868 869 t_ephSBAS eph;870 eph.set(ep);871 872 QString strV2 = eph.toString(t_rnxNavFile::defaultRnxNavVersion2);873 QString strV3 = eph.toString(t_rnxObsHeader::defaultRnxObsVersion3);874 875 printOutput(printFile, _ephStreamSBAS, strV2, strV3);876 } -
trunk/BNC/src/bnccore.h
r6384 r6432 31 31 #include "bnccaster.h" 32 32 #include "bncrawfile.h" 33 #include " RTCM3/RTCM3Decoder.h"33 #include "bncephuser.h" 34 34 35 35 class bncComb; … … 76 76 public slots: 77 77 void slotMessage(QByteArray msg, bool showOnScreen); 78 void slotNewGPSEph( gpsephemeris* gpseph);79 void slotNewGlonassEph( glonassephemeris* glonasseph, const QString& staID);80 void slotNewGalileoEph( galileoephemeris* galileoeph);81 void slotNewSBASEph( sbasephemeris* sbaseph);78 void slotNewGPSEph(t_ephGPS); 79 void slotNewGlonassEph(t_ephGlo); 80 void slotNewGalileoEph(t_ephGal); 81 void slotNewSBASEph(t_ephSBAS); 82 82 void slotNewOrbCorrections(QList<t_orbCorr> orbCorr); 83 83 void slotNewClkCorrections(QList<t_clkCorr> clkCorr); … … 86 86 signals: 87 87 void newMessage(QByteArray msg, bool showOnScreen); 88 void new EphGPS(gpsephemeris gpseph);89 void new EphGlonass(glonassephemeris glonasseph);90 void new EphGalileo(galileoephemeris galileoeph);91 void new EphSBAS(sbasephemeris sbaseph);88 void newGPSEph(t_ephGPS eph); 89 void newGlonassEph(t_ephGlo eph); 90 void newSBASEph(t_ephSBAS eph); 91 void newGalileoEph(t_ephGal eph); 92 92 void newOrbCorrections(QList<t_orbCorr> orbCorr); 93 93 void newClkCorrections(QList<t_clkCorr> clkCorr); … … 106 106 private: 107 107 void printEphHeader(); 108 void printGPSEph(gpsephemeris* ep, bool printFile); 109 void printGlonassEph(glonassephemeris* ep, bool printFile, const QString& staID); 110 void printGalileoEph(galileoephemeris* ep, bool printFile); 111 void printSBASEph(sbasephemeris* ep, bool printFile); 108 void printEph(const t_eph& eph, bool printFile); 112 109 void printOutput(bool printFile, QTextStream* stream, 113 110 const QString& strV2, const QString& strV3); 114 111 void messagePrivate(const QByteArray& msg); 115 void checkEphemeris(gpsephemeris* oldEph, gpsephemeris* newEph);116 112 117 113 QSettings::SettingsMap _settings; … … 132 128 QFile* _ephFileSBAS; 133 129 QTextStream* _ephStreamSBAS; 134 gpsephemeris* _gpsEph[PRN_GPS_END - PRN_GPS_START + 1];135 gpsephemeris* _qzssEph[PRN_QZSS_END - PRN_QZSS_START + 1];136 glonassephemeris* _glonassEph[PRN_GLONASS_END - PRN_GLONASS_START + 1];137 galileoephemeris* _galileoEph[PRN_GALILEO_END - PRN_GALILEO_START + 1];138 sbasephemeris* _sbasEph[PRN_SBAS_END - PRN_SBAS_START + 1];139 130 QString _userName; 140 131 QString _pgmName; … … 159 150 mutable QMutex _mutexDateAndTimeGPS; 160 151 BNC_PPP::t_pppMain* _pppMain; 152 bncEphUser _ephUser; 161 153 }; 162 154 -
trunk/BNC/src/bncephuser.cpp
r6396 r6432 48 48 // Constructor 49 49 //////////////////////////////////////////////////////////////////////////// 50 bncEphUser::bncEphUser() { 51 } 52 53 // Constructor 54 //////////////////////////////////////////////////////////////////////////// 50 55 bncEphUser::bncEphUser(bool connectSlots) { 56 if (connectSlots) { 57 connect(BNC_CORE, SIGNAL(newEphGPS(t_ephGPS)), 58 this, SLOT(slotNewEphGPS(t_ephGPS)), Qt::DirectConnection); 59 60 connect(BNC_CORE, SIGNAL(newEphGlonass(t_ephGlo)), 61 this, SLOT(slotNewEphGlonass(t_ephGlo)), Qt::DirectConnection); 62 63 connect(BNC_CORE, SIGNAL(newEphGalileo(t_ephGal)), 64 this, SLOT(slotNewEphGalileo(t_ephGal)), Qt::DirectConnection); 51 65 52 if (connectSlots) { 53 connect(BNC_CORE, SIGNAL(newEphGPS(gpsephemeris)), 54 this, SLOT(slotNewEphGPS(gpsephemeris)), Qt::DirectConnection); 55 56 connect(BNC_CORE, SIGNAL(newEphGlonass(glonassephemeris)), 57 this, SLOT(slotNewEphGlonass(glonassephemeris)), Qt::DirectConnection); 58 59 connect(BNC_CORE, SIGNAL(newEphGalileo(galileoephemeris)), 60 this, SLOT(slotNewEphGalileo(galileoephemeris)), Qt::DirectConnection); 61 62 connect(BNC_CORE, SIGNAL(newEphSBAS(sbasephemeris)), 63 this, SLOT(slotNewEphSBAS(sbasephemeris)), Qt::DirectConnection); 66 connect(BNC_CORE, SIGNAL(newEphSBAS(t_ephSBAS)), 67 this, SLOT(slotNewEphSBAS(t_ephSBAS)), Qt::DirectConnection); 64 68 } 65 69 } … … 75 79 } 76 80 77 // 81 // New GPS Ephemeris 78 82 //////////////////////////////////////////////////////////////////////////// 79 void bncEphUser::slotNewEphGPS(gpsephemeris gpseph) { 80 t_ephGPS* newEph = new t_ephGPS(); newEph->set(&gpseph); 81 if (putNewEph(newEph) != success) { 82 delete newEph; 83 } 83 void bncEphUser::slotNewGPSEph(t_ephGPS eph) { 84 putNewEph(&eph); 85 } 86 87 // New Glonass Ephemeris 88 //////////////////////////////////////////////////////////////////////////// 89 void bncEphUser::slotNewGlonassEph(t_ephGlo eph) { 90 putNewEph(&eph); 84 91 } 85 92 86 // 93 // New Galileo Ephemeris 87 94 //////////////////////////////////////////////////////////////////////////// 88 void bncEphUser::slotNewEphGlonass(glonassephemeris gloeph) { 89 t_ephGlo* newEph = new t_ephGlo(); newEph->set(&gloeph); 90 if (putNewEph(newEph) != success) { 91 delete newEph; 92 } 95 void bncEphUser::slotNewGalileoEph(t_ephGal eph) { 96 putNewEph(&eph); 93 97 } 94 98 95 // 99 // New SBAS Ephemeris 96 100 //////////////////////////////////////////////////////////////////////////// 97 void bncEphUser::slotNewEphGalileo(galileoephemeris galeph) { 98 t_ephGal* newEph = new t_ephGal(); newEph->set(&galeph); 99 if (putNewEph(newEph) != success) { 100 delete newEph; 101 } 102 } 103 104 // 105 //////////////////////////////////////////////////////////////////////////// 106 void bncEphUser::slotNewEphSBAS(sbasephemeris sbaseph) { 107 t_ephSBAS* newEph = new t_ephSBAS(); newEph->set(&sbaseph); 108 if (putNewEph(newEph) != success) { 109 delete newEph; 110 } 101 void bncEphUser::slotNewSBASEph(t_ephSBAS eph) { 102 putNewEph(&eph); 111 103 } 112 104 … … 118 110 t_irc irc = failure; 119 111 120 if ( !newEph) {112 if (newEph == 0) { 121 113 return irc; 122 114 } -
trunk/BNC/src/bncephuser.h
r6395 r6432 41 41 42 42 public: 43 bncEphUser(bool connectSlots = true); 43 bncEphUser(); 44 bncEphUser(bool connectSlots); 44 45 virtual ~bncEphUser(); 45 46 … … 70 71 71 72 public slots: 72 void slotNew EphGPS(gpsephemeris gpseph);73 void slotNew EphGlonass(glonassephemeris gloeph);74 void slotNew EphGalileo(galileoephemeris galeph);75 void slotNew EphSBAS(sbasephemeris sbaseph);73 void slotNewGPSEph(t_ephGPS); 74 void slotNewGlonassEph(t_ephGlo); 75 void slotNewGalileoEph(t_ephGal); 76 void slotNewSBASEph(t_ephSBAS); 76 77 77 78 protected: -
trunk/BNC/src/pppRun.cpp
r6185 r6432 88 88 this, SLOT(slotNewObs(QByteArray, QList<t_satObs>)),conType); 89 89 90 connect(BNC_CORE, SIGNAL(newEphGPS( gpsephemeris)),91 this, SLOT(slotNewEphGPS( gpsephemeris)),conType);90 connect(BNC_CORE, SIGNAL(newEphGPS(t_ephGPS)), 91 this, SLOT(slotNewEphGPS(t_ephGPS)),conType); 92 92 93 connect(BNC_CORE, SIGNAL(newEphGlonass( glonassephemeris)),94 this, SLOT(slotNewEphGlonass( glonassephemeris)),conType);93 connect(BNC_CORE, SIGNAL(newEphGlonass(t_ephGlo)), 94 this, SLOT(slotNewEphGlonass(t_ephGlo)),conType); 95 95 96 connect(BNC_CORE, SIGNAL(newEphGalileo( galileoephemeris)),97 this, SLOT(slotNewEphGalileo( galileoephemeris)),conType);96 connect(BNC_CORE, SIGNAL(newEphGalileo(t_ephGal)), 97 this, SLOT(slotNewEphGalileo(t_ephGal)),conType); 98 98 99 99 connect(BNC_CORE, SIGNAL(newOrbCorrections(QList<t_orbCorr>)), … … 157 157 // 158 158 //////////////////////////////////////////////////////////////////////////// 159 void t_pppRun::slotNewEphGPS(gpsephemeris gpseph) { 160 QMutexLocker locker(&_mutex); 161 t_ephGPS eph; 162 eph.set(&gpseph); 159 void t_pppRun::slotNewEphGPS(t_ephGPS eph) { 160 QMutexLocker locker(&_mutex); 163 161 _pppClient->putEphemeris(&eph); 164 162 } … … 166 164 // 167 165 //////////////////////////////////////////////////////////////////////////// 168 void t_pppRun::slotNewEphGlonass(glonassephemeris gloeph) { 169 QMutexLocker locker(&_mutex); 170 t_ephGlo eph; 171 eph.set(&gloeph); 166 void t_pppRun::slotNewEphGlonass(t_ephGlo eph) { 167 QMutexLocker locker(&_mutex); 172 168 _pppClient->putEphemeris(&eph); 173 169 } … … 175 171 // 176 172 //////////////////////////////////////////////////////////////////////////// 177 void t_pppRun::slotNewEphGalileo(galileoephemeris galeph) { 178 QMutexLocker locker(&_mutex); 179 t_ephGal eph; 180 eph.set(&galeph); 173 void t_pppRun::slotNewEphGalileo(t_ephGal eph) { 174 QMutexLocker locker(&_mutex); 181 175 _pppClient->putEphemeris(&eph); 182 176 } -
trunk/BNC/src/pppRun.h
r6141 r6432 35 35 36 36 public slots: 37 void slotNewEphGPS( gpsephemeris gpseph);38 void slotNewEphGlonass( glonassephemeris gloeph);39 void slotNewEphGalileo( galileoephemeris galeph);37 void slotNewEphGPS(t_ephGPS); 38 void slotNewEphGlonass(t_ephGlo); 39 void slotNewEphGalileo(t_ephGal); 40 40 void slotNewOrbCorrections(QList<t_orbCorr> orbCorr); 41 41 void slotNewClkCorrections(QList<t_clkCorr> clkCorr);
Note:
See TracChangeset
for help on using the changeset viewer.