src/automodelcar/src/Off_ROS_Image_Process/LaneDetection.h
/*
  * Calculates the speed PWM value accordingly to the 
  * steering values.
  */
Calculates the speed PWM value accordingly to the
steering values.
Calculates the speed PWM value accordingly to the steering values .
int CalculateSpeedPWM(
    int current_steering_PWM)
  {
    float tmp;
    int calculated_PWM;
    tmp = 
        abs((SERVO_CENTER - current_steering_PWM) * MULTIPLY_FACTOR);
    calculated_PWM = int(STEERING_SPEED_RATIO * tmp) + MAX_VEL;
    return calculated_PWM;
  }
int CalculateSpeedPWM ( int current_steering_PWM ) { float tmp ; int calculated_PWM ; tmp = abs ( ( SERVO_CENTER - current_steering_PWM ) * MULTIPLY_FACTOR ) ; calculated_PWM = int ( STEERING_SPEED_RATIO * tmp ) + MAX_VEL ; return calculated_PWM ; }
Calculates the speed PWM value accordingly to the
 steering values.
Calculates the speed PWM value accordingly to the steering values .
// Calculate the PWM speed value (lineal function) 