933 const double ra = srcra *M_PI/12;
934 const double dec = srcdec*M_PI/180;
935 const double off = woboff*M_PI/180;
936 const double dir = wobang*M_PI/180;
938 const double cosdir = cos(dir);
939 const double sindir = sin(dir);
940 const double cosoff = cos(off);
941 const double sinoff = sin(off);
942 const double cosdec = cos(dec);
943 const double sindec = sin(dec);
947 const array<double, 6> dim = {{ srcra, srcdec, srcra, srcdec, 0, 0 }};
948 fDrive.UpdateSource(dim, name);
950 string command =
"RADEC ";
955 const double sintheta = sindec*cosoff + cosdec*sinoff*cosdir;
959 return T::GetCurrentState();
962 const double costheta = sqrt(1 - sintheta*sintheta);
964 const double cosdeltara = (cosoff - sindec*sintheta)/(cosdec*costheta);
965 const double sindeltara = sindir*sinoff/costheta;
967 const double ndec = asin(sintheta)*180/M_PI;
968 const double nra = (atan2(sindeltara, cosdeltara) + ra)*12/M_PI;
970 const array<double, 6> dim = {{ srcra, srcdec, nra, ndec, woboff, wobang }};
971 fDrive.UpdateSource(dim, name);
973 string command =
"RADEC ";
string AngleToStr(double angle)
int SendCommand(const string &str)