cobaltgrid/aviation-weather

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

v1.0.1 2018-01-03 00:14 UTC

This package is auto-updated.

Last update: 2024-10-18 23:00:45 UTC


README

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

Prerequisites

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

Installation

Using Composer:

$ composer require cobaltgrid/aviation-weather

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

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