Changeset 5763 in ntrip for trunk/BNC/src/PPP


Ignore:
Timestamp:
Aug 4, 2014, 8:41:20 AM (10 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC/src/PPP
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/PPP/ppp.h

    r5750 r5763  
    1010
    1111namespace BNC {
     12
     13class 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};
    1223
    1324enum e_pppMode {
  • trunk/BNC/src/PPP/pppClient.cpp

    r5761 r5763  
    371371  station->setDClk(xyzc[3]);
    372372
    373   // US Restriction
    374   // --------------
    375   station->checkRestriction(time);
    376 
    377373  // Tides
    378374  // -----
     
    445441    return finish(failure);
    446442  }
    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;
    457445    return finish(failure);
    458446  }
  • trunk/BNC/src/PPP/pppMain.cpp

    r5762 r5763  
    135135
    136136    if (hlp.size() < 9) {
    137       throw "pppMain: wrong option staTable";
     137      throw pppExcept("pppMain: wrong option staTable");
    138138    }
    139139
  • trunk/BNC/src/PPP/pppThread.cpp

    r5761 r5763  
    7474    QThread::exec();
    7575  }
    76   catch (const char* msg) {
    77     cout << msg << endl;
     76  catch (pppExcept exc) {
     77    cout << exc.what() << endl;
    7878  }
    7979  cout << _opt->_roverName << " exit" << endl;
  • trunk/BNC/src/PPP/station.cpp

    r5743 r5763  
    8181}
    8282
    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  
    3030  double dClk() const {return _dClk;}
    3131  double windUp(const bncTime& time, t_prn prn, const ColumnVector& rSat) const;
    32   void checkRestriction(const bncTime& tt);
    3332
    3433 private:
Note: See TracChangeset for help on using the changeset viewer.