def _parse_coord(coord, coord_dir, positive_sign, negative_sign):
    """
    Convert coordinate to single float value, replacing degree minutes with
    decimal fraction and taking into consideration the direction specified

    :param coord: coordinate string
    :type coord: str
    :param coord_dir: direction
    :param positive_sign: direction when coordinate is positive
    :param negative_sign: direction when coordinate is negative
    :rtype: float
    """
    dot = coord.index('.')
    if coord_dir != positive_sign and coord_dir != negative_sign:
        raise ValueError("Coordinate direction '{}' is neither '{}' nor '{}'"
                         .format(coord_dir, positive_sign, negative_sign))

    sign = 1 if coord_dir == positive_sign else -1
    return sign * (float(coord[:dot - 2]) + float(coord[dot - 2:]) / 60)