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

vhfinfo

v0.0.32

Published

VHF GeoJSON information with SignalK plugin

Downloads

32

Readme

VHFinfo

VHF channel information based on GeoJSON data. Plugin for SignalK included.

Purpose

While sailing you're often expected to listen out certain VHF channels. Most of them can be found on the electronic maps, but not always in a handy way. And it requires you to know you have to look for it in advance.

By collection the VHF channel info together with coordinate information it's easy to display relevant information in the cockpit.

VHF example display

Format used

The information is collected as GeoJSON which holds both coordinates and properties.

Viewing information

see if certain VHF information is already present, you can look at the online map

Adding information

To add information you open the online map and locate the area you want to edit. Press the pencil icon in the top left corner to go to the edit page for that country.

Drawing the coordinates on the map

Goto one of the following country linke and draw the VHF channel area as a polygon. For different types there are different instructions for drawing:

Lock

Only draw the full locks chambers (typically rectangles). It's OK to cross over land for multiple chambers

Bridge

Only draw under the bridge, fully from side to side (typically rectangles)

Marina

Free figure polygon that covers only the (land and water if that's simpler) marina

VTS / VTS Radar support

Here it is important to cover the documented coordinates of the VTS as close as possible, so likely a polygon. In case of half circles on sea towards a port, it's ok to make it less detailed to reduce points)

Properties template

      "properties": {
        "name": "",           // Full name
        "callname": "",       // Short name typically used in call
        "type": "",           // ['Lock','Bridge','Marina','VTS','VTS Radar support', 'Territorial']
        "channel": ,          // VHF channel number
        "update": "5 *",      // Update bulletin (eg weather) in this VHF area in 'cron format'
        "vhfdata": {
          "generic": {
            "mode": "listen"  // Radio engagement level for this AIS ship/group type
                              // 'listen':    Listen out the channel for any calls or information
                              // 'announce':  Announce you are entering/leaving the area, or intend to pass bridge/lock
                              // 'report':    More than announce, as certain info is expected. See 'note' for details
            "url": "",        // URL with generic info like opening hours, approach guide etc. or in case of non-generic purpose
            "phone": ""       // Phone number in E.164 formatting
          }
          "pleasure": {       // AIS ship/group type as string. (https://coast.noaa.gov/data/marinecadastre/ais/VesselTypeCodes2018.pdf)
            "url":  ""        // URL aimed at pleasure ships
          },
          "passenger": {
            "note": ""        // Note aimed at passenger ships
          },
          "fishing": {
            "mode": "announce"  // Overwrites mode for fishing ships
          },
          "cargo": {
            "mode": "report",
            "note": "",         // Extra details on what to report
            "url":  ""          // URL aimed at cargo ships
          },
          "emergency": {
            "url":                  // Information for emergencies in this area
            "phone": ""             // Emergency phone number
          }
        }
      }
    }

Plugins

Plugins can be create separate from this repository and just use VHFinfo as database. Listing them here could make them easier to find.

SignalK

The plugin lets you configure the search 'beam' by specifying the length and angle as well as the SignalK path to write to. The plugin flow is as follows:

  1. Determine own location using navigation.position
  2. Draw a boundry box around the location with 100Nm (configurable) ribs
  3. Use countries_bbox.json to create bboxes and check if they intersect with the locationBox from step 2
  4. Read features from intersecting to see which intersect with locationBox from 2 and keep them in memory (featuresInBox)
  5. Use headingTrue, headingMagnetic, COG or bbox and location to create a searchPolygon 'beam' (or bbox) using the plugin config parameters
  6. Go through the features in featuresInBox and check if they intersect with searchPolygon
  7. Use result of 6 to calculate distance to each feature and sort by distance (negative distance means your located inside the feature)
  8. /plugin/vhfinfo/nearby can be called to pull the whole result set of 7.
  9. Write the nearest POI and VTS to the path configured in the plugin

API

The resulting nearby VHF info objects array can be queried here:

/plugins/vhfinfo/nearby

SignalK path

You can configure where the plugin writes the two nearest Point of Interest (lock, bridge, marina) and VTS (Vessel Traffic Service). This can be used together with the SignalK Instrument Display Plugin to display current VHF info on any display.