Changeset 5763 in ntrip for trunk/BNC/src/PPP
- Timestamp:
- Aug 4, 2014, 8:41:20 AM (10 years ago)
- Location:
- trunk/BNC/src/PPP
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/PPP/ppp.h
r5750 r5763 10 10 11 11 namespace BNC { 12 13 class pppExcept { 14 public: 15 pppExcept(const char* msg) { 16 _msg = msg; 17 } 18 ~pppExcept() {} 19 std::string what() {return _msg;} 20 private: 21 std::string _msg; 22 }; 12 23 13 24 enum e_pppMode { -
trunk/BNC/src/PPP/pppClient.cpp
r5761 r5763 371 371 station->setDClk(xyzc[3]); 372 372 373 // US Restriction374 // --------------375 station->checkRestriction(time);376 377 373 // Tides 378 374 // ----- … … 445 441 return finish(failure); 446 442 } 447 catch (string& msg) { 448 LOG << "Exception: " << msg << endl; 449 return finish(failure); 450 } 451 catch (logic_error exc) { 452 LOG << exc.what() << endl; 453 return finish(failure); 454 } 455 catch (const char* msg) { 456 LOG << msg << endl; 443 catch (pppExcept msg) { 444 LOG << msg.what() << endl; 457 445 return finish(failure); 458 446 } -
trunk/BNC/src/PPP/pppMain.cpp
r5762 r5763 135 135 136 136 if (hlp.size() < 9) { 137 throw "pppMain: wrong option staTable";137 throw pppExcept("pppMain: wrong option staTable"); 138 138 } 139 139 -
trunk/BNC/src/PPP/pppThread.cpp
r5761 r5763 74 74 QThread::exec(); 75 75 } 76 catch ( const char* msg) {77 cout << msg<< endl;76 catch (pppExcept exc) { 77 cout << exc.what() << endl; 78 78 } 79 79 cout << _opt->_roverName << " exit" << endl; -
trunk/BNC/src/PPP/station.cpp
r5743 r5763 81 81 } 82 82 83 //84 //////////////////////////////////////////////////////////////////////////////85 void t_station::checkRestriction(const bncTime& tt) {86 87 const double maxSpeed = 515.0; // [m/s^2]88 const double maxHeight = 18200.0; // [m]89 90 if (_ellApr(3) > maxHeight) {91 throw "t_station: height restriction";92 }93 94 if (tt.valid()) {95 if (_timeCheck.valid()) {96 double dt = tt - _timeCheck;97 if (dt > 0.0) {98 double vel = (_xyzApr - _xyzCheck).norm_Frobenius() / dt;99 if (vel > maxSpeed) {100 throw "t_station: speed restriction";101 }102 }103 }104 _timeCheck = tt;105 _xyzCheck = _xyzApr;106 }107 } -
trunk/BNC/src/PPP/station.h
r5743 r5763 30 30 double dClk() const {return _dClk;} 31 31 double windUp(const bncTime& time, t_prn prn, const ColumnVector& rSat) const; 32 void checkRestriction(const bncTime& tt);33 32 34 33 private:
Note:
See TracChangeset
for help on using the changeset viewer.