def _velocity_factor(velocity_units_in, velocity_units_out):
    """helper method for convert_velocity"""
    factor = 1.0
    if velocity_units_in == 'm/s':
        factor /= 0.3048
    elif velocity_units_in == 'ft/s':
        pass
    elif velocity_units_in == 'in/s':
        factor /= 12.0
    elif velocity_units_in == 'knots':
        factor *= 1.68781
    else:
        msg = ('velocity_units_in=%r is not valid; use [ft/s, m/s, knots]' %
            velocity_units_in)
        raise RuntimeError(msg)
    if velocity_units_out == 'm/s':
        factor *= 0.3048
    elif velocity_units_out == 'ft/s':
        pass
    elif velocity_units_out == 'in/s':
        factor *= 12.0
    elif velocity_units_out == 'knots':
        factor /= 1.68781
    else:
        msg = (
            'velocity_units_out=%r is not valid; use [ft/s, m/s, in/s, knots]'
             % velocity_units_out)
        raise RuntimeError(msg)
    return factor
