deepracer_offroad_ws/deepracer_offroad_navigation_pkg/deepracer_offroad_navigation_pkg/deepracer_offroad_navigation_node.py [263:277]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        speed_mapping_coefficients = dict()

        # recreate the mapping coefficients for the non-linear equation ax^2 + bx based on
        # the update_speed_scale_value.
        # These coefficents map the [update_speed_scale_value, update_speed_scale_value/2]
        # values to DEFAULT_SPEED_SCALE values [1.0, 0.8].
        speed_mapping_coefficients["a"] = \
            (1.0 / update_speed_scale_value**2) * \
            (2.0 * constants.DEFAULT_SPEED_SCALES[0] - 4.0 * constants.DEFAULT_SPEED_SCALES[1])
        speed_mapping_coefficients["b"] = \
            (1.0 / update_speed_scale_value) * \
            (4.0 * constants.DEFAULT_SPEED_SCALES[1] - constants.DEFAULT_SPEED_SCALES[0])
        return math.copysign(1.0, categorized_throttle) * \
            (speed_mapping_coefficients["a"] * abs(categorized_throttle)**2 +
             speed_mapping_coefficients["b"] * abs(categorized_throttle))
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



deepracer_offroad_ws/webserver_pkg/webserver_pkg/vehicle_control.py [107:121]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    speed_mapping_coefficients = dict()

    # recreate the mapping coefficeints for the non-linear equation ax^2 + bx based on
    # the update_speed_scale_value.
    # These coefficents map the [update_speed_scale_value, update_speed_scale_value/2]
    # values to DEFAULT_SPEED_SCALE values [1.0, 0.8].
    speed_mapping_coefficients["a"] = \
        (1.0 / update_speed_scale_value**2) * \
        (2.0 * constants.DEFAULT_SPEED_SCALES[0] - 4.0 * constants.DEFAULT_SPEED_SCALES[1])
    speed_mapping_coefficients["b"] = \
        (1.0 / update_speed_scale_value) * \
        (4.0 * constants.DEFAULT_SPEED_SCALES[1] - constants.DEFAULT_SPEED_SCALES[0])
    return math.copysign(1.0, categorized_throttle) * \
        (speed_mapping_coefficients["a"] * abs(categorized_throttle)**2 +
         speed_mapping_coefficients["b"] * abs(categorized_throttle))
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



