2.0.1 • Published 7 months ago

gdl90-broadcaster v2.0.1

Weekly downloads
-
License
CC-BY-NC-ND-4.0
Repository
github
Last release
7 months ago

gdl90-broadcaster

npm npm bundle size

A lightweight implementation of Garmin's GDL-90 protocol in pure javascript.

Install

npm install gdl90-broadcaster

Usage

Import the GDL90 class and open a connection:

import { GDL90, Ownership } from '../src';
import dgram from 'dgram';

const server = new GDL90({ dgram });

await server.start(heartbeat => {
	const owner = new Ownership();
	owner.callsign = 'G-WXYZ';
	owner.latitudeDeg = 51;
	owner.longitudeDeg = -1.1;

	return [owner];
});

See example.js for a complete example implementation.

Supported Protocol Messages

The GDL-90 protocol has been implemented according to the specification found in the /docs directory.

There are a number of different message types that the protocol supports. This library only implements broadcasting the following message types:

Heartbeat

This is a message that is automatically sent every UTC second. It contains information about the status of the broadcasting device.

Ownership Report

This is used to broadcast traffic information about the broadcasting device. It includes many different fields such as position, altitude, speed, callsign etc.

Traffic Report

This has the same properties as the ownership report and is used to report nearby traffic. Many traffic reports can be created and broadcast.

Ownership Geometric Altitude

The geometric altitude message is used to broadcast the device's GPS altitude when available.

Running in Non-Node Environment

gdl90-broadcaster can be used in any environment, it does not depend on any Node APIs.

The example provided use's Node's dgram API, however this can be subtituted for any other UDP package that implements the dgram API.

For example, the react-native-udp library for React Native:

import { GDL90 } from '../src';
import reactNativeUdp from 'react-native-udp';

const server = new GDL90({ dgram: reactNativeUdp });
2.0.1

7 months ago

2.0.0

7 months ago

1.0.0-rc10

7 months ago

1.0.0-rc9

7 months ago

1.0.0-rc8

7 months ago

1.0.0-rc7

7 months ago

1.0.0-rc6

7 months ago

1.0.0-rc5

7 months ago

1.0.0-rc4

7 months ago

1.0.0-rc3

7 months ago

1.0.0-rc2

7 months ago

1.0.0-rc1

7 months ago

1.0.0

7 months ago