Definition at line 2415 of file drivectrl.cc.
References Local::az, data, dev, Error(), Drive::State::kAllowedRangeExceeded, Drive::State::kOnTrack, Drive::State::kTracking, Time::Mjd(), PointingData::mount, PointingData::sky, str, and Local::zd.
Referenced by StateMachineDrive< T, S >::Execute().
2417 if (error==ba::error::basic_errors::operation_aborted)
2423 str <<
"TrackingLoop: " << error.message() <<
" (" << error <<
")";
2440 fTrackingLoop.expires_from_now(boost::posix_time::milliseconds(250));
2442 const double mjd =
Time().
Mjd();
2453 const Encoder dest0 = data0.mount*(1./360);
2467 const Encoder dist = dest1 - dest0;
2471 const Velocity vt = vel - dev/(1./60);
2473 if (
fDrive.GetVerbosity()>1)
2475 T::Out() <<
"Ideal position [deg] " << dest.
zd *360 <<
" " << dest.az *360 << endl;
2476 T::Out() <<
"Encoder pos. [deg] " << sepos.
zd*360 <<
" " << sepos.
az*360 << endl;
2477 T::Out() <<
"Deviation [arcmin] " << dev.
zd *360*60 <<
" " << dev.
az *360*60 << endl;
2478 T::Out() <<
"Distance 1s [arcmin] " << dist.
zd *360*60 <<
" " << dist.
az *360*60 << endl;
2479 T::Out() <<
"Velocity 1s [rpm] " << vt.
zd <<
" " << vt.
az << endl;
2480 T::Out() <<
"Delta T (enc) [ms] " << fabs(mjd-
fDrive.fPdoTime2[0].Mjd())*24*3600*1000 << endl;
2481 T::Out() <<
"Delta T (now) [ms] " << (
Time().
Mjd()-mjd)*24*3600*1000 << endl;
2494 fDrive.SetTrackingVelocity(vt);
2497 this, ba::placeholders::error));
ba::deadline_timer fTrackingLoop
Adds some functionality to boost::posix_time::ptime for our needs.
PointingData CalcPointingPos(double mjd)
void TrackingLoop(const boost::system::error_code &error=boost::system::error_code())
Return to feeserver c CVS log Up to[MAIN] dcscvs FeeServer feeserver src Wed FeeServer_v0 v0 dev
bool CheckRange(ZdAz pos)