import math


def calculate_fov(zoom, height=1.0):
    """Calculates the required FOV to set the
    view frustrum to have a view with the specified height
    at the specified distance.

    :param float zoom: The distance to calculate the FOV for.
    :param float height: The desired view height at the specified
        distance.
        The default is 1.0.
    :rtype: A float representing the FOV to use in degrees.
    """
    # http://www.glprogramming.com/red/chapter03.html
    rad_theta = 2.0 * math.atan2(height / 2.0, zoom)
    return math.degrees(rad_theta)