# mode-s-msglen

> A utility library for getting the message length of Mode S messages based on the downlink format

Latest version **1.0.4** (published 2017-12-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install mode-s-msglen
pnpm add mode-s-msglen
yarn add mode-s-msglen
bun add mode-s-msglen
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2017-12-25 |
| First published | 2017-12-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Thomas Watson |
| Maintainers | watson |
| Keywords | modes, mode-s, adsb, ads-b, sdr, rtlsdr, rtl-sdr, radio, aircraft, airplane, airplanes, plane, 1090, 1090mhz |

## Links

- npm: https://www.npmjs.com/package/mode-s-msglen
- Repository: https://github.com/watson/mode-s-msglen
- Homepage: https://github.com/watson/mode-s-msglen#readme
- Issues: https://github.com/watson/mode-s-msglen/issues
- npm.io page: https://npm.io/package/mode-s-msglen

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 1.0.4 (latest) — 2017-12-25
- 1.0.3 — 2017-12-11
- 1.0.2 — 2017-12-09
- 1.0.1 — 2017-12-09
- 1.0.0 — 2017-12-09

## README

# mode-s-msglen

A utility library for getting the message length of Mode S messages
based on the downlink format.

Mode S is an aviation transponder interrogation mode used by Secondary
Surveillance Radar (SSR) and Automatic Dependent Surveillance-Broadcast
(ADS-B) systems.

For an example of this module in use, see
[AirplaneJS](https://github.com/watson/airplanejs).

[![Build status](https://travis-ci.org/watson/mode-s-msglen.svg?branch=master)](https://travis-ci.org/watson/mode-s-msglen)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard)

## Installation

```
npm install mode-s-msglen --save
```

## Usage

```js
const msglen = require('mode-s-msglen')

const msgbits = msglen(17)

if (msgbits === msglen.LONG_MSG_BITS) {
  console.log('This is a long message')
} else {
  console.log('This is a short message')
}
```

## API

### Constants

- `LONG_MSG_BITS`
- `SHORT_MSG_BITS`

### `len = msglen(type)`

Given the Downlink Format (DF) of the Mode S message, return the message
length in bits.

## License

MIT

---
_Source: https://npm.io/package/mode-s-msglen · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
