# ggencoder

> GEOGATE-geojson handles AIS/NMEA encoding/decoding for GEOgate GPS/AIS/GTS framework

Latest version **1.0.12** (published 2026-09-14) · apache20 license · 0 weekly downloads

## Install

```sh
npm install ggencoder
pnpm add ggencoder
yarn add ggencoder
bun add ggencoder
```

Provides the command `Ais2JsonClient`.

## Health

**Score 55/100 (C)** — status: active.

Positive: no vulnerabilities; recently updated; high maintenance score.

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

## Facts

| | |
|---|---|
| Version | 1.0.12 |
| Published | 2026-09-14 |
| First published | 2014-11-06 |
| Weekly downloads | 0 |
| License | apache20 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 166.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 81 |
| Author | Fulup Ar Foll |
| Maintainers | fulup-bzh, wayofthefuture, afischerdev |
| Keywords | GTS, opengts, GPS, tracker, AIS, GeoJSON, nmea, gpx, gps103, tk102, simulator, gprmc |

## Links

- npm: https://www.npmjs.com/package/ggencoder
- Repository: https://github.com/fulup-bzh/GeoGate
- Homepage: https://github.com/fulup-bzh/GeoGate#readme
- Issues: http://github.com/fulup-bzh/GeoGate/issues
- npm.io page: https://npm.io/package/ggencoder

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.0.12 (latest) — 2026-09-14
- 1.0.11 — 2026-08-24
- 1.0.10 — 2026-06-26
- 1.0.9 — 2025-08-08
- 1.0.8 — 2024-02-10
- 1.0.7 — 2023-12-17
- 1.0.6 — 2023-05-16
- 1.0.5 — 2021-10-28
- 1.0.4 — 2020-02-24
- 1.0.3 — 2020-01-05
- 1.0.2 — 2018-07-09
- 1.0.1 — 2018-07-06
- 0.1.21 — 2018-04-29
- 0.1.20 — 2017-11-01
- 0.1.19 — 2017-10-13
- … 17 more at https://npm.io/package/ggencoder/versions

## README

GeoGate
========

GeoGate is an opensource GPS/AIS tracking server framework, that enable easy
integration of multiple GPS trackers in WEB applications. It provides data
acquisition drivers for typical tracker devices or phone's GPS apps.
It handle multiple database backend, and support GeoJSON, AIS & NMEA encoding/decoding.
It embed support for multiple classes of trackers, phone-apps, as well an NMEA & AIS simulator.

GeoGate-Encoder [ggencoder]
============================

Is the component that support AIS & NMEA encoding decoding for GeoGate. This component is fully
independent of GeoGate and can be use without any other references to GeoGate

Install
=======

      npm install ggencoder

      note: ./bin/Ais2JsonClient cli depends on async & jison but encoder/decoder themself do not depend on anything

Cli Usage
==========
      node ./node_modules/.bin/Ais2JsonClient --verbose --hostname=localhost --port=5001

API Usage
==========

      // import GeoGate encoding/decoding NMEA/AIS methods
      var AisEncode  = require ("ggencoder").AisEncode;
      var AisDecode  = require ("ggencoder").AisDecode;
      var NmeaEncode = require ("ggencoder").NmeaEncode;
      var NmeaDecode = require ("ggencoder").NmeaDecode;

      // decode and AIS message
      var decMsg = new AisDecode ("!AIVDM,2,1,1,A,55?MbV02;H;s<HtKR20EHE:0@T4@Dn2222222216L961O5Gf0NSQEp6ClRp8,0*1C");
      if (decMsg.valid) console.log ('%j', decMsg);

      // encode AIS message
      var encMsg = new AisEncode ({// class AB static info
            aistype    : 24,
            part       : 1,
            mmsi       : 271041815,
            cargo      : 60,
            callsign   : "TC6163",
            dimA       : 0,
            dimB       : 15,
            dimC       : 0,
            dimD       : 5
      }); if (encMsg.valid) console.log (encMsg.nmea);

      // decode NMEA message
      var decMsg = new NmeaDecode ('$GPGGA,064036.289,4836.5375,N,00740.9373,E,1,04,3.2,200.2,M,,,,0000*0E');
      if (decMsg.valid) console.log ('%j', decMsg);

      // encode NMEA message
      encMsg = new NmeaEncode ({ // standard class B Position report
             msgtype    : 2,
             cog        : 72.2,
             sog        : 6.1000000000000005,
             lon        : 122.47338666666667,
             lat        : 36.91968,
      }); if (encMsg.valid) console.log (encMsg.nmea);

test
=====

      cd test
      node --use_strict AisEncodeDecodeTest.js
      node --use_strict NmeaEncodeDecodeTest.js

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