FACT++  1.0
template<class T , class S >
int StateMachineDrive< T, S >::InitMovement ( const ZdAz sky,
bool  tracking = false,
const string &  name = "" 
)
inlineprivate

Definition at line 1886 of file drivectrl.cc.

References Source::dec, Drive::State::kMoving, Source::name, PointingSetup::orbit_period, Source::ra, PointingModel::SkyToMount(), PointingSetup::source, PointingSetup::start, PointingSetup::wobble_angle, and PointingSetup::wobble_offset.

1887  {
1889 
1890  // Check whether bending is valid!
1891  if (!CheckRange(sky*(180/M_PI)))
1892  return StopMovement();
1893 
1894  fStep = 0;
1895  fIsTracking = tracking;
1896 
1897  fDrive.SetRpmMode(false); // *NEW* (Stop a previous tracking to avoid the pointing command to be ignored)
1898  fDrive.SetAcceleration(fAccPointing);
1899 
1900  if (!tracking)
1901  fDrive.UpdateSource(Time(), name, false);
1902  else
1903  {
1904  const array<double, 5> dim =
1905  {{
1908  fPointingSetup.wobble_offset * 180/M_PI,
1909  fPointingSetup.wobble_angle * 180/M_PI,
1911  }};
1912  fDrive.UpdateSource(fPointingSetup.start, dim, fPointingSetup.source.name);
1913  }
1914 
1915  return State::kMoving;
1916  }
string name
Definition: drivectrl.cc:123
Acceleration fAccPointing
Definition: drivectrl.cc:1880
PointingSetup fPointingSetup
Definition: drivectrl.cc:1579
Adds some functionality to boost::posix_time::ptime for our needs.
Definition: Time.h:30
Encoder fMovementTarget
Definition: drivectrl.cc:1580
double start
Definition: drivectrl.cc:153
double wobble_angle
Definition: drivectrl.cc:156
double dec
Definition: drivectrl.cc:125
Source source
Definition: drivectrl.cc:151
double ra
Definition: drivectrl.cc:124
double wobble_offset
Definition: drivectrl.cc:155
PointingModel fPointingModel
Definition: drivectrl.cc:1578
Encoder SkyToMount(AltAz p)
Definition: drivectrl.cc:271
bool CheckRange(ZdAz pos)
Definition: drivectrl.cc:1786
double orbit_period
Definition: drivectrl.cc:154

+ Here is the call graph for this function: