This project is being archived because it was superseded by neon-JS/above_me. Docker images are not deleted for compatibility reasons. As this means that neither dependency nor security updates will be performed, it is strongly advised not to continue using OgnGateway.NET. Free to fork it & continue development!
A simple gateway for OGN-data which feeds websockets. This gateway listens to the APRS-servers of the OpenGliderNetwork and parses & passes the received messages to all connected clients. It is configurable so that certain events (see below) will trigger an immediately message while the rest is buffered and sent in intervals. Those intervals and rules can be changed, just like the area that should be filtered.
- A new aircraft appears in visible range
- An aircraft starts or lands
This solution is split into two projects:
- OgnGateway, which handles the connection to the APRS-servers, aircraft data and conversion to business models.
- WebsocketGateway, which uses the OgnGateway and provides the received data to websockets and HTTP endpoints.
It also contains a very simple frontend, which is written with Vue.js and currently in german. This frontend connects to the WebsocketGateway and lists the incoming data / creates live notifications.
- Clone / download this repository.
- Configure src/WebsocketGateway/appsettings.json.
dotnet run
- Clone / download this repository.
- Configure docker/docker-compose.yml or src/WebsocketGateway/appsettings.json.
cd docker && docker compose up
The following endpoints can be accessed without authentication:
-
GET /api/current
Returns:FlightDataDto[]
-
GET /api/config
ReturnsConfig
-
GET /websocket Conntects to websocket which sends the clients
FlightDataDto
s regularly or on events.
{
"speed": 123.4, /* km/h */
"altitude": 3456.7, /* m */
"verticalSpeed": 2.3, /* m/s */
"turnRate": 2.1, /* turns/min */
"course": 123.0, /* degrees */
"position": {
"latitude": 123.4,
"longitude": 111.1
},
"dateTime": "2012-04-23T18:25:43.511Z",
"aircraft": {
"id": "ABCD12",
"callSign": "A1", /* or null */
"registration": "D-XYZA", /* or null */
"type": "Airbus A380" /* or null */
},
"flying": false /* as defined in appsettings.json */
}
See src/WebsocketGateway/appsettings.json for further information.
{
"maxAgeSeconds": 20,
"eventsOnly": false,
"intervalSeconds": 2, /* or null */
"filterPosition": {
"latitude": 12.345,
"longitude": 123.45
},
"filterRadius": 15 /* km */
}
This code is licensed under the MIT-License (see LICENSE.md). Before using this, make sure to not violate against OGN rules!