ELASTICPATHING/SOURCECODE/UbiComp2014/Elastic_Pathing_Code/navigator.rb
#Find the node closest to the given latitude and longitude
Find the node closest to the given latitude and longitude
Find the node closest to the given latitude and longitude
def closest(lat, lon, bound)
    closest = 0
    close_dist = 100.0
    close_id = @nodes.get_nearest_arr(lat,lon)[0][0]
    return Node.new(close_id, @nodes.get_lat(close_id), @nodes.get_lon(close_id))
  end
def closest ( lat , lon , bound ) closest = 0 close_dist = 100.0 close_id = @nodes . get_nearest_arr ( lat , lon ) [ 0 ] [ 0 ] return Node . new ( close_id , @nodes . get_lat ( close_id ) , @nodes . get_lon ( close_id ) ) end
Find the node closest to the given latitude and longitude
Find the node closest to the given latitude and longitude
#No tolerance here...guess it's a global variable somewhere?
lat
lon
bound