Download the PHP package mivek/php-metar-taf-parser without Composer
On this page you can find all versions of the php package mivek/php-metar-taf-parser. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package php-metar-taf-parser
PHPMetarTafParser
PHPMetarTafParser is a library written in PHP(7.2) to parse METAR and TAF messages.
The MetarParser and the TAFParser contain a method parse returning a metar object or a TAF object.
Add dependency
Using composer:
Model
AbstractWeatherContainer
Abstract class containing the basic elements
- Wind
- Visibility
- Clouds (Cloud[])
- WeatherConditions (WeatherCondition[])
- Remark (string)
- Cavok (bool)
- VerticalVisibility (array)
AbstractWeatherCode
Subclass of AbstractWeatherContainer.
- icao (string) ICAO of the airport
- day (int) Delivery day
- time (Time) Delivery time
- message (string) raw message
Metar
Subclass of AbstractWeatherCode
- temperature (int)
- dewPoint (int)
- altimeter (array) Array with keys
value
andunit
- nosig (bool)
- auto (bool)
- runwaysinfo (RunwayInfo[])
- trends (MetarTrend[])
TAF
Subclass of AbstractWeatherCode
- validity (Validity)
- minTemperature (DatedTemperature)
- maxTemperature (DatedTemperature)
- trends (TAFTrend[])
- probTrends (ProbTafTrend[])
- amendment (bool)
RunwayInfo
Represents the visibility on a runway
- name (string) Name of the runway
- trend (string)
- minRange (int)
- maxRange (int)
Cloud
Represents a cloud layer
- Quantity (string)
- Type of cloud (string optional)
- Height of the layer (string optional)
DatedTemperature
- Temperature in celsius (int)
- Day (int)
- Hour (int)
Time
Represents the delivery time of a Metar or a TAF
- Hours (int)
- Minutes (int)
Validity
Represents the validity of a TAF or of a TAFTrend
- startDay (int)
- startHour (int)
- startMinute (int)
- endDay (int)
- endHour (int)
Visibility
Represents the visibility of a AbstractWeatherContainer
- mainVisibility : array with keys 'visibility' and 'unit'
- minVisibility : array with keys 'visibility' and 'direction'
Wind
Represents the wind element
- direction (int) The direction of the wind in degrees
- cardinalDirection (string) The cardinal direction or VRB token
- speed (int)
- unit (string) unit of the speed
- gusts (int) speed of the gusts if applicable
- variable_wind (array) array with keys
min
andmax
containing the direction of variable wind if applicable.
WindShear
Subclass of Wind
- height (int) Height in feet of the windshear.
Trends
Both METAR and TAF can contain trends
AbstractTrend
Abstract parent class of trend classes.
- type: string for the type of trend. Either TEMPO, BECMG, FM or PROB
MetarTrend
Class representing a trend of a metar, composed of
- times: array of MetarTrendTime to represent the times of the trend
MetarTrendTime
- type (string) AT, FM or TL
- time: array of
hour
andminute
TafTrend
Subclass of AbstractTrend composed of
- Validity
ProbTafTrend
Subclass of the TafTrend composed of
- probability (int) probability of the trend
Examples:
Parsing a METAR
The result metar is:
Parsing a TAF
The result object is: