PHPackages                             szrcai/flights - 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. szrcai/flights

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

szrcai/flights
==============

Emulate aircraft traffic along predefined paths

010PHPCI failing

Since Nov 24Pushed 6y agoCompare

[ Source](https://github.com/DostonAkhmedov/flights)[ Packagist](https://packagist.org/packages/szrcai/flights)[ RSS](/packages/szrcai-flights/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependenciesVersions (1)Used By (0)

flights
=======

[](#flights)

Package for emulate planes traffic along predefined paths

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

[](#installation)

Use Composer to install this package:

```
composer.phar install szrcai/flights

```

Usage
-----

[](#usage)

```
//Composer autoload package files
require __DIR__ . '/vendor/autoload.php';

//Create new object of new `\Szrcai\Flights\Traffic`
$traffic = new \Szrcai\Flights\Traffic();

//Load data from json (example: /examples/data/routes.json)
$traffic->loadData("data/routes.json");

//Add new route
$route = new \Szrcai\Flights\Models\Route(
    "AirBus", //The name of plane
    "RB-0000" //Registration number
);
$route->setNumber("NEW") //Flight number
    ->setStartTime("2019-11-22 01:00") //Departure time
    ->setSpeed(356) //The speed of plane
    ->addPoint(56, 64) //Starting point
    ->addPoint(50, 48) //Intermediate point
    //There can be many intermediate points
    //...
    ->addPoint(45, 36); //End point

//Save route
$traffic->addRoute($route);

//Get distance of the route in kilometers for flight number 'FV6702'
print_r($traffic->distance("FV6702")); echo "\n";
//Get estimated time of arrival for flight number 'FV6702'
print_r($traffic->timeArrival("FV6702")); echo "\n";
//Get distance in kilometers for second section of the route for flight number 'FV6702'
print_r($traffic->partDistance("FV6702", 2)); echo "\n";
//Get estimated time of arrival for first section of the route for flight number 'FV6702'
print_r($traffic->partTimeArrival("FV6702", 1)); echo "\n";
//List of current airplanes that are already in flight but have not yet reached the final point
print_r($traffic->inAir()); echo "\n";
//Get a list of the routes
print_r($traffic->getRoutes());
```

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/fe6166bb33da4515b84914a88703cf391ba725000e03020baed39f50ef94e57a?d=identicon)[Doston](/maintainers/Doston)

---

Top Contributors

[![DostonAkhmedov](https://avatars.githubusercontent.com/u/9718640?v=4)](https://github.com/DostonAkhmedov "DostonAkhmedov (19 commits)")

### Embed Badge

![Health badge](/badges/szrcai-flights/health.svg)

```
[![Health](https://phpackages.com/badges/szrcai-flights/health.svg)](https://phpackages.com/packages/szrcai-flights)
```

###  Alternatives

[ivanovsaleksejs/num-to-text

Converts numbers or prices to text representation in various languages. For example, 437605 becomes "four hundred thirty seven thousand six hundred five". Price class for displaying prices with currencies is also available.

2015.9k](/packages/ivanovsaleksejs-num-to-text)[vildanbina/composer-upgrader

Effortlessly upgrade all Composer dependencies to their latest versions with a single command.

364.7k1](/packages/vildanbina-composer-upgrader)

PHPackages © 2026

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