signalk-tides
v2.5.0
Published
Tidal predictions for the vessel's position, powered by Slackwater.
Maintainers
Readme
signalk-tides
A SignalK plugin that provides offline tidal predictions for the vessel's position, powered by Slackwater.
Since 2.0, predictions are computed locally from harmonic constituents — no network access or API keys required.
Installation
Install signalk-tides from the SignalK Appstore or manually by running npm install signalk-tides in the SignalK server directory (~/.signalk).
Usage
This plugin depends on navigation.position. When environment.depth.belowSurface is available, it also publishes tide-compensated depth.
It publishes the following tide data:
environment.tide.heightHighenvironment.tide.timeHighenvironment.tide.heightLowenvironment.tide.timeLowenvironment.tide.heightNowenvironment.tide.stationNameenvironment.tide.stationDistance— metres from the vessel to the station, when it was chosen by positionenvironment.tide.datum— the vertical datum the tide heights andenvironment.depth.belowChartDatumare measured from, such asMLLW,LATorCD. This is the tide station's chart datum. For the rare station without one it isMSL, and only the tide heights use it.environment.tide.state— tide trend,risingorfallingenvironment.tide.timeToNextExtreme— seconds until the next high or low water
For each environment.depth.belowSurface reading it publishes environment.depth.belowChartDatum, the depth below the datum named in environment.tide.datum. Charts for an area normally use the same datum as its tide stations, so you can compare this depth with charted soundings. That comparison doesn't hold when the station is far away or in another country's waters. The depth is null when the station has no chart datum.
Tides API
The plugin mounts the Slackwater API at /signalk/v2/api/tides, which serves station search, extremes, and timeline predictions. The synthetic station vessel/default resolves to the configured default station, or the nearest station with tide predictions within 100 km when none is set or the configured one has no predictions. With none in range, the plugin publishes no tide and says so in its status, and the API answers 404:
$ curl http://localhost:3000/signalk/v2/api/tides/stations/vessel/default/extremesTides resource
It also registers a tides resource, which returns the next 7 days of tide extremes for the vessel's position.
$ curl http://localhost:3000/signalk/v2/api/resources/tidesResponse
{
"datum": "MLLW",
"units": "meters",
"station": {
"id": "noaa/9414290",
"name": "San Francisco",
"latitude": 37.806,
"longitude": -122.465
},
"extremes": [
{ "time": "2025-03-29T00:45:00.000Z", "level": 0.025, "high": false, "low": true, "label": "Low" },
{ "time": "2025-03-29T07:20:00.000Z", "level": 1.928, "high": true, "low": false, "label": "High" }
]
}Chart plotter widget
The plugin offers a tide widget to chart plotters that support Signal K Plotter Extensions, such as Freeboard-SK. It shows the tide at the vessel's position: the level now with its trend, and the next high or low water, on the predicted curve. Tapping it opens the full Tides app in a panel beside the chart.
In Freeboard-SK, press and hold an empty spot in a corner of the chart (or right-click it and choose Add widget here) and pick Tides.
License
This plugin is a fork of the signalk-tides-api plugin (which is no longer working) and is licensed under the Apache License 2.0. Kudos to @joabakk and @sbender9 for the original work.
