npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

aprs-parser

v1.0.9

Published

JavaScript library for parsing APRS packets

Downloads

43

Readme

npm-aprs-parser

JavaScript library for parsing APRS packets.

Code Example

    const aprs = require("aprs-parser");
    
    const parser = new aprs.APRSParser();

    console.log(parser.parse("SQ7PFS-10>APRS,TCPIP*,qAC,T2SYDNEY:@085502h4903.50N/07201.75W-PHG5132Hello world/A=001234"));
    console.log();
    console.log(parser.parse("SQ7PFS-10>S32U6T,TCPIP*,qAC,T2SYDNEY:`(_fn\"Oj/>Hellov"));

Output:

    APRSMessage {
      from: Callsign { ssid: '10', call: 'SQ7PFS' },
      to: Callsign { call: 'APRS' },
      via: 
       [ Callsign { call: 'TCPIP*' },
         Callsign { call: 'qAC' },
         Callsign { call: 'T2SYDNEY' } ],
      raw: 'SQ7PFS-10>APRS,TCPIP*,qAC,T2SYDNEY:@085502h4903.50N/07201.75W-PHG5132Hello world/A=001234',
      data: 
       Position {
         latitude: 49.05833333333333,
         longitude: -72.02916666666667,
         symbol: '/-',
         symbolIcon: 'Home',
         extension: PHG { heightFeet: 20, gaindB: 3, directivityDeg: 90, powerWatts: 25 },
         altitude: 376.1232,
         comment: 'Hello world',
         timestamp: Mon Feb 27 2017 09:55:02 GMT+0100 (CET),
         msgEnabled: true } }
    
    APRSMessage {
      from: Callsign { ssid: '10', call: 'SQ7PFS' },
      to: Callsign { call: 'S32U6T' },
      via: 
       [ Callsign { call: 'TCPIP*' },
         Callsign { call: 'qAC' },
         Callsign { call: 'T2SYDNEY' } ],
      raw: 'SQ7PFS-10>S32U6T,TCPIP*,qAC,T2SYDNEY:`(_fn"Oj/>Hellov',
      data: 
       MICEPosition {
         latitude: 33.42733333333334,
         longitude: -12.129,
         mice: 'returning',
         symbol: '/j',
         symbolIcon: 'Jeep',
         extension: CourseSpeed { courseDeg: 251, speedMPerS: 10.28888888 },
         radio: 'Kenwood TH-D7A Mobile',
         comment: 'Hello' } }

Code Example - weather station support

    const aprs = require("aprs-parser");
    
    const parser = new aprs.APRSParser();

    console.log(parser.parse("FW7233>APRS,TCPXX*,qAX,CWOP-2:@231821z5150.13N/01913.68E_239/003g010t042r000p011P011b09969h83L000eMB51"));

Output:

APRSMessage {
  from: Callsign { call: 'FW7233' },
  to: Callsign { call: 'APRS' },
  via: [
    Callsign { call: 'TCPXX*' },
    Callsign { call: 'qAX' },
    Callsign { ssid: '2', call: 'CWOP' }
  ],
  raw: 'FW7233>APRS,TCPXX*,qAX,CWOP-2:@231821z5150.13N/01913.68E_239/003g010t042r000p011P011b09969h83L000eMB51',
  data: Position {
    latitude: 51.8355,
    longitude: 19.228,
    symbol: '/_',
    symbolIcon: 'WX Station',
    extension: CourseSpeed { courseDeg: 239, speedMPerS: 1.543333332 },
    weather: {
      windGust: 4.4704,
      temperature: 5.555555555555555,
      rain1h: 0,
      rain24h: 2.794,
      rainSinceMidnight: 2.794,
      pressure: 996.9,
      humidity: 83,
      luminosity: 0
    },
    comment: 'eMB51',
    timestamp: 2021-01-23T18:21:00.000Z,
    msgEnabled: true
  }

For WX stations with position CourseSpeed extension is used to represent wind speed and direction. Units used in weather report:

  • rain1h, rain24h, rainSinceMidnight - millimeters
  • windGust - meters per second
  • temperature - Celcius
  • pressure - millibars
  • luminosity - watts per square meter
  • snow - centimeters
  • humidity - %

Code Example - APRS Stream

This library also supports connecting to the APRS "firehose". An amateur radio license is required to connect.

    const aprs = require("aprs-parser");
    const stream = new aprs.APRSISConnector;
    stream.connect('YOUR-AMATEUR-RADIO-CALLSIGN');
    
    stream.on('aprs', (event)=>{
        console.log(event)
    });

Installation

$ npm install aprs-parser --save

Supported data types

  • Position
  • Objects
  • Current MIC-E
  • Telemetry
  • Messages
  • Status reports
  • Weather

License

Library is licensed under the GNU Lesser General Public License.

Library by adriann0 with Kris Linquist as an additional contributor.