Changeset 9485 in ntrip for trunk/BNC/src/PPP/pppSatObs.cpp


Ignore:
Timestamp:
Jul 20, 2021, 10:41:07 PM (3 years ago)
Author:
stuerze
Message:

minor changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/PPP/pppSatObs.cpp

    r9473 r9485  
    397397  _model._azSat  = atan2(neu[1], neu[0]);
    398398
     399  // Sun unit vector
     400  ColumnVector xSun = t_astro::Sun(_time.mjddec());
     401  xSun /= xSun.norm_Frobenius();
     402
     403  // Satellite unit vectors sz, sy, sx
     404  ColumnVector sz = -rSat / rSat.norm_Frobenius();
     405  ColumnVector sy = crossproduct(sz, xSun);
     406  ColumnVector sx = crossproduct(sy, sz);
     407
     408  sx /= sx.norm_Frobenius();
     409  sy /= sy.norm_Frobenius();
     410
     411  // LOS unit vector satellite --> receiver
     412  ColumnVector rho = rRec - rSat;
     413  rho /= rho.norm_Frobenius();
     414
     415  // LOS vector in satellite frame
     416  ColumnVector u(3);
     417  u(1) = dotproduct(sx, rho);
     418  u(2) = dotproduct(sy, rho);
     419  u(3) = dotproduct(sz, rho);
     420
     421  // Azimuth and elevation in satellite antenna frame
     422  _model._elTx = atan2(u(3),sqrt(pow(u(2),2)+pow(u(1),2)));
     423  _model._azTx = atan2(u(2),u(1));
     424
     425
    399426  // Satellite Clocks
    400427  // ----------------
     
    423450      t_frequency::type frqType = static_cast<t_frequency::type>(ii);
    424451      bool found;
    425       _model._antPCO[ii] = PPP_CLIENT->antex()->rcvCorr(station->antName(), frqType,
    426                                                         _model._eleSat, _model._azSat, found);
     452      QString prn(_prn.toString().c_str());
     453      _model._antPCO[ii]  = PPP_CLIENT->antex()->rcvCorr(station->antName(), frqType, _model._eleSat, _model._azSat, found);
     454      _model._antPCO[ii] += PPP_CLIENT->antex()->satCorr(prn, frqType,  _model._elTx, _model._azTx, found);
     455      if (OPT->_isAPC) {
     456        // the PCOs as given in the satellite antenna correction for all frequencies
     457        // have to be reduced by the PCO of the reference frequency
     458        if      (_prn.system() == 'G') {
     459          _model._antPCO[ii] -= PPP_CLIENT->antex()->satCorr(prn, t_frequency::G1, _model._elTx, _model._azTx, found);
     460        }
     461        else if (_prn.system() == 'R') {
     462          _model._antPCO[ii] -= PPP_CLIENT->antex()->satCorr(prn, t_frequency::R1, _model._elTx, _model._azTx, found);
     463        }
     464        else if (_prn.system() == 'E') {
     465          _model._antPCO[ii] -= PPP_CLIENT->antex()->satCorr(prn, t_frequency::E1, _model._elTx, _model._azTx, found);
     466        }
     467        else if (_prn.system() == 'C') {
     468          _model._antPCO[ii] -= PPP_CLIENT->antex()->satCorr(prn, t_frequency::C2, _model._elTx, _model._azTx, found);
     469        }
     470      }
    427471    }
    428472  }
Note: See TracChangeset for help on using the changeset viewer.