Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void ConvertDegreesToMotorMoveExecute() // added x1s
- {
- double y1 = 0, y2 = 0, x1 = 0;
- _Align.ConvertDegreesOfRotationToMotorMovement(DegreesToRotate, ref y1, ref y2, ref x1);
- RotateY1 = y1;
- RotateY2 = y2;
- RotateX1 = x1;
- }
- [ComVisible(true)]
- public void ConvertDegreesOfRotationToMotorMovement(double degrees, ref double Y1, ref double Y2, ref double X1)
- {
- double Radians = (degrees * Math.PI) / 180;
- var config = new Configuration();
- Y1 = config.YMotorRailDistance * Math.Sin(Radians) / (2 * Math.Sin((Math.PI / 2) + config.Beta + config.Gamma - Radians) * Math.Cos(config.Beta + config.Gamma));
- Y2 = Y1 * -1;
- X1 = config.XMotorRotationMove(degrees);
- LogFileWriter.WriteToLogFile("Alignment.ConvertDegreesOfRotationToMotorMovement(" + degrees.ToString() + ", " + Y1.ToString() + ", " + Y2.ToString() + " , "+ X1.ToString() + ";");
- }
Add Comment
Please, Sign In to add comment