diff --git a/robot/Robot.js b/robot/Robot.js index b9ec9e2..db8eb68 100755 --- a/robot/Robot.js +++ b/robot/Robot.js @@ -131,7 +131,13 @@ class Robot{ } calculatePositionFromMotorAngles(){ - + + // Hier kommt generierter Code! Das ist höchst Fraglich !! + this.x = this.xMotor - this.l3*Math.sin(this.theta)*Math.cos(this.phi); + this.y = this.l1*Math.cos(this.alpha) + this.l2*Math.cos(this.beta) - this.l3*Math.sin(this.theta)*Math.sin(this.phi); + this.z = this.l1*Math.sin(this.alpha) + this.l2*Math.sin(this.beta) - this.l3*Math.cos(this.theta); + // Das war der generierte Code + } sendCommand(){