GithubHelp home page GithubHelp logo

ianfixes / nmea_plus_google_earth Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 3.72 MB

Converts incoming NMEA/AIS data to a live Google Earth overlay of ship positions

License: Apache License 2.0

Ruby 100.00%

nmea_plus_google_earth's Introduction

Google Earth viewer for NMEA and AIS Data

Converts incoming NMEA/AIS data to a live Google Earth overlay of ship positions, demonstrating the capabilities of the nmea_plus gem: https://github.com/ianfixes/nmea_plus

Here are some example screenshots from a live view of Boston harbor. See also, this video https://www.youtube.com/watch?v=yvkCEd93p_E

Cruise ship at the dock

Cruise ship docked

Tugs at the dock

For boats that spend a lot of time at their moorings, the Google Earth imagery and the live data sometimes align. Tugs at the dock

Tugs guiding a container ship

Tugs guiding a container ship top view

Note that this image is from an earlier buggy version where one side of the ship polygon was not drawn -- I didn't connect the last point back to the initial one.

Tugs guiding a container ship side view

Tugs guiding a bulk carrier

Note the white lines drawn under the ships. Since the position updates do not happen every second, it's helpful to use their reported speed and bearing to estimate their position -- rather than falsely believe they have stayed put for ten seconds.

Tugs guiding a bulk carrier

Installation

This is not a published Gem, due to custom features in some dependent gems that (as of this writing) have not been accepted and/or published upstream.

$ git clone [email protected]:ianfixes/nmea_plus_google_earth.git
$ cd nmea_plus_google_earth
$ bundle install

Operation

Demo program

To watch a brief demo with canned data (recorded in Boston harbor), run

$ bundle exec ruby exe/canned_data_demo.rb

and add http://localhost:7447 as a network link in Google Earth. You may need to configure the link to refresh at some regular interval (I use 4 seconds to avoid flickering).

Write your own program

All that is necessary is a Ruby IO object source for the input data (which can be a file, string, serial port, network connection, etc) -- technically anything that provides each_line. For example, here is a process that will read data from the serial port and publish on port 12345.

require 'nmea_plus_google_earth'
require 'serialport'

server = NMEAPlusGoogleEarth::GoogleEarthVisualizer.new(12345)
server.process(SerialPort.new("/dev/tty.usbserial", 38400, 8, 1, SerialPort::NONE))

nmea_plus_google_earth's People

Contributors

ianfixes avatar ikatz-drizly avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.