ELASTICPATHING/SOURCECODE/UbiComp2014/Elastic_Pathing_Code/path_decisions.rb
def safeTurnRadius(speed)
  #Any turn can be taken at slow speeds
  if (speed < 10.0)
    return 0;
  elsif (speed > 80)
    #For now we'll assume that speeds are capped at 85mph
    speed = 85;
  end

  map_speed = ((speed / 5).to_i)*5
  friction = DRY_SIDE_FRICTION[map_speed]

  #From Roess et al
  speed**2 / (15 * (0.01 * DEFAULT_ELEVATION + friction))
end
#Return the minimum turn radius for a dry road with slight incline
#at the given speed
Return the minimum turn radius for a dry road with slight incline
at the given speed
Return the minimum turn radius for a dry road with slight incline at the given speed
def safeTurnRadius(speed)
  if (speed < 10.0)
    return 0;
  elsif (speed > 80)
    speed = 85;
  end
  map_speed = ((speed / 5).to_i)*5
  friction = DRY_SIDE_FRICTION[map_speed]
  speed**2 / (15 * (0.01 * DEFAULT_ELEVATION + friction))
end
def safeTurnRadius ( speed ) if ( speed < 10.0 ) return 0 ; elsif ( speed > 80 ) speed = 85 ; end map_speed = ( ( speed / 5 ) . to_i ) * 5 friction = DRY_SIDE_FRICTION [ map_speed ] speed ** 2 / ( 15 * ( 0.01 * DEFAULT_ELEVATION + friction ) ) end
Return the minimum turn radius for a dry road with slight incline
at the given speed
Return the minimum turn radius for a dry road with slight incline at the given speed
#Any turn can be taken at slow speeds #For now we'll assume that speeds are capped at 85mph #From Roess et al
speed