Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ggencoder

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ggencoder - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

2

package.json
{
"name" : "ggencoder",
"description" : "GEOGATE-encoder handles AIS/NMEA encoding/decoding for GEOgate GPS/AIS/GTS framework",
"version" : "0.1.1",
"version" : "0.1.2",
"author" : {

@@ -6,0 +6,0 @@ "name" : "Fulup Ar Foll",

@@ -19,3 +19,3 @@ GeoGate

npm install GGencoder
npm install GGencoder

@@ -25,37 +25,37 @@ Usage

// import GeoGate encoding/decoding NMEA/AIS methods
AisEncoder = require ("GGencoder").AisEncoder;
AisDecoder = require ("GGencoder").AisDecoder;
NmeaEncoder = require ("GGencoder").NmeaEncoder;
NmeaDecoder = require ("GGencoder").NmeaDecoder;
// import GeoGate encoding/decoding NMEA/AIS methods
AisEncoder = require ("GGencoder").AisEncoder;
AisDecoder = require ("GGencoder").AisDecoder;
NmeaEncoder = require ("GGencoder").NmeaEncoder;
NmeaDecoder = require ("GGencoder").NmeaDecoder;
// decode and AIS message
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);
// decode and AIS message
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
encMsg = new AisEncode ({// class AB static info
msgtype : 24,
part : 2,
mmsi : 271041815,
cargo : 60,
callsign : "TC6163",
dimA : 0,
dimB : 15,
dimC : 0,
dimD : 5
}); if (encMsg.valid) console.log (encMsg.nmea);
// encode AIS message
encMsg = new AisEncode ({// class AB static info
msgtype : 24,
part : 2,
mmsi : 271041815,
cargo : 60,
callsign : "TC6163",
dimA : 0,
dimB : 15,
dimC : 0,
dimD : 5
}); if (encMsg.valid) console.log (encMsg.nmea);
// decode NMEA message
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);
// decode NMEA message
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 : 18,
cog : 72.2,
sog : 6.1000000000000005,
lon : 122.47338666666667,
lat : 36.91968,
}; if (encMsg.valid) console.log (encMsg.nmea);
// encode NMEA message
encMsg = new NmeaEncode ({ // standard class B Position report
msgtype : 18,
cog : 72.2,
sog : 6.1000000000000005,
lon : 122.47338666666667,
lat : 36.91968,
}; if (encMsg.valid) console.log (encMsg.nmea);

@@ -65,4 +65,4 @@ test

cd test
node --use_strict AisEncodeDecodeTest.js
node --use_strict NmeaEncodeDecodeTest.js
cd test
node --use_strict AisEncodeDecodeTest.js
node --use_strict NmeaEncodeDecodeTest.js
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc