Changeset 6384 in ntrip
- Timestamp:
- Dec 19, 2014, 3:56:52 PM (10 years ago)
- Location:
- trunk/BNC/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/bnccore.cpp
r6383 r6384 93 93 _galileoEph[ii-PRN_GALILEO_START] = 0; 94 94 } 95 for (int ii = PRN_SBAS_START; ii <= PRN_SBAS_END; ii++) { 96 _sbasEph[ii-PRN_SBAS_START] = 0; 97 } 95 98 96 99 // Eph file(s) … … 103 106 _ephFileGalileo = 0; 104 107 _ephStreamGalileo = 0; 108 _ephFileSBAS = 0; 109 _ephStreamSBAS = 0; 105 110 106 111 _port = 0; … … 155 160 for (int ii = PRN_GALILEO_START; ii <= PRN_GALILEO_END; ii++) { 156 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]; 157 165 } 158 166 … … 403 411 _galileoEph[ii-PRN_GALILEO_START] = 0; 404 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 } 405 417 406 418 delete _ephStreamGPS; … … 409 421 QFlags<QIODevice::OpenModeFlag> appendFlagGPS; 410 422 QFlags<QIODevice::OpenModeFlag> appendFlagGlonass; 411 QFlags<QIODevice::OpenModeFlag> appendFlagGalileo;412 423 413 424 if ( Qt::CheckState(settings.value("rnxAppend").toInt()) == Qt::Checked && … … 426 437 _ephFileGalileo = _ephFileGPS; 427 438 _ephStreamGalileo = _ephStreamGPS; 439 _ephFileSBAS = _ephFileGPS; 440 _ephStreamSBAS = _ephStreamGPS; 428 441 } 429 442 else if (_rinexVers == 2) { … … 814 827 QMutexLocker locker(&_mutex); 815 828 816 qDebug() << "t_bncCore::slotNewSBASEph"; 817 } 829 // Check wrong Ephemerides 830 // ----------------------- 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 Ephemeris 866 //////////////////////////////////////////////////////////////////////////// 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
r6383 r6384 89 89 void newEphGlonass(glonassephemeris glonasseph); 90 90 void newEphGalileo(galileoephemeris galileoeph); 91 void newEphSBAS(sbasephemeris sbaseph); 91 92 void newOrbCorrections(QList<t_orbCorr> orbCorr); 92 93 void newClkCorrections(QList<t_clkCorr> clkCorr); … … 108 109 void printGlonassEph(glonassephemeris* ep, bool printFile, const QString& staID); 109 110 void printGalileoEph(galileoephemeris* ep, bool printFile); 111 void printSBASEph(sbasephemeris* ep, bool printFile); 110 112 void printOutput(bool printFile, QTextStream* stream, 111 113 const QString& strV2, const QString& strV3); … … 128 130 QFile* _ephFileGalileo; 129 131 QTextStream* _ephStreamGalileo; 132 QFile* _ephFileSBAS; 133 QTextStream* _ephStreamSBAS; 130 134 gpsephemeris* _gpsEph[PRN_GPS_END - PRN_GPS_START + 1]; 131 135 gpsephemeris* _qzssEph[PRN_QZSS_END - PRN_QZSS_START + 1]; 132 136 glonassephemeris* _glonassEph[PRN_GLONASS_END - PRN_GLONASS_START + 1]; 133 137 galileoephemeris* _galileoEph[PRN_GALILEO_END - PRN_GALILEO_START + 1]; 138 sbasephemeris* _sbasEph[PRN_SBAS_END - PRN_SBAS_START + 1]; 134 139 QString _userName; 135 140 QString _pgmName;
Note:
See TracChangeset
for help on using the changeset viewer.