def convert_cartesian_coordinate_to_arm_angles(self, x, y, z):

		# do a general check to see if even a maximally stretched arm could reach the point
		# if it can't, return some dummy angle numbers of -999
		# note the base height correction in z
		distanceFromOriginToEndPoint = self.get_distance_from_origin_to_cartesian_point_3D(x, y, heightFromBase - z)
		self._debug('distanceFromOriginToEndPoint', str(distanceFromOriginToEndPoint))
		if (distanceFromOriginToEndPoint > (lengthRearArm + lengthForeArm)):
			return [-999,-999,-999]

		baseAngle = self.get_polar_coordinate_angle_from_cartesian_x_y_coordinate(x, y)
		radiusToEndPoint = self.get_polar_coordinate_radius_from_cartesian_x_y_coordinate(x, y)
		#note the correction for base height
		armAngles = self.get_arm_angles_from_radius_z_coordinate_using_2d_revolute_revolute_inverse_kinematics(radiusToEndPoint, z - heightFromBase)
		rearArmAngle = armAngles[0]
		foreArmAngle = armAngles[1]

		return [baseAngle, rearArmAngle, foreArmAngle]
dataset/ETHPy150Open maxosprojects/open-dobot/application/fpga/python/DobotInverseKinematics.py/DobotInverseKinematics.convert_cartesian_coordinate_to_arm_angles/swapped operands of `-`