#!/usr/bin/ruby -Ks if ARGV.size < 1 then puts "Usage: #{__FILE__} Crossbow_NAV_file" exit end previous_lat = 0 previous_long = 0 open(ARGV[0]).each_with_index{|line, i| if i < 8 then next end values = line.split(/\t/) lat, long = values[11], values[10] if previous_lat == lat and previous_long == long then next end puts " [#{previous_long = long},#{previous_lat = lat}]," }