From 3ce269e4e9555a00158abf3c2b71c75dbf605139 Mon Sep 17 00:00:00 2001 From: ChK Date: Sun, 15 Mar 2026 21:44:25 +0100 Subject: [PATCH] calculatePositionFromMotorAngles started --- robot/Robot.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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(){