Ogn Client

GIT repository

depends-on: ogn-commons

For detailed API description, please look into the JavaDoc

Main classes and interfaces

class or interface description additional info
AircraftBeaconListener
ReceiverBeaconListener
OgnClient When connecting, you can pass APRS filter as an argument to Client's connect() method.
OgnClientFactory To be used to create OGN client instances can be used with or without AircraftDescriptorProviders (see 2 examples below)

Demo client programs

Subscribing to aircraft beacons
Simplest subscription

The example below shows how to use OGN client to subscribe to AircraftBeacons. No aircraft descriptor providers are used, therefore the client will receive bear beacons, with no static information describing an aircraft.

OgnDemoAircraftBeaconsClient
Program Output

Using descriptor providers

In most cases, you want to know what is the aircraft you get a positioning update for. You can configure OGN client to use so-called AircraftDescriptorProviders which will be resolving this information for you automatically. OGN commons library includes FileDbDescriptorProvider which can be used together with FlarmNetDb or OgnDb. The OGN database is the default source of the aircraft descriptive information, however if needed, you are free to implement your own, custom providers.

The example below demonstrates how to use OGN client to subscribe to AircraftBeacons, using aircraft descriptor providers to resolve static information describing aircraft.

Please note that one can register more than one aircraft descriptor providers at a time. In such case they will be queried in the order of declaration, until a successful descriptor is found, or none.

OgnDemoAircraftBeaconsClient2
Program Output

Creating multiple client instances

Sometimes you may need to create several instances of OGN client (e.g. you may want them to subscribe with different filters or to different servers, on different ports etc..)
OgnDemoAircraftBeaconsClient3 demonstrates how to do it.

Subscribing to receiver beacons

The example below demonstrates how to use OGN client to subscribe to ReceiverBeacons.

OgnDemoReceiverBeaconsClient
Program Output

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License