def float_or_dms(s):
    """Convert DMS to float.

    >>> round(float_or_dms('26:45:30'), 5)
    26.75833
    >>> round(float_or_dms('26:0:0.1'), 5)
    26.00003

    :param s: DMS value

    :return: float value
    """
    if s[-1] in ['E', 'W', 'N', 'S']:
        s = s[:-1]
    return sum(float(x) / 60 ** n for (n, x) in enumerate(s.split(':')))