# @signalk/nmea0183-signalk

> A node.js/javascript parser for NMEA0183 sentences. Sentences are parsed to Signal K format.

Latest version **3.22.0** (published 2026-09-24) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @signalk/nmea0183-signalk
pnpm add @signalk/nmea0183-signalk
yarn add @signalk/nmea0183-signalk
bun add @signalk/nmea0183-signalk
```

Provides the command `nmea0183-signalk`.

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 3.22.0 |
| Published | 2026-09-24 |
| First published | 2017-09-19 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=24 |
| Dependencies | 4 |
| Unpacked size | 524.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 36 |
| Author | Fabian Tollenaar |
| Maintainers | tkurki, sbender, panaaj |
| Keywords | nmea, 0183, nmea0183, signalk, signal, k, parser |

## Links

- npm: https://www.npmjs.com/package/@signalk/nmea0183-signalk
- Repository: https://github.com/SignalK/nmea0183-signalk
- Issues: https://github.com/SignalK/nmea0183-signalk/issues
- npm.io page: https://npm.io/package/@signalk/nmea0183-signalk

## Dependencies (4)

- [split](https://npm.io/package/split.md) ^1.0.1
- [ggencoder](https://npm.io/package/ggencoder.md) ^1.0.8
- [@signalk/signalk-schema](https://npm.io/package/@signalk/signalk-schema.md) ^1.7.1
- [@signalk/nmea0183-utilities](https://npm.io/package/@signalk/nmea0183-utilities.md) ^1.1.1

## Alternatives

- [@mdxeditor/editor](https://npm.io/package/@mdxeditor/editor.md) — 962.4K weekly downloads
- [mmdb-lib](https://npm.io/package/mmdb-lib.md) — 680.9K weekly downloads
- [playcanvas](https://npm.io/package/playcanvas.md) — 36.2K weekly downloads
- [@glw907/cairn-cms](https://npm.io/package/@glw907/cairn-cms.md) — 967 weekly downloads
- [markdown-to-confluence](https://npm.io/package/markdown-to-confluence.md) — 103 weekly downloads

## Recent versions

- 3.22.0 (latest) — 2026-09-24
- 3.21.0 — 2026-09-24
- 3.20.1 — 2026-06-20
- 3.20.0 — 2026-06-04
- 3.19.2 — 2026-05-06
- 3.19.1 — 2026-04-21
- 3.19.0 — 2026-04-19
- 3.18.0 — 2026-04-17
- 3.17.4 — 2026-04-14
- 3.17.3 — 2026-02-09
- 3.17.2 — 2026-02-05
- 3.16.0 — 2025-10-31
- 3.15.3 — 2024-12-23
- 3.15.2 — 2024-11-16
- 3.15.1 — 2024-05-10
- … 42 more at https://npm.io/package/@signalk/nmea0183-signalk/versions

## README

# @signalk/nmea0183-signalk

[![CI](https://github.com/SignalK/nmea0183-signalk/actions/workflows/ci.yml/badge.svg)](https://github.com/SignalK/nmea0183-signalk/actions/workflows/ci.yml)
[![npm version](https://img.shields.io/npm/v/@signalk/nmea0183-signalk.svg)](https://www.npmjs.com/package/@signalk/nmea0183-signalk)
[![License](https://img.shields.io/npm/l/@signalk/nmea0183-signalk.svg)](https://github.com/SignalK/nmea0183-signalk/blob/master/LICENSE)

> A node.js/JavaScript parser of NMEA0183 sentences. Sentences are parsed to [Signal K delta](http://signalk.org/specification/1.7.0/doc/data_model.html#delta-format) format.

## Supported sentences

- [ALK - Seatalk](http://www.thomasknauf.de/rap/seatalk2.htm)
- [APB - Autopilot Sentence "B"](https://gpsd.gitlab.io/gpsd/NMEA.html#_apb_autopilot_sentence_b)
- [BOD - Bearing Origin to Destination](https://www.tronico.fi/OH6NT/docs/NMEA0183.pdf)
- [BWC - Bearing & distance - great circle](https://www.tronico.fi/OH6NT/docs/NMEA0183.pdf)
- [BWR - Bearing & distance - rhumbline](https://www.tronico.fi/OH6NT/docs/NMEA0183.pdf)
- [BVE - CruzPro Proprietary Sentence (currently only OP30/60 supported)](http://www.cruzpro.com/op60.html)
- [DBT - Depth Below Transducer](https://gpsd.gitlab.io/gpsd/NMEA.html#_dbt_depth_below_transducer)
- [DBS - Depth Below Surface](https://gpsd.gitlab.io/gpsd/NMEA.html#_dbs_depth_below_surface)
- [DBK - Depth Below Keel](https://gpsd.gitlab.io/gpsd/NMEA.html#_dbk_depth_below_keel)
- [DPT - Depth of Water](https://gpsd.gitlab.io/gpsd/NMEA.html#_dpt_depth_of_water)
- [DSC - Digital Selective Calling Class-D Radios](http://continuouswave.com/whaler/reference/DSC_Datagrams.html)
- [DSE - Expanded Digital Selective Calling (refines the DSC position)](http://continuouswave.com/whaler/reference/DSC_Datagrams.html)
- [GNS - Fix Data](https://gpsd.gitlab.io/gpsd/NMEA.html#_gns_fix_data)
- [GGA - Global Positioning System Fix Data](https://gpsd.gitlab.io/gpsd/NMEA.html#_gga_global_positioning_system_fix_data)
- [GLL - Geographic Position - Latitude/Longitude](https://gpsd.gitlab.io/gpsd/NMEA.html#_gll_geographic_position_latitude_longitude)
- [HDG - Heading - Deviation & Variation](https://gpsd.gitlab.io/gpsd/NMEA.html#_hdg_heading_deviation_amp_variation)
- [HDM - Heading - Magnetic](https://gpsd.gitlab.io/gpsd/NMEA.html#_hdm_heading_magnetic)
- [HDT - Heading - True](https://gpsd.gitlab.io/gpsd/NMEA.html#_hdt_heading_true)
- [HSC - Heading Steering Command](https://www.tronico.fi/OH6NT/docs/NMEA0183.pdf)
- KEP - NKE Performance data
- [MDA - Meteorological Composite](https://gpsd.gitlab.io/gpsd/NMEA.html#_mda_meteorilogical_composite)
- [MTA - Mean Temperature of Air](https://www.nmea.org/Assets/100108_nmea_0183_sentences_not_recommended_for_new_designs.pdf)
- [MTW - Mean Temperature of Water](https://gpsd.gitlab.io/gpsd/NMEA.html#_mtw_mean_temperature_of_water)
- [MWD - Wind Speed and Direction](https://lists.nongnu.org/archive/html/gpsd-dev/2012-04/msg00048.html)
- [MWV - Wind Speed and Angle](https://gpsd.gitlab.io/gpsd/NMEA.html#_mwv_wind_speed_and_angle)
- [RMB - Recommended Minimum Navigation Information](https://gpsd.gitlab.io/gpsd/NMEA.html#_rmb_recommended_minimum_navigation_information)
- [RMC - Recommended Minimum Navigation Information](https://gpsd.gitlab.io/gpsd/NMEA.html#_rmc_recommended_minimum_navigation_information)
- [ROT - Rate of Turn](https://gpsd.gitlab.io/gpsd/NMEA.html#_rot_rate_of_turn)
- [RPM - Revolutions](https://gpsd.gitlab.io/gpsd/NMEA.html#_rpm_revolutions)
- [RSA - Rudder Sensor Angle](https://gpsd.gitlab.io/gpsd/NMEA.html#_rsa_rudder_sensor_angle)
- [THS - True Heading and Status](https://gpsd.gitlab.io/gpsd/NMEA.html#_ths_true_heading_and_status)
- [VDM - AIS Other Vessel Data](https://gpsd.gitlab.io/gpsd/AIVDM.html)
- [VDO - AIS Own Vessel Data](https://gpsd.gitlab.io/gpsd/AIVDM.html)
- [VDR - Set and Drift](https://gpsd.gitlab.io/gpsd/NMEA.html#_vdr_set_and_drift)
- [VHW - Water Speed and Heading](https://gpsd.gitlab.io/gpsd/NMEA.html#_vhw_water_speed_and_heading)
- [VLW - Distance Traveled through Water](https://gpsd.gitlab.io/gpsd/NMEA.html#_vlw_distance_traveled_through_water)
- [VPW - Speed - Measured Parallel to Wind](https://gpsd.gitlab.io/gpsd/NMEA.html#_vpw_speed_measured_parallel_to_wind)
- [VTG - Track Made Good and Ground Speed](https://gpsd.gitlab.io/gpsd/NMEA.html#_vtg_track_made_good_and_ground_speed)
- [VWR - Relative Wind Speed and Angle](https://gpsd.gitlab.io/gpsd/NMEA.html#_vwr_relative_wind_speed_and_angle)
- [VWT - True Wind Angle and Speed](https://lists.nongnu.org/archive/html/gpsd-dev/2012-04/msg00048.html)
- [ZDA - UTC day, month, and year, and local time zone offset](https://gpsd.gitlab.io/gpsd/NMEA.html#_zda_time_amp_date_utc_day_month_year_and_local_time_zone)
- [XTE - Cross-track Error](https://www.tronico.fi/OH6NT/docs/NMEA0183.pdf)
- [ZDA - UTC day, month, and year, and local time zone offset](http://www.trimble.com/oem_receiverhelp/v4.44/en/NMEA-0183messages_ZDA.html)
- [Custom Sentences](#custom-sentences)

**Note:** _at this time, unknown sentences will be silently discarded._

### Custom Sentences

You can add custom sentence parsers via the [Signal K Server plugin mechanism](https://github.com/SignalK/signalk-server/blob/5abe63f1322f7538c9bbb2ec17b22ca52da2bc8a/docs/src/develop/plugins/server_plugin.md). A plugin can register custom parsers by emitting `nmea0183sentenceParser` PropertyValues with a value that has the properties

- sentence: the three letter id of the sentence
- parser: a function with the signature `({ id, sentence, parts, tags, talker }, session) => delta`

See [custom-sentence-plugin/index.js](./custom-sentence-plugin/index.js) for a complete, runnable example plugin.

TypeScript plugins can import the parser and delta types from this package:

```typescript
import type {
  CustomSentenceParserEntry,
  ParserInput,
  ParserSession,
  Delta
} from '@signalk/nmea0183-signalk'
```

## Usage

### JavaScript API

```javascript
const Parser = require('@signalk/nmea0183-signalk')
const parser = new Parser()

try {
  const delta = parser.parse('$SDDBT,17.0,f,5.1,M,2.8,F*3E')
  if (delta !== null) {
    console.log(`[delta] ${JSON.stringify(delta, null, 2)}`)
  }
} catch (e) {
  console.error(`[error] ${e.message}`)
}
```

### Command line

In addition to usage in your code, the parser can be used on the command-line if installed globally (`npm install --global`). This allows you to pipe data from one program into the parser directly, without using a Signal K server. The parser holds no Signal K tree in memory (a big change vs. 1.x), so the output will be stringified [Signal K delta](http://signalk.org/specification/1.7.0/doc/data_model.html#delta-format) messages.

```bash
$ echo '$SDDBT,17.0,f,5.1,M,2.8,F*3E' | nmea0183-signalk
```

## NMEA0183v4 tag blocks

This parser has (limited) support of [NMEA0183v4 tag blocks](http://www.nmea.org/Assets/may%2009%20rtcm%200183_v400.pdf) (e.g. `\s:airmar dst800,c:1438489697*13\$SDDBT,17.0,f,5.1,M,2.8,F*3E`).

Example:

```javascript
const Parser = require('@signalk/nmea0183-signalk')
const parser = new Parser()

try {
  // backslash starts an escape sequence in JavaScript code, so they need to be double in string literals
  const delta = parser.parse(
    '\\s:airmar dst800,c:1438489697*13\\$SDDBT,17.0,f,5.1,M,2.8,F*3E'
  )
  if (delta !== null) {
    console.log(`[delta] ${JSON.stringify(delta, null, 2)}`)
  }
} catch (e) {
  console.error(`[error] ${e.message}`)
}
```

Output:

```json
[delta] {
  "updates": [
    {
      "source": {
        "sentence": "DBT",
        "talker": "airmar dst800",
        "type": "NMEA0183"
      },
      "timestamp": "2015-08-02T04:28:17.000Z",
      "values": [
        {
          "path": "environment.depth.belowTransducer",
          "value": 5.1
        }
      ]
    }
  ]
}
```

Sentences that carry a UTC time but no date (GGA, GLL, GNS, BWC, BWR, and RMC with an empty date field) keep their own time of day and take the date from the `c:` time, choosing the day that puts the result within 12 hours of it. This keeps replayed logs on their recorded dates and handles fixes that arrive just after midnight. Without a `c:` time, the host clock is used instead.

**Note:** *at this time, the checksum of the tag block (`c:1438489697*13`) is not validated.\*

## License

```
Copyright 2016/2017 Signal K and Fabian Tollenaar <fabian@signalk.org>.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```

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