daily pastebin goal
87%
SHARE
TWEET

Untitled

a guest Jun 19th, 2018 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void ConvertDegreesToMotorMoveExecute() //  added x1s
  2.     {
  3.         double y1 = 0, y2 = 0, x1 = 0;
  4.         _Align.ConvertDegreesOfRotationToMotorMovement(DegreesToRotate, ref y1, ref y2, ref x1);
  5.  
  6.         RotateY1 = y1;
  7.         RotateY2 = y2;
  8.         RotateX1 = x1;
  9.     }
  10.    
  11. [ComVisible(true)]
  12.     public void ConvertDegreesOfRotationToMotorMovement(double degrees, ref double Y1, ref double Y2, ref double X1)
  13.     {
  14.         double Radians = (degrees * Math.PI) / 180;
  15.         var config = new Configuration();
  16.         Y1 = config.YMotorRailDistance * Math.Sin(Radians) / (2 * Math.Sin((Math.PI / 2) + config.Beta + config.Gamma - Radians) * Math.Cos(config.Beta + config.Gamma));          
  17.         Y2 = Y1 * -1;
  18.         X1 = config.XMotorRotationMove(degrees);
  19.  
  20.         LogFileWriter.WriteToLogFile("Alignment.ConvertDegreesOfRotationToMotorMovement(" + degrees.ToString() + ", " + Y1.ToString() + ", " + Y2.ToString() + " , "+  X1.ToString() + ";");
  21.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top