- Timestamp:
- Mar 29, 2011, 8:52:57 PM (14 years ago)
- Location:
- trunk/BNC/upload
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/upload/bncrtnetdecoder.cpp
r3182 r3186 52 52 bncSettings settings; 53 53 54 _year = 0;55 56 54 // List of upload casters 57 55 // ---------------------- … … 69 67 QTextStream in(line.toAscii()); 70 68 QString hlp; 71 in >> hlp >> _year >> _month >> _day >> _hour >> _min >> _sec; 72 GPSweekFromYMDhms(_year, _month, _day, _hour, _min, _sec, _GPSweek, _GPSweeks); 69 int year, month, day, hour, min; 70 double sec; 71 in >> hlp >> year >> month >> day >> hour >> min >> sec; 72 _epoTime.set( year, month, day, hour, min, sec); 73 73 } 74 74 … … 91 91 readEpochTime(hlpLines[ii]); 92 92 } 93 else if (_ year != 0) {93 else if (_epoTime.valid()) { 94 94 lines << hlpLines[ii]; 95 95 } … … 101 101 if (lines.size() > 0) { 102 102 for (int ic = 0; ic < _caster.size(); ic++) { 103 _caster.at(ic)->uploadClockOrbitBias(lines, _eph, _year, _month, _day, 104 _GPSweek, _GPSweeks); 103 _caster.at(ic)->uploadClockOrbitBias(_epoTime, _eph, lines); 105 104 } 106 105 } -
trunk/BNC/upload/bncrtnetdecoder.h
r3182 r3186 29 29 #include <QtCore> 30 30 #include "bncephuser.h" 31 #include "bnctime.h" 31 32 #include "bncuploadcaster.h" 32 33 #include "RTCM/GPSDecoder.h" … … 41 42 QList<bncUploadCaster*> _caster; 42 43 QString _buffer; 43 int _GPSweek; 44 double _GPSweeks; 45 int _year; 46 int _month; 47 int _day; 48 int _hour; 49 int _min; 50 double _sec; 44 bncTime _epoTime; 51 45 }; 52 46 -
trunk/BNC/upload/bncuploadcaster.cpp
r3185 r3186 262 262 // Encode and Upload Clocks, Orbits, and Biases 263 263 //////////////////////////////////////////////////////////////////////////// 264 void bncUploadCaster::uploadClockOrbitBias(const QStringList& lines, 265 const QMap<QString, bncEphUser::t_ephPair*>& ephMap, 266 int year, int month, int day, 267 int GPSweek, double GPSweeks) { 268 264 void bncUploadCaster::uploadClockOrbitBias(const bncTime& epoTime, 265 const QMap<QString, bncEphUser::t_ephPair*>& ephMap, 266 const QStringList& lines) { 269 267 this->open(); 268 269 unsigned year, month, day; 270 epoTime.civil_date(year, month, day); 270 271 271 272 struct ClockOrbit co; 272 273 memset(&co, 0, sizeof(co)); 273 co.GPSEpochTime = (int)GPSweeks;274 co.GLONASSEpochTime = (int)fmod(GPSweeks, 86400.0)274 co.GPSEpochTime = static_cast<int>(epoTime.gpssec()); 275 co.GLONASSEpochTime = static_cast<int>(fmod(epoTime.gpssec(), 86400.0)) 275 276 + 3 * 3600 - gnumleap(year, month, day); 276 277 co.ClockDataSupplied = 1; … … 280 281 struct Bias bias; 281 282 memset(&bias, 0, sizeof(bias)); 282 bias.GPSEpochTime = (int)GPSweeks; 283 bias.GLONASSEpochTime = (int)fmod(GPSweeks, 86400.0) 284 + 3 * 3600 - gnumleap(year, month, day); 283 bias.GPSEpochTime = co.GPSEpochTime; 284 bias.GLONASSEpochTime = co.GLONASSEpochTime; 285 285 286 286 for (int ii = 0; ii < lines.size(); ii++) { … … 335 335 if (sd) { 336 336 QString outLine; 337 processSatellite(ep, GPSweek, GPSweeks, prn, xx, sd, outLine);337 processSatellite(ep, epoTime.gpsw(), epoTime.gpssec(), prn, xx, sd, outLine); 338 338 if (_outFile) { 339 _outFile->write( GPSweek, GPSweeks, outLine);339 _outFile->write(epoTime.gpsw(), epoTime.gpssec(), outLine); 340 340 } 341 341 } -
trunk/BNC/upload/bncuploadcaster.h
r3185 r3186 4 4 #include <QtNetwork> 5 5 #include "bncephuser.h" 6 #include "bnctime.h" 6 7 7 8 class bncoutf; … … 24 25 void printAscii(const QString& line); 25 26 bool usedSocket() const {return _outSocket;} 26 void uploadClockOrbitBias(const QStringList& lines,27 void uploadClockOrbitBias(const bncTime& epoTime, 27 28 const QMap<QString, bncEphUser::t_ephPair*>& ephMap, 28 int year, int month, int day, 29 int GPSweek, double GPSweeks); 29 const QStringList& lines); 30 30 31 31 signals:
Note:
See TracChangeset
for help on using the changeset viewer.