Download the PHP package paulhollmann/vatsim-data without Composer

On this page you can find all versions of the php package paulhollmann/vatsim-data. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package vatsim-data

VATSIM Data

vatsim-data is a Laravel package for VATSIM's live network data. It provides typed pilots, controllers, ATIS, transceivers, METARs, aerodrome summaries, and airport stand occupancy in one package.

All live data access is cached internally. Application code queries the API and receives typed objects; it does not need to download, parse, or cache VATSIM payloads itself.

Requirements

Installation

The published config/vatsimdata.php controls the VATSIM endpoint, cache-key prefix, and optional local-airspace helpers. The global methods described below do not depend on any VATSIM Germany-specific configuration.

Cache lifetime

All cache entries are internal and use Laravel's configured cache store. The defaults balance live-data freshness against repeated slow requests:

Environment variable Default Cached data
VATSIM_DATAFEED_CACHE_TTL 15 seconds Main VATSIM datafeed and derived station lookups
VATSIM_DATAFEED_STALE_CACHE_TTL 86400 seconds How long the last known-good datafeed remains available during an invalid upstream response
VATSIM_DATAFEED_HISTORY_COUNT 5 Movement points retained per pilot
VATSIM_DATAFEED_HISTORY_TTL 86400 seconds Lifetime of pilot movement history
VATSIM_METAR_CACHE_TTL 300 seconds METAR responses per ICAO code
VATSIM_TRANSCEIVER_CACHE_TTL 120 seconds Transceiver data and controller transceiver lookups
VATSIM_AERODROME_SUMMARY_CACHE_TTL 60 seconds Aerodrome summaries

OpenStreetMap stand data is cached for three months. Change a TTL only when your application needs a different freshness/performance trade-off; no cache calls are required in application code.

To protect consumers from an invalid or incomplete VATSIM response, a datafeed with fewer than 50 pilots does not replace the last known-good feed. The prior accepted data remains available for up to one day by default; its retention is configurable with the variable above.

Freshness timestamps

Every external source exposes the time at which this package last fetched a successful response. These methods never make an additional request and return null until the corresponding source has been fetched at least once. Timestamps are returned as DateTimeImmutable instances in UTC.

Live datafeed

Within one PHP request, Datafeed::get() reuses the same hydrated feed. Airport views should prefer scoped queries so the complete typed feed is not hydrated just to match a small set of aircraft:

PilotTracksForCids() hydrates only the requested track points. Track cache entries are stored as arrays under a versioned key, so old serialized object entries are naturally ignored after package updates.

Refresh worker and movement history

The package registers vatsimdata:refresh, which fetches the feed immediately, refreshes the main datafeed cache, and appends the current position of every pilot to a bounded history keyed by VATSIM CID. The default history contains the latest five actual points per pilot. PilotTracks() returns a PilotTrack for each CID. Each track contains the actual points and five predicted points at exactly 5, 10, 15, 20, and 25 seconds after the latest point. The predicted path follows a local quadratic fitted through the latest three actual positions, so recent turns are carried into the short projection. Backtracking caused by a sharp slowdown is clamped so the predicted path never reverses behind the latest valid point. Predicted points have predicted === true; actual points have predicted === false. Every point contains latitude, longitude, altitude, groundspeed, heading, and recorded_at.

Run it from Laravel's scheduler, for example in routes/console.php:

Then run php artisan schedule:work (or configure your normal scheduler worker). The refresh command also precomputes and caches PilotTrack objects, so flightpath predictions are ready without recalculating them during an airport-view request. StandStatus::parseData() similarly precomputes its default airport flight-status map after stand assignment. The history and derived data are stored in the configured Laravel cache store, so use a shared store when multiple application instances collect or read it.

RootObject, Pilot, Controller, Atis, FlightPlan, and related classes are typed DTOs in the VatsimData\DatafeedClasses namespace. For example:

Pilot queries

ICAO input is normalized, and pilots without a flight plan are ignored by arrival/departure queries.

For geographic filtering, pass the included polygon helper:

PilotsLocal() remains available as a convenience wrapper around the polygon configured in vatsimdata.local_airspace_polygon.

Controllers, callsigns, and stations

ControllersActive() is global and excludes observers. ControllersLocal() is retained for applications using the configured regional callsign pattern.

To resolve a controller from station data, supply the station ident and frequency:

The matcher normalizes frequencies and accepts sectorised controller callsigns, so EDDF_N_TWR can match an EDDF_TWR station at the same frequency.

Aerodrome summaries

AerodromeSummary combines a single airport's live controllers, ATIS, active controller roles, arrivals, and departures.

For airport lists:

ATIS, METAR, and transceivers

Stand status

VatsimData\StandStatus replaces the separate vatsim-stand-status package. It associates eligible VATSIM pilots with the nearest airport parking stand.

Quick start

Aerodrome elevation

VATSIM reports altitude in feet MSL. Supply the aerodrome elevation (also feet MSL) to make stand eligibility and the ground/taxi/takeoff/arrival phase thresholds relative to the airport. The optional final constructor argument preserves the existing constructor contract; omitting it retains the previous sea-level behaviour.

When an ICAO is supplied to the constructor, parseData() uses Datafeed::PilotsNearAerodrome() by default. For tests or application-owned sources, pass an iterable of typed Pilot objects or the legacy pilot-array shape:

Stand input

The legacy input contract is retained. Every stand row has exactly three values: [identifier, latitude, longitude].

CSV files use the same three columns; an optional header row is accepted.

For CAA/Aerospace coordinate input, use the legacy-compatible format constant:

OpenStreetMap stand data

This downloads OSM aeroway=parking_position data around the airport and caches it internally for three months. OSM data may be incomplete; consumers displaying or redistributing it must provide OpenStreetMap attribution as required by the ODbL.

Matching settings

All setters are fluent. Run parseData() again after changing one.

Setter Default Meaning
setMaxStandDistance(float $km) 0.07 km Maximum aircraft-to-stand distance.
setMaxDistanceFromAirport(float $km) 2 km Aircraft outside this airport-centre radius are ignored.
setMaxAircraftAltitude(int $feet) 3000 ft Aircraft above this altitude are ignored.
setMaxAircraftGroundspeed(int $knots) 10 kt Aircraft faster than this are ignored.
setHideStandSidesWhenOccupied(bool $hide) true Hides related stands such as 42L and 42R.
setStandExtensions(array $extensions) ['L', 'C', 'R', 'A', 'B', 'N', 'E', 'S', 'W'] Defines side-stand suffixes.
setStandExtensionPattern(string $pattern) '<standroot><extensions>' Defines how stand groups are detected.

Results

Each returned Stand exposes id, latitude, longitude, occupier, isOccupied(), getName(), getRoot(), and getExtension(). Aircraft exposes the VATSIM pilot fields through properties such as callsign, latitude, longitude, altitude, and groundspeed, plus onStand() and getStandIndex().

Flight phases

Set the airport ICAO as the optional fourth constructor argument (or with setAirportIcao()) to calculate a typed FlightStatus for pilots around an airport:

The possible values are AT_GATE, TAXI_FOR_DEPARTURE, TAKING_OFF, DEPARTING, ARRIVING, TAXI_TO_GATE, ARRIVED_AT_GATE, and UNKNOWN.

flightStatuses() calculates statuses for every current VATSIM pilot; pass an iterable of Pilot objects or legacy arrays to classify a supplied data set. The classifier is snapshot-based: it uses stand occupancy, altitude, groundspeed, and flight-plan departure/arrival ICAOs. An aircraft not on a stand and at airport-surface altitude is classified as TAXI_FOR_DEPARTURE or TAXI_TO_GATE when its groundspeed is below 30 knots. It therefore returns UNKNOWN where a current snapshot cannot establish a reliable phase, rather than inferring a route-specific status.

flightStatuses() uses the first-class pilot history exposed by Datafeed::PilotTracks(). This improves transitions such as climb, descent, and gate departure movement when a flight plan is missing, without adding a second tracking store or per-aircraft cache writes.

Record history by scheduling the built-in refresh command at the interval your application needs (one minute is a sensible default):

The command refreshes the datafeed cache and stores a compact position history per VATSIM CID. History length and retention are controlled by VATSIM_DATAFEED_HISTORY_COUNT (default 5) and VATSIM_DATAFEED_HISTORY_TTL (default 86400 seconds).

License

GPL-3.0-only. See LICENSE.


All versions of vatsim-data with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
ext-curl Version *
illuminate/cache Version ^v11|^v12|^v13
illuminate/console Version ^v11|^v12|^v13
illuminate/support Version ^v11|^v12|^v13
illuminate/config Version ^v11|^v12|^v13
illuminate/collections Version ^v11|^v12|^v13
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package paulhollmann/vatsim-data contains the following files

Loading the files please wait ...