Changeset 899 in ntrip for trunk/BNS


Ignore:
Timestamp:
May 9, 2008, 7:53:11 AM (17 years ago)
Author:
mervart
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNS/bnseph.cpp

    r898 r899  
    349349                        ColumnVector& vv) const {
    350350
    351   const static double secPerWeek = 7 * 86400.0;
     351  const static double secPerWeek  = 7 * 86400.0;
     352  const static double nominalStep = 10.0;
    352353
    353354  double dtPos = GPSweeks - _tt;
     
    356357  }
    357358
     359  int nSteps  = int(fabs(dtPos) / nominalStep) + 1;
     360  double step = dtPos / nSteps;
     361
    358362  cout << _prn.toAscii().data() << "   "
    359363       << GPSweek  << " " << _GPSweek << "   "
    360364       << GPSweeks << " " <<  _GPSweeks << " " << _tt << "    "
    361        << dtPos << endl;
    362 
    363   const static double maxStep = 10.0;
    364 
    365   double tt = 0.0;
    366   while (fabs(tt) < fabs(dtPos)) {
    367     double step = dtPos > 0.0 ?  maxStep : -maxStep;
    368     if (fabs(tt + step) > fabs(dtPos)) {
    369       step = dtPos - tt;
    370     }
    371     _xv = rungeKutta4(tt, _xv, step, glo_deriv);
    372     tt += step;
    373   }
    374 
    375   // Next Time Start Integration from Current Epoch
    376   // ----------------------------------------------
    377   _tt += dtPos;
     365       << dtPos << " " << nSteps << " " << " " << step << endl;
     366
     367  for (int ii = 1; ii <= nSteps; ii++) {
     368    _tt += step;
     369    _xv = rungeKutta4(_tt, _xv, step, glo_deriv);
     370  }
    378371
    379372  // Position and Velocity
Note: See TracChangeset for help on using the changeset viewer.