Class WX::METAR
In: lib/wx/metar.rb
Parent: Object

METAR is short for a bunch of French words meaning "aviation routine weather report". An example METAR code looks like:

    KLRU 261453Z AUTO 00000KT 3SM -RA OVC004 02/02 A3008 RMK AO2

This is intimidating, to say the least, to nonaviators. This class will parse a METAR code and provide the information in its attribute readers.

Methods

auto?   auto_clear?   automated?   clear?   clr?   cor?   corrected?   parse   pf   pressure_mb   relative_humidity   rh   skc?   speci?   special?   tempF   to_s  

Included Modules

Groups

External Aliases

visibility -> vis
rvr -> runway_visual_range
weather -> present_weather
weather -> present_wx
weather -> wx
sky -> clouds
sky -> cloud_cover
temp -> temperature
dewpoint -> dew
altimiter -> pressure
rmk -> remarks

Attributes

altimiter  [RW]  A pressure Unit, giving atmospheric pressure (by which one calibrates an altimiter)
auto  [RW] 
cor  [RW] 
dewpoint  [RW]  A temperature Unit
raw  [RW]  The raw METAR observation as passed to parse
rmk  [RW]  Remarks.
rvr  [RW]  An array of Groups::RunwayVisualRange objects.
sky  [RW]  An array of Groups::Sky objects.
speci  [RW] 
station  [RW]  The METAR station, as found in stations.txt
temp  [RW]  A temperature Unit
time  [RW]  A ::Time object. Note that METAR doesn‘t include year or month information, so it is assumed that this time is intended to be within the past month of ::Time.now
visibility  [RW]  A Groups::Visibility object.
weather  [RW]  An array of Groups::PresentWeather objects.
wind  [RW]  A Groups::Wind object.

Public Class methods

Parse a raw METAR code and return a METAR object

Public Instance methods

Was this report entirely automated? (i.e. not checked by a human)

auto_clear?()

Alias for clr?

automated?()

Alias for auto?

clear?()

Alias for skc?

CLR means clear below 12,000 feet (because automated equipment can‘t tell above 12,000 feet)

Was this report corrected by a human?

corrected?()

Alias for cor?

print a float to d decimal places leaving off trailing 0s

rh()

Alias for relative_humidity

SKC means sky clear. Only humans can report SKC

Was this a SPECI report? SPECI (special) reports are issued when weather changes significantly between regular reports, which are generally every hour.

special?()

Alias for speci?

The output of this aims to be similar to adds.aviationweather.gov/tafs/index.php?station_ids=klru&std_trans=translated But just plain text, not HTML tables or anything.

[Validate]