Changeset 2988 in ntrip


Ignore:
Timestamp:
Feb 8, 2011, 5:08:02 PM (13 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncutils.cpp

    r2582 r2988  
    191191}
    192192
     193// Transformation xyz --> radial, along track, out-of-plane
     194////////////////////////////////////////////////////////////////////////////
     195void XYZ_to_RSW(const ColumnVector& rr, const ColumnVector& vv,
     196                const ColumnVector& xyz, ColumnVector& rsw) {
     197
     198  ColumnVector along  = vv / vv.norm_Frobenius();
     199  ColumnVector cross  = crossproduct(rr, vv); cross /= cross.norm_Frobenius();
     200  ColumnVector radial = crossproduct(along, cross);
     201
     202  rsw.ReSize(3);
     203  rsw(1) = DotProduct(xyz, radial);
     204  rsw(2) = DotProduct(xyz, along);
     205  rsw(3) = DotProduct(xyz, cross);
     206}
     207
    193208// Rectangular Coordinates -> Ellipsoidal Coordinates
    194209////////////////////////////////////////////////////////////////////////////
  • trunk/BNC/bncutils.h

    r2582 r2988  
    4747                const ColumnVector& rsw, ColumnVector& xyz);
    4848
     49void XYZ_to_RSW(const ColumnVector& rr, const ColumnVector& vv,
     50                const ColumnVector& xyz, ColumnVector& rsw);
     51
    4952t_irc xyz2ell(const double* XYZ, double* Ell);
    5053
  • trunk/BNC/combination/bnccomb.cpp

    r2987 r2988  
    2323#include "bncsettings.h"
    2424#include "bncmodel.h"
     25#include "bncutils.h"
    2526
    2627using namespace std;
     
    344345  prevEph->position(newCorr->tt.gpsw(), newCorr->tt.gpssec(),
    345346                    oldXC.data(), oldVV.data());
     347
    346348  ColumnVector newXC(4);
    347349  ColumnVector newVV(3);
    348350  lastEph->position(newCorr->tt.gpsw(), newCorr->tt.gpssec(),
    349351                    newXC.data(), newVV.data());
     352
     353  ColumnVector dX = newXC.Rows(1,3) - oldXC.Rows(1,3);
     354  ColumnVector dRAO(3);
     355  XYZ_to_RSW(newXC.Rows(1,3), newVV, dX, dRAO);
    350356}
    351357
Note: See TracChangeset for help on using the changeset viewer.