def deg_2_decimal(latitude, longitude):
    """Converts degrees minutes and seconds into decimal degrees

    The inputs are strings of the form
    dd-mmH (lat) ddd-mmH (lon)
    where:
    dd is the decimal degrees
    mm is the minutes
    H is the hemisphere N/S/E/W
    """
    assert len(latitude) == 6, 'Latitude is not the expected width of 6'
    assert len(longitude) == 7, 'Longitude is not the expected width of 7'
    latdec = float(latitude[:2]) + float(latitude[-3:-1]) / 60
    if latitude[-1] == 'N':
        pass
    else:
        latdec = latdec * -1
    londec = float(longitude[:3]) + float(longitude[-3:-1]) / 60
    if longitude[-1] == 'E':
        pass
    else:
        londec = londec * -1
    return latdec, londec
