Changeset 1155 in ntrip
- Timestamp:
 - Oct 7, 2008, 12:52:45 PM (17 years ago)
 - Location:
 - trunk/BNC
 - Files:
 - 
      
- 3 edited
 
- 
          
  bncapp.cpp (modified) (1 diff)
 - 
          
  bncapp.h (modified) (1 diff)
 - 
          
  bncutils.cpp (modified) (2 diffs)
 
 
Legend:
- Unmodified
 - Added
 - Removed
 
- 
      
trunk/BNC/bncapp.cpp
r1154 r1155 119 119 120 120 _corrs = new QMultiMap<long, QString>; 121 122 _currentDateAndTimeGPS = 0; 121 123 } 122 124  - 
      
trunk/BNC/bncapp.h
r1044 r1155 42 42 void setPortCorr(int port); 43 43 void setCaster(bncCaster* caster) {_caster = caster;} 44 QDateTime* _currentDateAndTimeGPS; 44 45 public slots: 45 46 void slotMessage(const QByteArray msg);  - 
      
trunk/BNC/bncutils.cpp
r1154 r1155 48 48 49 49 #include "bncutils.h" 50 #include "bncapp.h" 50 51 51 52 using namespace std; … … 82 83 void currentGPSWeeks(int& week, double& sec) { 83 84 84 QDateTime currDateTime = QDateTime::currentDateTime().toUTC(); 85 QDateTime currDateTime; 86 int leapsecond = 0; 87 88 if ( ((bncApp*) qApp)->_currentDateAndTimeGPS ) { 89 currDateTime = *(((bncApp*) qApp)->_currentDateAndTimeGPS); 90 } 91 else { 92 currDateTime = QDateTime::currentDateTime().toUTC(); 93 if (currDateTime.date().year() >= 2009) { 94 leapsecond = 15; 95 } 96 else { 97 leapsecond = 14; 98 } 99 } 100 85 101 QDate currDate = currDateTime.date(); 86 102 QTime currTime = currDateTime.time(); 87 88 int leapsecond = 14;89 if (currDate.year() >= 2009) {leapsecond = 15;}90 103 91 104 week = int( (double(currDate.toJulianDay()) - 2444244.5) / 7 );  
  Note:
 See   TracChangeset
 for help on using the changeset viewer.
  