import math


def calc_delta_angle(px, py):
    """Calculate the angle between the vertical and the force line of action.

    Args:
        px (float): Applied horizontal force component
        py (float): Applied vertical force component

    Returns:
        delta_angle (float): angle between vertical and the line of action of
                             the force
    """
    try:
        delta_angle = -1*math.atan(px/py)
    except:
        delta_angle = math.pi/2

    return delta_angle