Esempio n. 1
0
 public void SlewToCoordinates(double RightAscension, double Declination)
 {
     //tl.LogMessage("SlewToCoordinates", "Not implemented");
     //throw new ASCOM.MethodNotImplementedException("SlewToCoordinates");
     CheckRange(RightAscension, 0, 24, "SlewToCoordinates", "RightAscension");
     CheckRange(Declination, -90, 90, "SlewToCoordinates", "Declination");
     //CheckParked("SlewToCoordinates");
     //CheckTracking(true, "SlewToCoordinates");
     _TargetRightAscension = RightAscension; // Set the Target RA and Dec prior to the Slew attempt per the ASCOM Telescope specification
     _TargetDeclination    = Declination;
     telescope.SlewToCoordinates(RightAscension, Declination);
     // Block until the slew completes
     while (telescope.Slewing)
     {
         Thread.Sleep(1000);// Allow time for main timer loop to update the axis state
     }
     // Refine the slew
     telescope.SlewToCoordinates(RightAscension, Declination);
     //Block until the slew completes
     while (telescope.Slewing)
     {
         Thread.Sleep(1000); // Allow time for main timer loop to update the axis state
     }
     Thread.Sleep(1000);     // Allow the telescope positions to update
 }