Changeset 985 in ntrip


Ignore:
Timestamp:
Jul 26, 2008, 5:10:32 PM (16 years ago)
Author:
mervart
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNS/bns.cpp

    r984 r985  
    444444  ColumnVector xyz = xx.Rows(1,3);
    445445  if (_crdTrafo) {
    446     crdTrafo(xyz);
     446    crdTrafo(GPSweek, xyz);
    447447  }
    448448
     
    492492// Transform Coordinates IGS -> ETRF
    493493////////////////////////////////////////////////////////////////////////////
    494 void t_bns::crdTrafo(ColumnVector& xyz) {
    495 
    496 
    497 }
     494void t_bns::crdTrafo(int GPSWeek, ColumnVector& xyz) {
     495
     496  ColumnVector dx(3);
     497  dx(1) =  0.054;
     498  dx(2) =  0.051;
     499  dx(3) = -0.048;
     500  const static double arcSec = 180.0 * 3600.0 / M_PI;
     501  const static double ox = 0.000081 / arcSec;
     502  const static double oy = 0.000490 / arcSec;
     503  const static double oz = 0.000792 / arcSec;
     504
     505  Matrix rMat(3,3); rMat = 0.0;
     506  rMat(1,2) = -oz;
     507  rMat(1,3) =  oy;
     508  rMat(2,1) =  oz;
     509  rMat(2,3) = -ox;
     510  rMat(3,1) = -oy;
     511  rMat(3,2) =  ox;
     512
     513  // Current epoch minus 1989.0 in years
     514  // ------------------------------------
     515  double dt = (GPSWeek - 469.0) / 365.2422 * 7.0;
     516
     517  xyz += dx + dt * rMat * xyz;
     518}
Note: See TracChangeset for help on using the changeset viewer.