PHPackages                             dbursem/ogn-client-php - 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. dbursem/ogn-client-php

ActiveLibrary

dbursem/ogn-client-php
======================

OGN client implementation

2.1.1(7y ago)61542[1 issues](https://github.com/dbursem/ogn-client-php/issues)GPLv3PHPPHP &gt;=5.4.0

Since Nov 18Pushed 3y ago2 watchersCompare

[ Source](https://github.com/dbursem/ogn-client-php)[ Packagist](https://packagist.org/packages/dbursem/ogn-client-php)[ Docs](https://github.com/dbursem/ogn-client-php)[ RSS](/packages/dbursem-ogn-client-php/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (6)Dependencies (1)Versions (7)Used By (0)

OGN APRS client
===============

[](#ogn-aprs-client)

This client can be used to track aircraft and save their logs to a database. Saving other beacons is not (yet) supported.

Install
-------

[](#install)

- run `composer require dbursem/ogn-client-php`. Check  for more info on composer.
- install the database schema from the ogn-client-db.sql file.
- Copy the example directory to your install directory
- Copy the aprsbot.cfg.php file to local.aprsbot.cfg.php and edit it with your personal settings. OGN server and port are already in it.
- Set the filter to a valid [APRS filter](http://www.aprs-is.net/javAPRSFilter.aspx). If you leave it empty, a filter will be used that selects only the airplanes in the database.

Usage
-----

[](#usage)

- Call the example aprsbot from the commandline with `php aprsbot.php`.
- you'll see some debug info and hopefully logs will be added to your database.
- set debug to false in aprsbot.php (line 7) to stop the debug messages.

Be noted: This is a daemon that should run in the background indefinately. All it does is saving coordinates to a database. There's no use in trying to call it through a webserver, as there's no output other than the debug messages.

### Minimal steps to create your own aprsbot:

[](#minimal-steps-to-create-your-own-aprsbot)

- Create an instance of APRS:

```
$aprs = new dbursem\phpaprs\APRS();
```

- Connect to the APRS host

```
if ($aprs->connect(HOST, PORT, MYCALL, PASSCODE, $filter) == FALSE)
{
    die( "Connect failed\n");
}
```

- Create an instance of OGNClient:

```
$ogn = new OGNClient\OGNClient(DB_NAME,DB_USER,DB_PASS,DB_HOST, $debug);
```

- Create a loop to handle the input/output and save records to the database

```
while (1)
{
    if (time() - $lastbeacon > BEACON_INTERVAL)
    {
        //send beacon (every 5 minutes) to keep connection alive
        echo "Send beacon\n";
        $aprs->sendPacket($beacon);
        $lastbeacon = time();
    }
    $aprs->ioloop(5);    // handle Socket I/O events
    $ogn->savePositions(); //save received positions to database
}
```

About the igc.php file
----------------------

[](#about-the-igcphp-file)

This code won't work as-is, I only bundled the file to serve as an example of how to generate an IGC file from the logs in ognlogs. Create your own functions to do this in your environment or wait till I have time to make A proper class for it.

check the [openlayers igc example](http://openlayers.org/en/v3.8.1/examples/igc.html) if you want to show the IGC in a webbrowser.

As said before, this class has some rough edges so handle with care!

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity62

Established project with proven stability

 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.

###  Release Activity

Cadence

Every ~249 days

Recently: every ~291 days

Total

6

Last Release

2584d ago

Major Versions

v1.0 → 2.0-beta12016-02-11

### Community

Maintainers

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

---

Top Contributors

[![dbursem](https://avatars.githubusercontent.com/u/5601853?v=4)](https://github.com/dbursem "dbursem (30 commits)")

---

Tags

APRSOGNGlidernetOpen Glider Net

### Embed Badge

![Health badge](/badges/dbursem-ogn-client-php/health.svg)

```
[![Health](https://phpackages.com/badges/dbursem-ogn-client-php/health.svg)](https://phpackages.com/packages/dbursem-ogn-client-php)
```

PHPackages © 2026

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