Changeset 5761 in ntrip
- Timestamp:
- Aug 3, 2014, 2:09:40 PM (10 years ago)
- Location:
- trunk/BNC/src/PPP
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/PPP/pppClient.cpp
r5760 r5761 74 74 // Constructor 75 75 ////////////////////////////////////////////////////////////////////////////// 76 t_pppClient::t_pppClient() { 77 _opt = 0; 76 t_pppClient::t_pppClient(const t_options* opt) { 78 77 _output = 0; 79 _ antex = 0;78 _opt = new t_options(*opt); 80 79 _log = new ostringstream(); 81 80 _ephPool = new t_ephPool(); … … 83 82 _staRover = new t_station(); 84 83 _filter = new t_filter(); 84 85 if (!_opt->_antexFile.empty()) { 86 _antex = new bncAntex(_opt->_antexFile.c_str()); 87 } 88 else { 89 _antex = 0; 90 } 91 85 92 CLIENTS.setLocalData(this); // CLIENTS takes ownership over "this" 86 93 } … … 98 105 delete _filter; 99 106 clearObs(); 100 }101 102 //103 //////////////////////////////////////////////////////////////////////////////104 void t_pppClient::setOptions(const t_options* opt) {105 delete _opt;106 _opt = new t_options(*opt);107 108 delete _antex; _antex = 0;109 if (!_opt->_antexFile.empty()) {110 _antex = new bncAntex(_opt->_antexFile.c_str());111 }112 107 } 113 108 -
trunk/BNC/src/PPP/pppClient.h
r5758 r5761 20 20 class t_pppClient { 21 21 public: 22 t_pppClient( );22 t_pppClient(const t_options* opt); 23 23 ~t_pppClient(); 24 void setOptions(const t_options* opt); 24 25 25 void putGPSEphemeris(const t_ephGPS* eph); 26 26 void putGloEphemeris(const t_ephGlo* eph); … … 30 30 void processEpoch(int numSatRover, const t_pppSatObs* satObsRover, 31 31 t_output* output); 32 32 33 const t_ephPool* ephPool() const {return _ephPool;} 33 34 const t_obsPool* obsPool() const {return _obsPool;} 34 35 const bncAntex* antex() const {return _antex;} 35 36 const t_station* staRover() const {return _staRover;} 36 double offGG() const {return _offGG;} 37 double offGG() const {return _offGG;} 38 39 std::ostringstream& log() {return *_log;} 40 const t_options* opt() const {return _opt;} 41 37 42 static void bancroft(const Matrix& BBpass, ColumnVector& pos); 38 39 std::ostringstream* _log;40 t_options* _opt;41 43 42 44 static t_pppClient* instance(); … … 64 66 double _offGG; 65 67 std::vector<t_satObs*> _obsRover; 66 68 std::ostringstream* _log; 69 t_options* _opt; 67 70 }; 68 71 69 72 }; // namespace BNC 70 73 71 // Pointer to the main object (thread-specific)72 74 #define PPP_CLIENT (BNC::t_pppClient::instance()) 73 74 // Log stream abbreviation 75 #define LOG (*PPP_CLIENT->_log) 76 77 // Options abbreviation 78 #define OPT (PPP_CLIENT->_opt) 75 #define LOG (BNC::t_pppClient::instance()->log()) 76 #define OPT (BNC::t_pppClient::instance()->opt()) 79 77 80 78 #endif -
trunk/BNC/src/PPP/pppThread.cpp
r5758 r5761 100 100 this, SLOT(slotNewCorrections(QStringList))); 101 101 102 _pppClient = new t_pppClient( );102 _pppClient = new t_pppClient(_opt); 103 103 } 104 104 else {
Note:
See TracChangeset
for help on using the changeset viewer.