Project

metarman

0.0
No commit activity in last 3 years
No release in over 3 years
Metarman gets METAR and airport-infomation.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.17
~> 10.0
~> 3.0
 Project Readme

Metarman

This gem helps you to get weather of airport.

Introduction

What's METAR??

METAR is a format for reporting weather information. A METAR weather report is predominantly used by pilots in fulfillment of a part of a pre-flight weather briefing, and by meteorologists, who use aggregated METAR information to assist in weather forecasting. (Wikipedia: https://en.wikipedia.org/wiki/METAR)

What's source of airport information??

OpenFlights: https://openflights.org/
Thank you for great data sets!!!

Installation

Add this line to your application's Gemfile:

gem 'metarman'

And then execute:

$ bundle

Or install it yourself as:

$ gem install metarman

Usage

Get METAR

require 'Metarman'
Metarman.get_raw("RJFF") #=> RJFF is ICAO code. NOT IATA code.
#=> {
 # :time=>"2019/06/07 08:00",
 # :metar_raw=>"RJFF 070800Z 19015G26KT 9999 FEW020 SCT030 BKN040 25/18 Q1001 NOSIG RMK 1CU020 4CU030 6CU040 A2957"
 # }

Get METAR, Airport Information and Human-readable weather

require 'Metarman'
Metarman.get_with_info("RJFF") #=> RJFF is ICAO code. NOT IATA code.
#=> {     
 # :time=>"2019/06/07 08:00", 
 # :metar_raw=>"RJFF 070800Z 19015G26KT 9999 FEW020 SCT030 BKN040 25/18 Q1001 NOSIG RMK 1CU020 4CU030 6CU040 A2957", 
 # :airport=>{"id"=>"2305", "name"=>"Fukuoka Airport", "icao"=>"RJFF", "iata"=>"FUK", "country"=>"Japan", "city_name"=>"Fukuoka", "lat"=>"33.585899353027344", "lon"=>"130.4510040283203", "elev"=>"32", "utc"=>"9", "dst"=>"U", "timezone"=>"Asia/Tokyo"}, 
 # :weather=>{:visibility=>"9999", :few=>"020", :sct=>"030", :bkn=>"040", :qnh=>"1001"}
 # }

NOTE

This METAR-parser ignore after "QNH".

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec 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/moririn772/metarman.

License

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