Changeset 2043 in ntrip


Ignore:
Timestamp:
Nov 26, 2009, 4:06:08 PM (14 years ago)
Author:
mervart
Message:

* empty log message *

Location:
trunk/BNC
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncpppclient.cpp

    r2042 r2043  
    4343
    4444#include "bncpppclient.h"
     45#include "bncutils.h"
    4546
    4647extern "C" {
     
    154155      }
    155156      cc->tt.set(GPSweek, GPSweeks);
     157      cc->rao.ReSize(3);
    156158      in >> cc->iod >> cc->dClk >> cc->rao[0] >> cc->rao[1] >> cc->rao[2];
    157159    }
     
    190192void bncPPPclient::applyCorr(const t_corr* cc, ColumnVector& xc,
    191193                             ColumnVector& vv) {
     194  ColumnVector dx(3);
     195  RSW_to_XYZ(xc.Rows(1,3), vv, cc->rao, dx);
     196
    192197
    193198}
  • trunk/BNC/bncutils.cpp

    r1942 r2043  
    168168  return gga.toAscii();
    169169}
     170
     171//
     172////////////////////////////////////////////////////////////////////////////
     173void RSW_to_XYZ(const ColumnVector& rr, const ColumnVector& vv,
     174                const ColumnVector& rsw, ColumnVector& xyz) {
     175
     176  ColumnVector along  = vv / vv.norm_Frobenius();
     177  ColumnVector cross  = crossproduct(rr, vv); cross /= cross.norm_Frobenius();
     178  ColumnVector radial = crossproduct(along, cross);
     179
     180  Matrix RR(3,3);
     181  RR.Column(1) = radial;
     182  RR.Column(2) = along;
     183  RR.Column(3) = cross;
     184
     185  xyz = RR * rsw;
     186}
  • trunk/BNC/bncutils.h

    r1595 r2043  
    2929#include <QDateTime>
    3030
     31#include <newmat.h>
     32
    3133void expandEnvVar(QString& str);
    3234
     
    4143                     const QByteArray& height);
    4244
     45void RSW_to_XYZ(const ColumnVector& rr, const ColumnVector& vv,
     46                const ColumnVector& rsw, ColumnVector& xyz);
     47
    4348#endif
Note: See TracChangeset for help on using the changeset viewer.