def getBosch1617Setting(rpm):
    """
    Get bosch 1617 router setting for given rmp.
    """
    minSetting = 1.0
    maxSetting = 6.0
    minSpeed = 8000.0
    maxSpeed = 25000.0
    slope = (maxSetting - minSetting)/(maxSpeed - minSpeed)
    offset = minSetting - slope*minSpeed
    return slope*rpm + offset