delta and gamma behave now like seperate motors
This commit is contained in:
@@ -215,22 +215,12 @@ class RobotBernina(RobotTCP):
|
||||
rz = math.asin(-math.sin(ry)*math.sin(rx)*math.sqrt(1/(math.cos(rx)**2+(math.sin(ry)*math.sin(rx))**2)))
|
||||
rx, ry, rz = self.rad2deg([rx, ry, rz])
|
||||
#end new try
|
||||
|
||||
#Necessary for delta or gamma larger 90
|
||||
if self.rad2deg(delta) > 90:
|
||||
rz = 180-rz
|
||||
print rz
|
||||
#Necessary to keep detector orientation for gamma larger 90
|
||||
if self.rad2deg(gamma) > 90:
|
||||
rz = 180-rz
|
||||
|
||||
# New try: first gamme
|
||||
#ry = gamma
|
||||
#rx = -math.acos(math.cos(delta)*math.cos(gamma)/math.cos(ry))
|
||||
#rz = -math.asin(-math.sin(-math.sin(ry)*math.sin(rx)*math.sqrt(1/(math.cos(rx)**2+(math.sin(ry)*math.sin(rx))**2))))
|
||||
#rx, ry, rz = self.rad2deg([rx, ry, rz])
|
||||
# End new try
|
||||
|
||||
#rz = -math.asin(-math.sin(-math.sin(gamma)*math.sin(-delta)*math.sqrt(1/(math.cos(-delta)**2+(math.sin(gamma)*math.sin(-delta))**2))))
|
||||
#rx, ry, rz = self.rad2deg([-delta,+gamma, rz])
|
||||
if self.rad2deg(delta) > 90:
|
||||
rz = -rz
|
||||
if abs(rz//180) > 0:
|
||||
rz = rz - (rz+180)//360*360
|
||||
|
||||
|
||||
Reference in New Issue
Block a user