Changeset 854 in ntrip
- Timestamp:
- Apr 25, 2008, 3:53:10 PM (17 years ago)
- Location:
- trunk/BNS
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNS/bnsoutf.cpp
r853 r854 16 16 * -----------------------------------------------------------------------*/ 17 17 18 #include <math.h> 18 19 #include <iomanip> 19 20 … … 137 138 const ColumnVector&) { 138 139 140 if (_sampl != 0 && fmod(GPSweeks, _sampl) != 0.0) { 141 return failure; 142 } 143 139 144 QDateTime datTim = dateAndTimeFromGPSweek(GPSweek, GPSweeks); 140 145 -
trunk/BNS/bnsoutf.h
r852 r854 6 6 #include <QtCore> 7 7 8 #include "bnsutils.h" 9 8 10 class bnsoutf { 9 11 public: … … 12 14 virtual ~bnsoutf(); 13 15 14 virtual voidwrite(int GPSweek, double GPSweeks, const QString& prn,15 const ColumnVector& xx);16 virtual t_irc write(int GPSweek, double GPSweeks, const QString& prn, 17 const ColumnVector& xx); 16 18 17 19 protected: 18 20 virtual void writeHeader(const QDateTime& datTim) = 0; 19 21 std::ofstream _out; 20 int _lastGPSweek;21 double _lastGPSweeks;22 22 23 23 private: -
trunk/BNS/bnsrinex.cpp
r850 r854 42 42 // Write One Epoch 43 43 //////////////////////////////////////////////////////////////////////////// 44 voidbnsRinex::write(int GPSweek, double GPSweeks, const QString& prn,44 t_irc bnsRinex::write(int GPSweek, double GPSweeks, const QString& prn, 45 45 const ColumnVector& xx) { 46 46 47 bnsoutf::write(GPSweek, GPSweeks, prn, xx);47 if (bnsoutf::write(GPSweek, GPSweeks, prn, xx) == success) { 48 48 49 return success; 50 } 51 else { 52 return failure; 53 } 49 54 } -
trunk/BNS/bnsrinex.h
r850 r854 13 13 const QString& intr, int sampl); 14 14 virtual ~bnsRinex(); 15 virtual voidwrite(int GPSweek, double GPSweeks, const QString& prn,16 const ColumnVector& xx);15 virtual t_irc write(int GPSweek, double GPSweeks, const QString& prn, 16 const ColumnVector& xx); 17 17 18 18 private: -
trunk/BNS/bnssp3.cpp
r852 r854 29 29 const QString& intr, int sampl) 30 30 : bnsoutf(prep, ext, path, intr, sampl) { 31 32 _lastGPSweek = 0; 33 _lastGPSweeks = 0.0; 31 34 } 32 35 … … 44 47 // Write One Epoch 45 48 //////////////////////////////////////////////////////////////////////////// 46 voidbnsSP3::write(int GPSweek, double GPSweeks, const QString& prn,49 t_irc bnsSP3::write(int GPSweek, double GPSweeks, const QString& prn, 47 50 const ColumnVector& xx) { 48 51 49 bnsoutf::write(GPSweek, GPSweeks, prn, xx);52 if ( bnsoutf::write(GPSweek, GPSweeks, prn, xx) == success) { 50 53 51 if (_lastGPSweek != GPSweek || _lastGPSweeks != GPSweeks) { 52 _lastGPSweek = GPSweek; 53 _lastGPSweeks = GPSweeks; 54 55 QDateTime datTim = dateAndTimeFromGPSweek(GPSweek, GPSweeks); 56 double sec = fmod(GPSweeks, 60.0); 57 58 _out << "* " 59 << datTim.toString("yyyy MM dd hh mm").toAscii().data() 60 << setw(12) << setprecision(8) << sec << endl; 54 if (_lastGPSweek != GPSweek || _lastGPSweeks != GPSweeks) { 55 _lastGPSweek = GPSweek; 56 _lastGPSweeks = GPSweeks; 57 58 QDateTime datTim = dateAndTimeFromGPSweek(GPSweek, GPSweeks); 59 double sec = fmod(GPSweeks, 60.0); 60 61 _out << "* " 62 << datTim.toString("yyyy MM dd hh mm").toAscii().data() 63 << setw(12) << setprecision(8) << sec << endl; 64 } 65 _out << "P" << prn.toAscii().data() 66 << setw(14) << setprecision(6) << xx(1) / 1000.0 67 << setw(14) << setprecision(6) << xx(2) / 1000.0 68 << setw(14) << setprecision(6) << xx(3) / 1000.0 69 << setw(14) << setprecision(6) << xx(4) * 1e6 << endl; 70 71 return success; 61 72 } 62 _out << "P" << prn.toAscii().data() 63 << setw(14) << setprecision(6) << xx(1) / 1000.0 64 << setw(14) << setprecision(6) << xx(2) / 1000.0 65 << setw(14) << setprecision(6) << xx(3) / 1000.0 66 << setw(14) << setprecision(6) << xx(4) * 1e6 << endl; 73 else { 74 return failure; 75 } 67 76 } -
trunk/BNS/bnssp3.h
r850 r854 13 13 const QString& intr, int sampl); 14 14 virtual ~bnsSP3(); 15 virtual voidwrite(int GPSweek, double GPSweeks, const QString& prn,16 const ColumnVector& xx);15 virtual t_irc write(int GPSweek, double GPSweeks, const QString& prn, 16 const ColumnVector& xx); 17 17 18 18 private: 19 19 virtual void writeHeader(const QDateTime& datTim); 20 int _lastGPSweek; 21 double _lastGPSweeks; 20 22 }; 21 23 -
trunk/BNS/bnsutils.h
r804 r854 9 9 10 10 class gpsEph; 11 12 enum t_irc {failure = -1, success}; // return code 11 13 12 14 void expandEnvVar(QString& str);
Note:
See TracChangeset
for help on using the changeset viewer.