Changeset 3055 in ntrip


Ignore:
Timestamp:
Feb 25, 2011, 4:55:53 PM (13 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncantex.cpp

    r3052 r3055  
    4343
    4444#include "bncantex.h"
     45#include "bnctides.h"
    4546
    4647using namespace std;
     
    209210// Satellite Antenna Offset
    210211////////////////////////////////////////////////////////////////////////////
    211 t_irc bncAntex::offset(const QString& prn, ColumnVector& neu) {
     212t_irc bncAntex::satCoMcorrection(const QString& prn, double Mjd,
     213                                 const ColumnVector& xSat, ColumnVector& dx) {
     214
    212215  QMap<QString, t_antMap*>::const_iterator it = _maps.find(prn);
    213216  if (it != _maps.end()) {
    214217    t_antMap* map = it.value();
    215     neu[0] = map->frqMapL1->neu[0];
    216     neu[1] = map->frqMapL1->neu[1];
    217     neu[2] = map->frqMapL1->neu[2];
     218    double* neu = map->frqMapL1->neu;
     219
     220    // Unit Vectors sz, sy, sx
     221    // -----------------------
     222    ColumnVector sz = -xSat;
     223    sz /= sqrt(DotProduct(sz,sz));
     224
     225    ColumnVector xSun = Sun(Mjd);
     226    xSun /= sqrt(DotProduct(xSun,xSun));
     227 
     228    ColumnVector sy = crossproduct(sz, xSun);
     229    sy /= sqrt(DotProduct(sy,sy));
     230 
     231    ColumnVector sx = crossproduct(sy, sz);
     232
     233    dx[0] = sx[0] * neu[0] + sy[0] * neu[1] + sz[0] * neu[2];
     234    dx[1] = sx[1] * neu[0] + sy[1] * neu[1] + sz[1] * neu[2];
     235    dx[2] = sx[2] * neu[0] + sy[2] * neu[1] + sz[2] * neu[2];
     236
    218237    return success;
    219238  }
  • trunk/BNC/bncantex.h

    r3052 r3055  
    3838  void print() const;
    3939  double pco(const QString& antName, double eleSat, bool& found);
    40   t_irc  offset(const QString& prn, ColumnVector& neu);
     40  t_irc  satCoMcorrection(const QString& prn, double Mjd,
     41                          const ColumnVector& xSat, ColumnVector& dx);
    4142
    4243 private:
  • trunk/BNC/combination/bnccomb.cpp

    r3054 r3055  
    2727#include "bnssp3.h"
    2828#include "bncantex.h"
     29#include "bnctides.h"
    2930
    3031using namespace std;
     
    389390      // -------------------------------
    390391      if (_antex) {
    391         ColumnVector neu(3);
    392         if (_antex->offset(corr->prn, neu) == success) {
    393           ColumnVector dx;
    394           RSW_to_XYZ(xc.Rows(1,3), vv, neu, dx);
    395           xc(1) += dx(1);
    396           xc(2) += dx(2);
    397           xc(3) += dx(3);
     392        ColumnVector dx(3); dx = 0.0;
     393        double Mjd = resTime.mjd() + resTime.daysec()/86400.0;
     394        if (_antex->satCoMcorrection(corr->prn, Mjd, xc.Rows(1,3), dx) == success) {
     395          xc(1) -= dx(1);
     396          xc(2) -= dx(2);
     397          xc(3) -= dx(3);
    398398        }
    399399        else {
Note: See TracChangeset for help on using the changeset viewer.