Changeset 2046 in ntrip for trunk/BNS/bns.cpp


Ignore:
Timestamp:
Nov 28, 2009, 3:37:03 PM (14 years ago)
Author:
mervart
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNS/bns.cpp

    r2045 r2046  
    404404
    405405          QString      prn;
    406           ColumnVector xx(6); xx = 0.0;
     406          ColumnVector xx(8); xx = 0.0;
    407407          t_eph*       ep = 0;
    408408     
     
    412412            prns << prn;
    413413            if ( _ephList.contains(prn) ) {
    414               in >> xx(1) >> xx(2) >> xx(3) >> xx(4) >> xx(5) >> xx(6);
    415               xx(1) *= 1e3;
    416               xx(2) *= 1e3;
    417               xx(3) *= 1e3;
    418               xx(4) *= 1e-6;
    419               xx(5) *= 1e-6;
     414              in >> xx(1) >> xx(2) >> xx(3) >> xx(4) >> xx(5)
     415                 >> xx(6) >> xx(7) >> xx(8);
     416              xx(1) *= 1e3;     // x-crd
     417              xx(2) *= 1e3;     // y-crd
     418              xx(3) *= 1e3;     // z-crd
     419              xx(4) *= 1e-6;    // clk
     420              xx(5) *= 1e-6;    // rel. corr.
     421                                // xx(6), xx(7), xx(8) ... PhaseCent - CoM
    420422
    421423              t_ephPair* pair = _ephList[prn];
     
    452454              QString outLine;
    453455              processSatellite(oldEph, ic, _caster.at(ic)->crdTrafo(),
    454                                _caster.at(ic)->beClocks(), ep,
     456                               _caster.at(ic)->CoM(), ep,
    455457                               GPSweek, GPSweeks, prn, xx, sd, outLine);
    456458              _caster.at(ic)->printAscii(outLine);
     
    478480////////////////////////////////////////////////////////////////////////////
    479481void t_bns::processSatellite(int oldEph, int iCaster, const QString trafo,
    480                              bool beClocks, t_eph* ep, int GPSweek,
     482                             bool CoM, t_eph* ep, int GPSweek,
    481483                             double GPSweeks, const QString& prn,
    482484                             const ColumnVector& xx,
     
    490492
    491493  ColumnVector xyz = xx.Rows(1,3);
     494
     495  // Correction Center of Mass -> Antenna Phase Center
     496  // -------------------------------------------------
     497  if (! CoM) {
     498    xyz(1) += xx(6);
     499    xyz(2) += xx(7);
     500    xyz(3) += xx(8);
     501  }
     502
    492503  if (trafo != "IGS05") {
    493504    crdTrafo(GPSweek, xyz, trafo);
     
    499510  XYZ_to_RSW(xB.Rows(1,3), vv, dx, rsw);
    500511
    501   double dClk;
    502   if (beClocks) {
    503     dClk = (xx(4) - xB(4) - xx(5)) * 299792458.0;
    504   }
    505   else {
    506     dClk = (xx(4) - xB(4)) * 299792458.0;
    507   }
    508 
    509   double antCorr = xx(6);
     512  double dClk = (xx(4) - xB(4)) * 299792458.0;
     513
    510514
    511515  if (sd) {
     
    519523
    520524  char oldCh = (oldEph ? '!' : ' ');
    521   outLine.sprintf("%c %d %.1f %s  %3d  %10.3f  %8.3f %8.3f %8.3f %8.3f\n",
     525  outLine.sprintf("%c %d %.1f %s  %3d  %10.3f  %8.3f %8.3f %8.3f\n",
    522526                  oldCh, GPSweek, GPSweeks, ep->prn().toAscii().data(),
    523                   ep->IOD(), dClk, rsw(1), rsw(2), rsw(3), antCorr);
     527                  ep->IOD(), dClk, rsw(1), rsw(2), rsw(3));
    524528
    525529  if (!oldEph && iCaster == 0) {
Note: See TracChangeset for help on using the changeset viewer.