| 1 | /* -------------------------------------------------------------------------
 | 
|---|
| 2 |  * BKG NTRIP Client
 | 
|---|
| 3 |  * -------------------------------------------------------------------------
 | 
|---|
| 4 |  *
 | 
|---|
| 5 |  * Class:      t_pppStation
 | 
|---|
| 6 |  *
 | 
|---|
| 7 |  * Purpose:    Processed station
 | 
|---|
| 8 |  *
 | 
|---|
| 9 |  * Author:     L. Mervart
 | 
|---|
| 10 |  *
 | 
|---|
| 11 |  * Created:    29-Jul-2014
 | 
|---|
| 12 |  *
 | 
|---|
| 13 |  * Changes:    
 | 
|---|
| 14 |  *
 | 
|---|
| 15 |  * -----------------------------------------------------------------------*/
 | 
|---|
| 16 | 
 | 
|---|
| 17 | #include "pppStation.h"
 | 
|---|
| 18 | #include "bncutils.h"
 | 
|---|
| 19 | #include "pppModel.h"
 | 
|---|
| 20 | 
 | 
|---|
| 21 | using namespace BNC_PPP;
 | 
|---|
| 22 | using namespace std;
 | 
|---|
| 23 | 
 | 
|---|
| 24 | // Constructor
 | 
|---|
| 25 | //////////////////////////////////////////////////////////////////////////////
 | 
|---|
| 26 | t_pppStation::t_pppStation() {
 | 
|---|
| 27 |   _windUp   = new t_windUp();
 | 
|---|
| 28 |   _iono     = new t_iono();
 | 
|---|
| 29 |   _dClk = 0.0;
 | 
|---|
| 30 | }
 | 
|---|
| 31 | 
 | 
|---|
| 32 | // Destructor
 | 
|---|
| 33 | //////////////////////////////////////////////////////////////////////////////
 | 
|---|
| 34 | t_pppStation::~t_pppStation() {
 | 
|---|
| 35 |   delete _windUp;
 | 
|---|
| 36 |   delete _iono;
 | 
|---|
| 37 | }
 | 
|---|
| 38 | 
 | 
|---|
| 39 | // 
 | 
|---|
| 40 | //////////////////////////////////////////////////////////////////////////////
 | 
|---|
| 41 | void t_pppStation::setXyzApr(const ColumnVector& xyzApr) {
 | 
|---|
| 42 |   _xyzApr = xyzApr;
 | 
|---|
| 43 |   _ellApr.ReSize(3);
 | 
|---|
| 44 |   xyz2ell(_xyzApr.data(), _ellApr.data());
 | 
|---|
| 45 | }
 | 
|---|
| 46 | 
 | 
|---|
| 47 | // 
 | 
|---|
| 48 | //////////////////////////////////////////////////////////////////////////////
 | 
|---|
| 49 | void t_pppStation::setNeuEcc(const ColumnVector& neuEcc) {
 | 
|---|
| 50 |   _neuEcc = neuEcc;
 | 
|---|
| 51 |   _xyzEcc.ReSize(3);
 | 
|---|
| 52 |   neu2xyz(_ellApr.data(), _neuEcc.data(), _xyzEcc.data());
 | 
|---|
| 53 | }
 | 
|---|
| 54 | 
 | 
|---|
| 55 | // 
 | 
|---|
| 56 | //////////////////////////////////////////////////////////////////////////////
 | 
|---|
| 57 | double t_pppStation::windUp(const bncTime& time, t_prn prn, 
 | 
|---|
| 58 |                          const ColumnVector& rSat) const {
 | 
|---|
| 59 |   return _windUp->value(time, _xyzApr, prn, rSat);
 | 
|---|
| 60 | }
 | 
|---|
| 61 | 
 | 
|---|
| 62 | //
 | 
|---|
| 63 | //////////////////////////////////////////////////////////////////////////////
 | 
|---|
| 64 | double t_pppStation::stec(const t_vTec* vTec, const double signalPropagationTime,
 | 
|---|
| 65 |     const ColumnVector& rSat) const {
 | 
|---|
| 66 |   return _iono->stec(vTec, signalPropagationTime, rSat, _epochTime, _xyzApr);
 | 
|---|
| 67 | }
 | 
|---|