New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

freeboard-sk-helper

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

freeboard-sk-helper

Freeboard-SK helper plugin for SignalK Server.

  • 2.0.0-beta.1
  • beta
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
15
increased by7.14%
Maintainers
1
Weekly downloads
 
Created
Source

Freeboard-SK-Helper:

Signal K Server helper plugin for Freeboard-SK that acts as an API provider for the Signal K paths that are required to support Freeboard-SK operation and which may not be serviced by a Signal K server or installed plugins:


Note: this plugin may be used from time to time to provide functionality for experimental features that may become part of Feeboard-SK in the future.


Notifications / Alarms:

Facilitates the raising and clearing of the following Signal K special alarms:

notifications.mob (Man overboard)

notifications.fire

notifications.sinking

notifications.flooding

notifications.collision

notifications.grounding

notifications.listing

notifications.adrift

notifications.piracy

notifications.abandon

Notifications are sent with both visual and sound flags set.


Experiments:


1. PyPilot Integration

Provides the following functionality:

  1. Populates steering.autopilot.availableModes with array of modes retrieved from PyPilot.

  2. Get / set steering.autopilot.mode to one of the availableModes.

  3. Get / set steering.autopilot.state (enabled / disabled)


2. Weather service API (OpenWeather)

Provides the following functionality:

  1. Fetches current weather, forecasts and warnings from OpenWeather relative to the current vessel position.

  2. Exposes weather data under /signalk/v2/api/resources/weather.

  • /signalk/v2/api/resources/weather/observations
  • /signalk/v2/api/resources/weather/forecasts
  • /signalk/v2/api/resources/weather/warnings
  1. Emits a notification for weather warnings from the weather station closest to the vessel position -> notifications.environment.weather.warning

  2. Use HTTP GET to retrieve data

Configuration:

To fetch weather data you need to provide an OpenWeather apiKey in the plug-in configuration.

You can get your apiKey at https://openweathermap.org/home/sign_up

Usage:

At this time the plug-in provides forecast and observation data as a single virtual weather station with the id self to indicate that the weather data is retrieved from a weather station closest to the vessel position.

List weather stations providing observation data

  • HTTP GET /signalk/v2/api/resources/weather/observations
{
    "self": {
        "stationId":"vessel",
        "name":"Weather information relative to supplied position.",
        "position": {
            "latitude":-27.498,
            "longitude":153.0007
        }
    }
}

Retrieve observation data from self weather station

  • HTTP GET /signalk/v2/api/resources/weather/observations/self
[{
	"timestamp": "2022-05-13T05:14:45.000Z",
	"description": "light rain",
	"sunrise": "2022-05-12T20:19:59.000Z",
	"sunset": "2022-05-13T07:08:50.000Z",
	"uvIndex": {
		"value": 0.18,
		"units": null
	},
	"clouds": {
		"value": 100,
		"units": "%"
	},
	"visibility": {
		"value": 6000,
		"units": "m"
	},
	"temperature": {
		"air": {
			"value": 295.18,
			"units": "K"
		},
		"feelsLike": {
			"value": 295.87,
			"units": "K"
		},
		"dewPoint": {
			"value": 294,
			"units": "K"
		}
	},
	"pressure": {
		"value": {
			"value": 101300,
			"units": "Pa"
		}
	},
	"humidity": {
		"absolute": {
			"value": 93,
			"units": "%"
		}
	},
	"wind": {
		"speed": {
			"value": 7.72,
			"units": "m/s"
		},
		"direction": {
			"value": 1.0471975511965976,
			"units": "rad"
		}
	},
	"precipitation": {
		"rain": {
			"volume": {
				"value": 0.13,
				"units": "mm"
			}
		},
		"snow": {
			"volume": {
				"value": null,
				"units": "mm"
			}
		}
	}
}]

List weather stations providing forecast data

  • HTTP GET /signalk/v2/api/resources/weather/forecasts
{
    "self": {
        "stationId":"vessel",
        "name":"Weather information relative to supplied position.",
        "position": {
            "latitude":-27.498,
            "longitude":153.0007
        }
    }
}

Retrieve forecast data from self weather station

  • HTTP GET /signalk/v2/api/resources/weather/forecasts/self
[
    {
        "timestamp": "2022-05-13T05:00:00.000Z",
        "description": "light rain",
        "temperature": {
            "air": {
                "value": 295.18,
                "units": "K"
            },
            "feelsLike": {
                "value": 295.87,
                "units": "K"
            },
            "dewPoint": {
                "value": 294,
                "units": "K"
            }
        },
        "uvIndex": {
            "value": 0.18,
            "units": null
        },
        "clouds": {
            "value": 100,
            "units": "%"
        },
        "pop": {
            "value": 100,
            "units": "%"
        },
        "pressure": {
            "value": 101300,
            "units": "Pa"
        },
        "humidity": {
            "absolute": {
                "value": 93,
                "units": "%"
            }
        },
        "wind": {
            "speed": {
                "value": 4.02,
                "units": "m/s"
            },
            "direction": {
                "value": 1.117010721276371,
                "units": "rad"
            },
            "gust": {
                "value": 10.1,
                "units": "m/s"
            }
        },
        "precipitation": {
            "rain": {
                "volume": {
                    "value": 0.88,
                    "units": "mm"
                }
            },
            "snow": {
                "volume": {
                    "value": null,
                    "units": "mm"
                }
            }
        }
    }, 
    {
        "timestamp": "2022-05-13T05:00:00.000Z",
        ...
    },
    ...
]

List weather stations providing weather warnings

  • HTTP GET /signalk/v2/api/resources/weather/warnings
{
    "self": {
        "stationId":"vessel",
        "name":"Weather information relative to supplied position.",
        "position": {
            "latitude":-27.498,
            "longitude":153.0007
        }
    }
}

Retrieve weather warnings from self weather station

  • HTTP GET /signalk/v2/api/resources/weather/observations/self
[{
	"startTime": "2022-05-16T12:00:00.000Z",
	"endTime": "2022-05-16T12:00:00.000Z",
	"details": "Local thunderstorms, possibly with gusts (more than 60 km/h) and hail.\nBE AWARE that thunderstorms may occur.\n Take extra care in exposed areas, like mountains, forest and open terrain.\nDisruption to outdoor activities is possible.",
	"source": "KNMI Koninklijk Nederlands Meteorologisch Instituut",
	"type": "Moderate thunderstorm warning"
}]

Keywords

FAQs

Package last updated on 30 Jun 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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