import math


def average_headings_degrees(h_list):
    """ Averages a list of headings """
    x = sum([math.sin(math.radians(h)) for h in h_list])
    y = sum([math.cos(math.radians(h)) for h in h_list])
    return math.degrees(math.atan2(x, y)) % 360