def define_pose(relation, balloon_middle, balloon_size, balloon_width):
    """
    Calculating the estimated position of thhe ballon and best attack angle

    Parameters
    ----------
    relation: str
        relation of balloon and robot
    
    ballon parameters

    Returns
    -------
    tuple
        With turn degree, distance and optimal attack angle

    """
    if relation is "back":
        turn_degree = 48 - balloon_middle * 96
        angle = 0
    elif relation is "to the right":
        turn_degree = 48 - balloon_middle * 96 - 5
        angle = 270
    elif relation is "to the left":
        turn_degree = 48 - balloon_middle * 96 + 5
        angle = 90
    else:
        # Robot is in front of the balloon
        turn_degree = 48 - balloon_middle * 96
        angle = 180

    distance = balloon_size / (2 * balloon_width * 0.466307658155)
    return turn_degree, distance, angle