Changeset 6443 in ntrip for trunk/BNC/src/bncephuser.h
- Timestamp:
- Dec 26, 2014, 12:47:27 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/bncephuser.h
r6442 r6443 26 26 #define BNCEPHUSER_H 27 27 28 #include <deque> 28 29 #include <QtCore> 29 30 #include <newmat.h> … … 32 33 #include "bnctime.h" 33 34 #include "ephemeris.h" 34 35 extern "C" {36 # include "clock_orbit_rtcm.h"37 }38 35 39 36 class bncEphUser : public QObject { … … 54 51 const t_eph* ephLast(const QString& prn) { 55 52 if (_eph.contains(prn)) { 56 return _eph[prn] ->last;53 return _eph[prn].back(); 57 54 } 58 55 return 0; … … 61 58 const t_eph* ephPrev(const QString& prn) { 62 59 if (_eph.contains(prn)) { 63 return _eph[prn]->prev; 60 unsigned nn = _eph[prn].size(); 61 if (nn > 1) { 62 return _eph[prn].at(nn-2); 63 } 64 64 } 65 65 return 0; 66 66 } 67 67 68 const QList<QString> prnList() {return _eph.keys();} 69 68 70 protected: 69 71 virtual void ephBufferChanged() {} 70 72 71 class t_ephPair { 72 public: 73 t_ephPair(t_eph* lastEph) { 74 last = lastEph; 75 prev = 0; 76 } 77 ~t_ephPair() { 78 delete last; 79 delete prev; 80 } 81 t_eph* last; 82 t_eph* prev; 83 }; 84 85 QMutex _mutex; 86 QMap<QString, t_ephPair*> _eph; 73 private: 74 QMutex _mutex; 75 static const unsigned _maxQueueSize = 5; 76 QMap<QString, std::deque<t_eph*> > _eph; 87 77 }; 88 78
Note:
See TracChangeset
for help on using the changeset viewer.