import csv


def get_distance_data(distance_factor_file):
    """
    Get the distance data based on distance factor file
    :param distance_factor_file: path to distance factor file
    :return: a dict containing the distance date
    """
    distance_data = {}
    with open(distance_factor_file, "r") as csv_distance:
        dict_data = csv.DictReader(csv_distance, delimiter=';')
        for i in dict_data:
            distance_data[i['board']] = 400.0 / (
                (float(i['distances']) / 100 + 20) * (float(i['distances']) / 100 + 20))
    return distance_data