Project

ruby-adsb

0.0
No commit activity in last 3 years
No release in over 3 years
Decode automatic dependent surveillance broadcasts
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 1.11
~> 5.0
~> 10.0
 Project Readme

ADSB

Automatic Dependent Surveillance Broadcast is a cooperative surveillance technology in which an aircraft determines its position via satellite navigation and periodically broadcasts it. This gem decodes automatic dependent surveillance broadcasts.

Installation

Add this line to your application's Gemfile:

gem 'ruby-adsb', require: 'adsb'

And then execute:

$ bundle

Or install it yourself as:

$ gem install ruby-adsb

Usage

Create a new message:

message = ADSB::Message.new('8D4840D6202CC371C32CE0576098')

Get the address of the sender:

address = message.address

Get the type of message:

type = message.type

The type of message is either :identification, :position, or :velocity.

Identification

Get the reported identification:

identification = message.identification

Position

Create a new compact position report from a message of even parity and a message of odd parity:

even = ADSB::Message.new('8D40621D58C382D690C8AC2863A7')
odd = ADSB::Message.new('8D40621D58C386435CC412692AD6')
report = ADSB::CPR::Report.new(even, odd)

Get the reported altitude:

altitude = report.altitude

Get the reported latitude:

latitude = report.latitude

Get the reported longitude:

longitude = report.longitude

Velocity

Get the reported heading:

heading = message.heading

Get the reported velocity:

velocity = message.velocity

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake test to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/lboekhorst/ruby-adsb.

License

The gem is available as open source under the terms of the MIT license.