Download the PHP package cobaltgrid/vatsim-stand-status without Composer

On this page you can find all versions of the php package cobaltgrid/vatsim-stand-status. 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-stand-status

VATSIM Stand Status Stand Status CI

Table of Contents

About

Description

vatsim-stand-status is a tested, lightweight PHP library to allow the correlation between aircraft on the VATSIM flight simulation network and an airport stand.

VATSIM network data is downloaded and parsed by Skymeyer's Vatsimphp library.

Requirements
Author

This package was created by Alex Toff

License

vatsim-stand-status is licensed under the GNU General Public License v3.0, which can be found in the root of the package in the LICENSE file.

All work is © Alex Toff 2020 and contributors

Installation

The easiest way to install stand status is through the use of composer:

New to Composer? Here is a useful guide on getting started

Configuration

Stand Status's options are easily configurable through a series of setters on the base class. After changing the settings, make sure to run $standStatus->parseData() to (re)run the correlation algorithm.

Note that these are fluent setters, so you can chain them together.

Below are the available options. Prefix with get/set depending on what you want to change:

Example

Usage

There are 3 steps you need to take in order to get this library working:

Construct an Instance

If you have installed via composer, include the autoloader:

Then, an instance of the class must be made:

Required

Here is an example:

Loading Stand Data

After constructing the instance, you must load in the stand data for the airport.

There are currently 3 ways of getting stand data into StandStatus.

1. Loading from a CSV

Stand data can be read into the library via a CSV file, an example of which can be found in tests/Fixtures/SampleData/egkkstands.csv.

You can load in a CSV file's data like so:

The first row can be used for headers if you so wish.

The order of the data should be ID, Latitude, Longitude.

If your stand data file uses anything other than the default, you must specify this when constructing the instance (See above section)

In the end, you should have a CSV file that looks something like this (For a CAA / Aerospace format):

id latitude longitude
1 510917.35N 0000953.33W
2 510915.83N 0000952.81W
3 510914.31N 0000952.28W

2. Loading from an Array

Alternatively, you can load in stand data through an array that follows the format id, latitude, longitude:

Again, make sure you set the correct stand coordinate format in the constructor.

3. Loading from OpenStreetMap

This option leverages the powerful OpenStreetMap (OSM) Overpass API to attempt to find and download stand data that has been contributed on OSM. Unlike the other two methods, you don't have to do any data-digging at all, and just have to specify the ICAO code of the airport.

Some important notes:

To automatically download, cache and load the OpenStreetMap data, run:

If the API call fails, or there is an error parsing the data return, exceptions will be thrown. Check the source code to see what you want to catch.

Parsing the Data

You must then tell the library to download and parse the VATSIM data to assign aircraft to stands. This is done like so:

You can then use the methods to retrieve a list of stands with assigned aircraft, etc.

Data Types

There are two main object types used:

Examples

For an integrated usage example, see the Gatwick demo in examples/egkkStands.php.

Constructing the library with a CSV data file
Constructing the library with a stand data array
Getting stands

Note that the output of stands() will hide "side stands" if the hideStandSidesWhenOccupied setting is true. If you want to get all stands, including this hidden stands, use allStands().

Getting all occupied stands

If you want an associative array, where the index is the stand name, use ->occupiedStands(true). Use can use this on all the methods that return an array of stands.

Similarly, you can also use ->unoccupiedStands() to get an array of unoccupied stands

Get all aircraft on the ground

If you want an associative array, where the index is the stand name, use ->occupiedStands(true)


All versions of vatsim-stand-status with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2
skymeyer/vatsimphp Version ^2.0
guzzlehttp/guzzle Version ^6.5|^7.0
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 cobaltgrid/vatsim-stand-status contains the following files

Loading the files please wait ....