PHPackages                             cobaltgrid/aviation-weather - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. cobaltgrid/aviation-weather

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

cobaltgrid/aviation-weather
===========================

A simple (Laravel compatible) library for fetching and decoding METARs

v1.0.1(8y ago)4481MITPHP

Since May 30Pushed 8y ago1 watchersCompare

[ Source](https://github.com/atoff/aviation-weather)[ Packagist](https://packagist.org/packages/cobaltgrid/aviation-weather)[ Docs](https://github.com/atoff/aviation-weather)[ RSS](/packages/cobaltgrid-aviation-weather/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (2)Dependencies (3)Versions (3)Used By (0)

Aviation Weather
================

[](#aviation-weather)

A simple (Laravel compatible) library for fetching and decoding METARs. (Soon to be more than this, however)

Prerequisites
-------------

[](#prerequisites)

- Laravel is now required for this library to work properly (due to use of Laravel's Cache and Log system)

Installation
------------

[](#installation)

Using Composer:

`$ composer require cobaltgrid/aviation-weather`

This will ensure that all required dependencies will be installed automatically.

Usage
-----

[](#usage)

At the moment, Aviation Weather only support ICAO codes. You can load a METAR by passing the ICAO code when you construct the class.

```
use Cobaltgrid\Aviation\Weather;
...
$weather = new Weather("EGKK");
$metar = $weather->latest_metar(); // Returns a Cobaltgrid\Aviation\Weather\Metar object

```

### Metar Object Methods

[](#metar-object-methods)

MethodDescriptionraw\_response()This gets you the raw JSON from the data source (SimpleXMLElement)raw()This gets you the raw JSON METAR data from the data source (SimpleXMLElement)raw\_string()The raw METAR string (String)icao()The ICAO code of the station (String)time()A carbon object for the METAR's observation time (Carbon)latitude()A float of the latitude of the observation (Float)longitude()A float of the longitude of the observation (Float)temperature()The temperature, in degrees celsius (Float)dewpoint()The dew point, in degrees celsius (Float)wind\_direction()The wind direction, in whole degrees. If 0, this indicates a variable wind. (Int)wind\_speed()The wind speed, in knots. If both speed and direction are 0, wind is 'calm' (Int)wind\_gust()The wind gust, in knots (Int)visibility($unit="m")Options: "km", "m", "nm", "mi". Gives the visibility in the chosen units. (Float/Int)qnh($unit="hpa")Options: "hpa", "hg". Gives the QNH pressure setting in the chosen units. (Float/Int)weather\_array()An array of raw weather codes (i.e "-HZ +SH" etc) (Array)weather()An array of decoded weather codes of the format: `['code' => '-RA', 'human' => 'Light Rain']` (Array)sky\_cover()An array of decoded cloud cover. Each array item is an array with the following format: `['type' => 'SCT', 'type_human' => 'Scattered', 'height' => 2000]` . Height is in feet.flight\_cat()An indication of the type of flying permitted by the weather. Example values: MVFR, IFR, LVFR, etc.toArray()Converts the above into an array format

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 97% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~217 days

Total

2

Last Release

3101d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4f6a4947fe1acf00508bfb89c53e92df3d136786786be840720ee18b8057f610?d=identicon)[atoff](/maintainers/atoff)

---

Top Contributors

[![atoff](https://avatars.githubusercontent.com/u/17804618?v=4)](https://github.com/atoff "atoff (32 commits)")[![f2m2rd](https://avatars.githubusercontent.com/u/1012932?v=4)](https://github.com/f2m2rd "f2m2rd (1 commits)")

---

Tags

aviationaviation-weathermetarweatherweatheraviationMETAR

### Embed Badge

![Health badge](/badges/cobaltgrid-aviation-weather/health.svg)

```
[![Health](https://phpackages.com/badges/cobaltgrid-aviation-weather/health.svg)](https://phpackages.com/packages/cobaltgrid-aviation-weather)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.8k532.1M19.5k](/packages/laravel-framework)[statamic/cms

The Statamic CMS Core Package

4.8k3.5M925](/packages/statamic-cms)[flarum/core

Delightfully simple forum software.

201.4M2.2k](/packages/flarum-core)[imdhemy/google-play-billing

Google Play Billing

491.4M5](/packages/imdhemy-google-play-billing)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9417.2k58](/packages/open-dxp-opendxp)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

252.5k](/packages/eslazarev-wildberries-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
