Ignore:
Timestamp:
Sep 7, 2014, 6:35:49 PM (10 years ago)
Author:
mervart
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/PPP_free/bncpppclient.cpp

    r6082 r6083  
    5454using namespace std;
    5555
     56// Global variable holding thread-specific pointers
     57//////////////////////////////////////////////////////////////////////////////
     58bncPPPclient* PPP_CLIENT = 0;
     59
     60// Static function returning thread-specific pointer
     61//////////////////////////////////////////////////////////////////////////////
     62bncPPPclient* t_pppClient::instance() {
     63  return PPP_CLIENT;
     64}
     65
    5666// Constructor
    5767////////////////////////////////////////////////////////////////////////////
    58 bncPPPclient::bncPPPclient(QByteArray staID, const t_pppOptions* opt) : bncEphUser(false) {
    59 
    60   _opt     = opt;
    61   _staID   = staID;
    62   _model   = new bncModel(this);
    63   _epoData = new t_epoData();
     68bncPPPclient::bncPPPclient(const t_pppOptions* opt) : bncEphUser(false) {
     69
     70  _opt       = new t_pppOptions(*opt);
     71  _staID     = QByteArray(_opt->_roverName.c_str())
     72  _model     = new bncModel(this);
     73  _epoData   = new t_epoData();
     74  PPP_CLIENT = this;
    6475}
    6576
     
    8293
    8394  delete _model;
     95  delete _epoData;
     96  delete _opt;
    8497}
    8598
     
    231244}
    232245
     246//
     247//////////////////////////////////////////////////////////////////////////////
     248void t_pppClient::putEphemeris(const t_eph* eph) {
     249  const t_ephGPS* ephGPS = dynamic_cast<const t_ephGPS*>(eph);
     250  const t_ephGlo* ephGlo = dynamic_cast<const t_ephGlo*>(eph);
     251  const t_ephGal* ephGal = dynamic_cast<const t_ephGal*>(eph);
     252  if      (ephGPS) {
     253    putNewEph(new t_ephGPS(*ephGPS));
     254  }
     255  else if (ephGlo) {
     256    putNewEph(new t_ephGlo(*ephGlo));
     257  }
     258  else if (ephGal) {
     259    putNewEph(new t_ephGal(*ephGal));
     260  }
     261}
     262
    233263// Satellite Position
    234264////////////////////////////////////////////////////////////////////////////
Note: See TracChangeset for help on using the changeset viewer.