rover/robot.py
def calculateTargetDeg(self,radius):
		'''
		Takes a turning radius and calculates what angle [degrees] each corner should be at

		:param int radius: Radius drive command, ranges from -100 (turning left) to 100 (turning right)

		'''
		#Scaled from 250 to 20 inches. For more information on these numbers look at the Software Controls.pdf
		if radius == 0: r = 250
		elif -100 <= radius <= 100: r = 220 - abs(radius)*(250/100)
		else: r = 250
		
		if r == 250: return [0]*4

		ang1 = int(math.degrees(math.atan(self.d1/(abs(r)+self.d3))))
		ang2 = int(math.degrees(math.atan(self.d2/(abs(r)+self.d3))))
		ang3 = int(math.degrees(math.atan(self.d2/(abs(r)-self.d3))))
		ang4 = int(math.degrees(math.atan(self.d1/(abs(r)-self.d3))))

		if radius > 0: return [ang2,-ang1,-ang4,ang3]
		else: return [-ang4,ang3,ang2,-ang1]

		Takes a turning radius and calculates what angle [degrees] each corner should be at

		:param int radius: Radius drive command, ranges from -100 (turning left) to 100 (turning right)

		
Takes a turning radius and calculates what angle [degrees] each corner should be at
Takes a turning radius and calculates what angle [ degrees ] each corner should be at
def calculateTargetDeg(self,radius):
		if radius == 0: r = 250
		elif -100 <= radius <= 100: r = 220 - abs(radius)*(250/100)
		else: r = 250
		if r == 250: return [0]*4
		ang1 = int(math.degrees(math.atan(self.d1/(abs(r)+self.d3))))
		ang2 = int(math.degrees(math.atan(self.d2/(abs(r)+self.d3))))
		ang3 = int(math.degrees(math.atan(self.d2/(abs(r)-self.d3))))
		ang4 = int(math.degrees(math.atan(self.d1/(abs(r)-self.d3))))
		if radius > 0: return [ang2,-ang1,-ang4,ang3]
		else: return [-ang4,ang3,ang2,-ang1]
def calculateTargetDeg ( self , radius ) : if radius == 0 : r = 250 elif - 100 <= radius <= 100 : r = 220 - abs ( radius ) * ( 250 / 100 ) else : r = 250 if r == 250 : return [ 0 ] * 4 ang1 = int ( math . degrees ( math . atan ( self . d1 / ( abs ( r ) + self . d3 ) ) ) ) ang2 = int ( math . degrees ( math . atan ( self . d2 / ( abs ( r ) + self . d3 ) ) ) ) ang3 = int ( math . degrees ( math . atan ( self . d2 / ( abs ( r ) - self . d3 ) ) ) ) ang4 = int ( math . degrees ( math . atan ( self . d1 / ( abs ( r ) - self . d3 ) ) ) ) if radius > 0 : return [ ang2 , - ang1 , - ang4 , ang3 ] else : return [ - ang4 , ang3 , ang2 , - ang1 ]
Takes a turning radius and calculates what angle [degrees] each corner should be at
Takes a turning radius and calculates what angle [ degrees ] each corner should be at
'''
		Takes a turning radius and calculates what angle [degrees] each corner should be at

		:param int radius: Radius drive command, ranges from -100 (turning left) to 100 (turning right)

		''' #Scaled from 250 to 20 inches. For more information on these numbers look at the Software Controls.pdf
self
radius
Radius drive command, ranges from -100 (turning left) to 100 (turning right)
Radius drive command ranges from - 100 ( turning left ) to 100 ( turning right )