def get_arm_angles_from_radius_z_coordinate_using_2d_revolute_revolute_inverse_kinematics(self, r, z):

		#eq is a dummy variable for the equation that it represents
		eq = (armSquaredConst - pow(r, 2) - pow(z, 2)) / armDoubledConst

		#the two angles are due to the two possible angles, elbow up or down. I always want elbow up.
		#Not sure which one is elbow up, guessing it's the positive sqrt equation for now. CHECK THIS!
		#note that pi radians = 180 degrees

		# foreArmAngle = math.pi - math.atan2(math.sqrt(1 - pow(eq, 2)), eq)

		#including the angle two
		# foreArmAngleAlternative = math.pi - math.atan2(-1 * math.sqrt(1 - pow(eq,2)), eq )
		# foreArmAngle = foreArmAngleAlternative

		foreArmAngle = math.pi - math.atan2(-1 * math.sqrt(1 - pow(eq,2)), eq )

		#note that the rearArmAngle is dependent on the foreArmAngle. This makes sense.
		# can easily envision that rear arm would be at two different angles if arm is elbow up or down
		rearArmAngle = math.atan2(z,r) - math.atan2( (lengthForeArm * math.sin(foreArmAngle)) , (lengthRearArm + (lengthForeArm * math.cos(foreArmAngle))) )

		return [rearArmAngle, foreArmAngle]

	#input:
	#x,y coordinate
	#output
	#polar coordinate angle to x,y point in radians
dataset/ETHPy150Open maxosprojects/open-dobot/application/fpga/python/DobotInverseKinematics.py/DobotInverseKinematics.get_arm_angles_from_radius_z_coordinate_using_2d_revolute_revolute_inverse_kinematics/original