Sha256: cf48d81cb59f1c43613e6064b24400b7111e11a69419782f5e2c91b0c62bf4e7

Contents?: true

Size: 1001 Bytes

Versions: 53

Compression:

Stored size: 1001 Bytes

Contents

#!/usr/bin/env ruby

# useful if being run inside a source code checkout
$: << 'lib'
$: << '../lib'

require 'date'
require 'geoptima'

$debug=false

$events={}
$files = []

$events={}

while arg=ARGV.shift:
  if arg =~ /^\-(\w+)/
    $1.split(//).each do |aa|
      case aa
      when 'd'
        $debug=true
      else
        puts "Unrecognized option: -#{aa}"
      end
    end
  else
    if File.exist? arg
      $files << arg
    else
      puts "No such file: #{arg}"
    end
  end
end

$datasets = Geoptima::Dataset.make_datasets($files, :locate => true)

puts "Found #{$datasets.length} IMEIs"
$datasets.keys.sort.each do |imei|
  dataset = $datasets[imei]
  events = dataset.sorted('mode')
  puts "\nFor #{imei} found #{dataset.length} events:\n"
  if events && events.length>0
    puts "Time\tLat\tLon\t#{events.first.header[1..-1].join("\t")}"
    events.each do |event|
      puts "#{event.time}\t#{event.latitude}\t#{event.longitude}\t#{event.data[1..-1].join("\t")}"
    end
  end
end

Version data entries

53 entries across 29 versions & 1 rubygems

Version Path
geoptima-0.1.22 examples/show_geoptima_sos.rb
geoptima-0.1.22 bin/show_geoptima_sos
geoptima-0.1.21 examples/show_geoptima_sos.rb
geoptima-0.1.21 bin/show_geoptima_sos
geoptima-0.1.20 bin/show_geoptima_sos
geoptima-0.1.20 examples/show_geoptima_sos.rb
geoptima-0.1.19 examples/show_geoptima_sos.rb
geoptima-0.1.19 bin/show_geoptima_sos
geoptima-0.1.18 examples/show_geoptima_sos.rb
geoptima-0.1.18 bin/show_geoptima_sos
geoptima-0.1.17 bin/show_geoptima_sos
geoptima-0.1.17 examples/show_geoptima_sos.rb
geoptima-0.1.15 bin/show_geoptima_sos
geoptima-0.1.15 examples/show_geoptima_sos.rb
geoptima-0.1.14 examples/show_geoptima_sos.rb
geoptima-0.1.14 bin/show_geoptima_sos
geoptima-0.1.13 bin/show_geoptima_sos
geoptima-0.1.13 examples/show_geoptima_sos.rb
geoptima-0.1.12 bin/show_geoptima_sos
geoptima-0.1.12 examples/show_geoptima_sos.rb