Giter Site home page Giter Site logo

signalk / freeboard-sk Goto Github PK

View Code? Open in Web Editor NEW
32.0 19.0 27.0 62.21 MB

Chartplotter implementation for Signal K servers

License: Apache License 2.0

JavaScript 0.23% HTML 21.36% CSS 2.37% TypeScript 75.48% SCSS 0.57%
freeboard chart chartplotter signalk

freeboard-sk's Introduction

Freeboard-SK

Freeboard-SK is a stateless, multi-station, Openlayers based chart plotter for Signal K. Use it to display:

  • Resources (i.e. routes, waypoints, notes, charts, etc)
  • Alarms & notifications
  • AIS information
  • Weather information
  • Signal K instrument WebApps.

and more from any web enabled device.

screen

Features:

Vessel / Chart Display:

Moving map display with:

  • Multiple chart overlay using both of online and locally served charts
  • Built in support (no plugin required) for OpenStreetMap and OpenSeaMap(from Signal K server)
  • North-up / Vessel-up orientation
  • Moving Map / Moving Vessel
  • Vessel Heading / Bearing lines
  • Wind True / Apparent display
  • Closest point of approach

and more.

Charts are sourced from the /resources/charts path on the Signal K server and the following chart types / sources are supported:


Resources:

Freeboard-SK supports the creation, editing and deletion of all resource types defined in the Signal K specification that are available under the /resources path.

Routes and Waypoints:

Path(s): /resources/routes, /resources/waypoints

  • Show / Hide Routes & Waypoints
  • Set a Waypoint as a destination
  • Set an active Route
  • Select destination point along an Active Route
  • Create / Edit / Delete Routes
  • Create / Edit / Delete Waypoints
  • Create Waypoint at current vessel position
  • Import Routes and Waypoints from GPX files
  • Attach Notes to Routes & Waypoints

Notes and Regions:

Path(s): /resources/notes, /resources/regions

  • Display Notes and Regions
  • View / Edit Note properties
  • Draw Regions and attach Notes
  • Add / Edit / Delete Notes
  • Attach Notes to Regions

Tracks:

Whilst not specifically defined in the Signal K specification, Freeboard-SK supports the import and display of tracks from GPX files which are available under the /resources/tracks path.

  • Show / Hide Tracks
  • Delete Tracks

Alarms and Notifications:

Freeboard-SK can display alarms (visual and audio) & messages contained in Notification messages transmitted by the Signal K server.

Additionally you can set alarms, including anchor watch, as well as raise alarms such as man overboard, sinking, etc directly from the user interface.

Supported alarm types include:

  • Depth
  • Closest Approach
  • Anchor drag / watch
  • "Buddy" notifications
  • All Signal K specification defined alarms.

Freeboard-SK also implements API endpoints to accept requests for raising and clearing Signal K specification defined alarms.

See OpenAPI documentation in Signal K Server Admin UI for details.


History Playback

Freeboard-SK supports the Siganl K playback api and can replay recorded time-series data captured on a Signal K server equipped with the signalk-to-infludb plugin.


Instruments:

Freeboard-SK allows you to use your favourite instrumentation apps installed on the Signal K server.

Select one or more installed applications listed in the settings screen and they will displayed in the instrument drawer.

When more than one app is selected you can cycle through them within the instrument drawer.

Note: The Signal K Instrument Panel app will be displayed if no user selection has been made.

instruments


S57 Charts

Freeboard-SK is able to display S57 ENC charts that have been converted to vector tiles with s57-tiler. (See the README for instructions how to create the vectortiles from downloaded S57 ENC's.)

See Open CPN chart sources for a list of locations to source charts.

Note: Only unencrypted ENC's are supported (no S63 support).

Requires: @signalk/charts-plugin

S57 chart

Rendering of the Shallow, safety and deep depths and can be configured in the settings dialog

S57 Settings

Note: This functionality is not a replacement for official navigational charts


Experiments:

Features that are not ready for "prime time" are made available as experiments.

To make experimental features available from within the Freeboard-SK user interface, you need to ensure the Experimental Features option is checked in Settings.

Note: Some experiments will require configuration of Freeboard-SK via the Plugin Config screen of the Signal K Server Admin UI.


System Requirements:

Freeboard-SK requires _Signal K Server Version 2.0 or above.

The following features require that the Signal K server have plugins / providers installed to service the following paths:

  • resources/charts - Ability to view charts.

  • navigation/anchor, notifications/navigation/anchor - Ability to set anchor alarm and display notifications.

  • notifications/environment/depth - Display depth notifications.

  • signalk/v1/playback (Playback API) - Replay of recorded vessel data.

  • vessels/self/track - Display of vessel track stored on server.

  • vessels/self/navigation/course/calcValues - Display of calculated course values such as DTG, XTE, etc.

Recommended Plugins:

The following plugins are recommended for the Signal K node server to enable full functionality:

  • @signalk/charts-plugin (Charts provider)
  • signalk-pmtiles-plugin (ProtoMaps chart provider)
  • signalk-anchoralarm-plugin (anchor alarm settings & notifications)
  • signalk-simple-notifications (depth alarm notifications)
  • @signalk/course-provider (course calculations e.g. XTE, DTG, etc.)

Development:

Freeboard-SK is an Angular project.

It is recommended that the Angular CLI be installed globally npm i -g @angular/cli@latest prior to following the steps below.

  1. Clone this repository.

  2. Run npm i to install project dependencies. Note: this will also build the project placing the deployable application files in the public folder.

  3. Run npm start or ng serve to start a development web server and then navigate to http://localhost:4200/ to load the application. The application will automatically reload once you save changes to any of the source files.

Note:

The Freeboard-SK application will look to connect to a Signal K server at the ip address:port contained in the url of your browser.

In development mode you are able to specify the Signal K server host address and port you wish to connect to by editing the DEV_SERVER object in the src/app.info.ts file.

DEV_SERVER { 
    host: '192.168.99.100', 
    port; 3000, 
    ssl: false 
}

Note: These settings apply in Development Mode only!

They will NOT apply when using Production Mode, the generated application will attempt to connect to a Signal K api / stream on the hosting server.


Building a Release:

Building the Application:

To build all components of the application (plugin and webapp) ready for release use the npm run build:prod command.

Building components individually:

  • To build only the webapp use the command npm run build:web.
  • To build only the helper plugin use the command npm run build:helper.

Built files (for deployment) are placed in the following folders:

  • /public (Freeboard-SK web app)
  • /plugin (Freeboard-SK plugin)

Building the NPM package:

To build the NPM package use the npm pack command to:

  1. Execute npm run build:prod
  2. Create the NPM package (.tgz) file in the root folder of the project.

Freeboard-SK is a port of http://www.42.co.nz/freeboard for use with Signal K communication protocols and server features.

freeboard-sk's People

Contributors

chacal avatar joabakk avatar panaaj avatar rberliner avatar rob42 avatar sbender9 avatar tkurki avatar wdantuma avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

freeboard-sk's Issues

Doesnt recognise self

The latest code seems to be confused when trying to identify your own vessel, and will post it as an AIS target instead. This is because the code expects the selfId to just be the uuid, whereas it actually comes in as 'vessels'.uuid
There could be a number of fixes, but the quickest seems to be to change line 211 in index.js from:

window.ownVessel = data

to something like:

window.ownVessel = data.split(".")[1]

AIS vessel timeout

As some AIs data may be old, or vessel switch off their transponders, there should be a timeout for indicating old positions. A question mark over the vessel arrow, grey icon or something.

FeatureRequest: Download Routes

It would be neat to download the routes in gpx or kml format.

Also, when it comes to navigation software, I think routes are usually a list waypoints you plan to travel and "tracks" may be a more appropriate term for the historical location data?

Adding waypoint in prerelease 1.0.0

Hi,

In trying to add a waypoint at the vessel position or to drop a waypoint using the cursor, I am seeing an error
image

Is this a problem with my server config? I am running sk node server v1.7.0 and added the latest prerelease (v1.0.0) using 'npm install...'

bug: wrong path to routes

I get catcher.js:197 GET http://172.29.128.22/signalk/v1/api/resources/routes/routes 404 (Not Found), seems like a duplication (http://172.29.128.22/signalk/v1/api/resources/routes is valid)

[feature] Add wind indicators to Other Vessels when available

At a scale that allows for the chart display to encompass up to 3-4nm, add wind indicator/heading/course lines to the sk-enabled AIS targets that provide such data.

Exchanging data between between vessels is enabled by signalk and plugins. This means that sailing clubs can streamline their operations on the water by automating the exchange of wind sensor data. With this data displayed on a chart for race committee officials, accuracy is improved and radio communications traffic is reduced.

freeboard-sk already displays AIS targets' position and vessel name/mmsi. This new feature would add wind indicator lines similar to those seen on the 'self' vessel for the ais targets that have the data available. Considering that the density of ais traffic is of course highly variable at this scale, it might be preferable to display these sk-enabled 'AIS+' targets in a different color scheme (orange or green shades?) or have an option to display them exclusively apart from standard ais targets.

FeatureRequest: Vessel position lock position for 'north up'

For 'vessel up', the vessel is positioned below centre, so you can see more of what is coming ahead. This does not make as much sense with 'north up'. Perhaps it could be centered or similarly positioned off center to the north if on a southerly route? Positioning so much to the opposite of the course may be a bit disturbing if on an unstable course

AIS vessels position wrong

I have made a plugin to retrieve AIS vessel data from MarineTraffic API. The positions are ok in the signal k tree and in maptracker:
image
But in freeboard-sk the vessel is placed 90 degrees to the south of the latitude:
image

Heading, bearing lines broken

The heading and bearing lines are broken for me as I do not yet use an electronic compass.

The code in freeboard-sk is a bit confusing and I don't know if it is wrong or if I don't understand it.

If the sentences navigation.headingTrue or navigation.headingMagnetic are never received, headingT and headingM are never calculated and the heading/bearing lines are not drawn.

The code uses an integer key, cog, to mark if the data is navigation.headingTrue (cog = 0), navigation.headingMagnetic (cog = 3), navigation.courseOverGroundMagnetic (cog = 2) or navigation.courseOverGroundTrue (cog = 1).

The way the code is written, the data with the largest cog value is written to the displays.

I believe that all of these navigation sentences should result in the calculation of headingT and headingM.

Possible miscalculation of AWA vector line ?

image

Attached image shows charplotter in heads up mode with the TWD matching the AWA reading on the instrumentpanel gauge. I was expecting that the green vector (AWA) should match the TWD vector since the 'vessel' is stationary.

[feature] Add +/- buttons for zooming.

Hi,

i'm trying to use freeboard. How I can to zoom in this WebAPP? I can't find "+"/"-" buttons. And I haven't any responce to "+"/"-" on keyboard. Only scrollmouse works fine....

Regards
free-x

Installation

Hi Rob,

I have been following your project and now I am moving to SK. I´m happy to see freeboard also moving to SK. But I can´t make sense of the installation procedure. If I already have a node server running, I should be able to install freeboard for SK directly?

Chart layers need attention

In panaaj/angular branch:
Chart layers need to be placed in a sorted order based on the chart scale parameter, The smaller scale chart goes to the top of the stack just below the vessel, draw,measure,etc layers.

This makes charts with more detail overlay those with less detail.

The map should have a white background layer at the bottom of the stack, and all chart layers should be transparent. This allows us to see the through a detailed chart to the next lrger scale chart giving a seamless effect across the viewport.

Looking for non existing chart scales

Great work in the transition. I have discovered that my old converted maps (TMS with tilemapresource.xml) still work, but they override the default maps even when there is no scale defined for my TMS maps. I have a set with zoom levels 5-10, but freeboard still wants to load these on top of OSM in zoom level 14. The tilemapresource.xml looks like this

	<TileMap version="1.0.0" tilemapservice="http://tms.osgeo.org/1.0.0">
	  <Title>temp.vrt</Title>
	  <Abstract></Abstract>
	  <SRS>EPSG:900913</SRS>
	  <BoundingBox minx="57.32652119567997" miny="3.51562499999999" maxx="62.91523299999943" maxy="9.14062498400509"/>
	  <Origin x="57.32652119567997" y="3.51562499999999"/>
	  <TileFormat width="256" height="256" mime-type="image/png" extension="png"/>
	  <TileSets profile="mercator">
	    <TileSet href="5" units-per-pixel="4891.96980937500030" order="5"/>
	    <TileSet href="6" units-per-pixel="2445.98490468750015" order="6"/>
	    <TileSet href="7" units-per-pixel="1222.99245234375007" order="7"/>
	    <TileSet href="8" units-per-pixel="611.49622617187504" order="8"/>
	    <TileSet href="9" units-per-pixel="305.74811308593752" order="9"/>
	    <TileSet href="10" units-per-pixel="152.87405654296876" order="10"/>
	  </TileSets>
	</TileMap>

The resulting screen looks like this

capture

UX: Have something to tell when there is no map loaded.

Friends of me where testing my chartplotter, and the falsely reported that freeboard-sk was broken

There was no internet connection or local charts in signalk-server at the time.
So they where only seeing a grey screen, tried to zoom and pan but "nothing moved". so they got confused into thinking it was not responding.

Althrou this is not a bug, it seem like it's not what people where expecting from it.

Maybe it should have a under layer with a small zoom 0 worldmap or a message that stipulate that no layer are displayed.

Server could not activate route

Hello

I am having a problem with freeboard-sk
When I try to activate a route, an error message 'Server could not Activate Route' occurs
I have tried both loading a GPX file, plus creating a route in freeboard-sk

I would be thankful if anyone can assist me. thanks

Andrew

enhancement: weather from grib or forecast images

Great work! I know it must be challenging to maintain what many think of as the replacement of the chart plotter. So take this request as merely a suggestion.
I think it would be a valuable extension to be able to overlay dynamic grib files or weather charts. I have some local current maps that I would like to use, but they do not fit in the normal chart structure because they are associated with a date and time. I'm thinking of something similar to the scroll bar in opencpn, where you can select a time for the overlay gribs to appear.

Use signalk-js-client and add universal functionality there

Freeboard-sk has the same basic functionality as most SK client apps: bootstrap server connection from /signalk, fetch self id and connect delta.

All this is available in signalk-js-client, where different utilities and connection related logic should migrate.

Freeboard already uses npm & bundling, so using the js client should not bee too hard.

Example: freeboard supports only uuid self id.

proxied via https support

Apparently the protocol is hard coded to ws - should take into account also the protocol where it was loaded from.

Unexpected subscribe message

Using v1.0.0, connecting to artemis server. The default subscribe message is:

{
	"subscribe": [{
		"path": "none",
		"playbackRate": -1.0,
		"period": 1000,
		"minPeriod": 1000,
		"format": "delta",
		"startTime": "1970-01-01T00:00:00.000Z",
		"policy": "ideal"
	}],
	"context": "vessels.self"
}

path=none caused a failure as its not a vaid signalk path. Is 'none' a valid request? I would normally use '*' or just "", which has an implicit * (in artemis at least)

playbackRate is not required for normal api, but doesnt hurt. -1.0 as value is reasonable, Ive done the same, but better if its not there.

startTime is also not needed. The default unix epoch start (1970) caused an attempt to playback from then :-) No value or blank would be better

Questions on usage

I had a few questions on installation and using freeboard-sk:

I have signalk-server-node already running on my system. Can I use that instead?
Can I run freeboard-sk on my linux machine, or does it have to be on Windows?
I've gotten through npm install and npm start, but what port is it listening on?

Thanks!

Unused ancient dependencies?

There appears to be some unused dependencies with very old version numbers like

  • "ws": "^0.7.1" (current 3.something, not useful in browser environment anyway)
  • "karma": "^0.13.15" (current 1.7.0)

Not being familiar with the code I just grepped for usages and found none, but did not start removing them.

These old versions use dependencies that use native extensions, which makes clunky to use with modern Node environment, like when installing freeboard with npm in Node server.

Waypoints are not saved correctly

The waypoints are currently saved with a put as follows:

{
	"jwtToken": "eyJhbGciOiJIUzUxMiJ9.eyJ....CgUqKz1HGUQ1FZuO7Q",
	"put": [{
		"path": "resources.waypoints",
		"value": {
			"urn:mrn:signalk:uuid:66d09101-ba07-4d35-96cc-fada83094f83": {
				"feature": {
					"geometry": {
						"coordinates": [173.24395051320428, -41.25098796004664],
						"type": "Point"
					},
					"id": "",
					"type": "Feature",
					"properties": {
						"name": "Nelson",
						"cmt": "Nelson Entrance"
					}
				},
				"position": {
					"latitude": -41.25098796004664,
					"longitude": 173.24395051320428
				}
			}
		},
		"timestamp": "2019-01-24T22:12:31.537Z"
	}]
}

The effect of this is to set the key resources.waypoints to the object in value.
While this works for one waypoint, if another is writtem it will overwrite the current one. The message should be:

{
	"jwtToken": "eyJhbGciOiJIUzUxMiJ9.eyJ....CgUqKz1HGUQ1FZuO7Q",
	"put": [{
		"path": "resources.waypoints.urn:mrn:signalk:uuid:66d09101-ba07-4d35-96cc-fada83094f83",
		"value": {
			"feature": {
				"geometry": {
					"coordinates": [173.24395051320428, -41.25098796004664],
					"type": "Point"
				},
				"id": "",
				"type": "Feature",
				"properties": {
					"name": "Nelson",
					"cmt": "Nelson Entrance"
				}
			},
			"position": {
				"latitude": -41.25098796004664,
				"longitude": 173.24395051320428
			}
		},
		"timestamp": "2019-01-24T22:12:31.537Z"
	}]
}

This creates a new waypoint named urn:mrn:signalk:uuid:66d09101-ba07-4d35-96cc-fada83094f83. As other waypoints are added/edited/deleted they wont affect this one.

A question: Offline-Maps

Is there a possibility of adding offline maps? I have tried multiple ways of offline maps using openlayers but have not found a possiblity. Maybe i am just making mistakes.

instruments in sidepanel use incorrect url

Using artemis server/firefox browser.

If I open freeboard-sk v1.0.7, go to settings, and set Kip as my instruments, refresh, then open the sidepanel, I get an error.

The current url is https://localhost:8443/@signalk/freeboard-sk/package/public/index.html
The attempted sidebar page is https://localhost:8443/Kip but the app actually exists at https://localhost:8443/@mxtommy/kip/, hence the failure. Same effect with other choices.

I could hardcode a redirect on the artemis server, but it would be better to have a more portable way to define available apps.

One way would be to allow {Name,url} pairs to be specified in freeboard-sk, or to make a call to /signalk/v1/app/list to get available app choices.

Some libs need updating

In panaaj/angular branch I get security alerts:

Known  high severity security vulnerability detected in cryptiles < 4.1.2 defined in package-lock.json.
--
package-lock.json update suggested: cryptiles ~> 4.1.2

and

Known high severity security vulnerability detected in parsejson <=0.0.3 defined in package-lock.json. 

Chart list is not working

From the left menu, I can see charts listed, but none of the buttons hide, show or delete seem to do anything

Should preferred heading value fall back to other available heading values?

Currently Freeboard allows the selection of a "preferred heading value" ( heading Magnetic or headingTrue) which it uses when both values are available.

If the preferred heading value=headingMagnetic but that value is not present in the received data and headingTrue is, freeboard will use the headingTrue value.

Is this this "falling back" appropriate behaviour or should no heading value be displayed / used if the preferred is not available?

Also if the preferred heading value is headingMagnetic should Freeboard assume that magnetic versions of other values be used as well e.g. environment.wind.directionMagnetic, etc?

bug?: looking for tilemapresources in wrong place

The error I get from the one map I have stored states that it is looking for [server]/signalk/v1/api/resources/charts/L6-8-24-24-8_1/%7Bz%7D/%7Bx%7D/%7By%7D/tilemapresource.xml

Shouldn't it look in [server]/signalk/v1/api/resources/charts/L6-8-24-24-8_1/tilemapresource.xml instead ? That is where freeboard-installer placed the xml file

Disabling OpenStreetMap

OpenStreetMap tiles are now always being fetched, even if you have area local map available and you are zoomed in and the local map covers it. With a constrained net connections this makes zero sense, as you use up resources to fetch something that is never shown.

How about treating OSM just like all the other chart layers, with the option not to show it?

Another optimisation would be to disable it when you have a raster map available and the viewport is within its bounding box. Doesn't work if the raster chart has transparent areas, though.

FeatureRequest: Add lay lines and integration with polar

SignalK/maptracker#15
Lay lines could come from performance.beatAngle and/or performance.gybeAngle. Any route suggestions would need a way to get the full polar table/diagram, not currently represented in the schema. Repeating the linked issue for clarity: Another great feature would be to be able to suggest routes based on vessel polar diagram. See http://zezo.org/sodebo/chart.pl? for example. this requires polars (obviously), grib files and a definition of coastlines, eg. from OpenStreetMap.

Chart handling

I know this is on the drawing board, I just wanted to share some thoughts. Instead of using radio buttons for each map instance, perhaps they could have check boxes, and that the plotter chooses the tile with the best resolution for the zoom level?

Using NOAA Quilted .mbtiles?

Hi,
I noted in another issue that we need to edit lib/addlayers in order to use other map formats. Does that extend to the .mbtiles that are now being quilted and distributed by NOAA? I see that these automatically appear in the Charts List, but I am not able to see anything when clicking Show/Hide buttons.

Stuck at loading screen (1.5.1)

After updating to version 1.5.1 (Signalk Server Node Version 1.17), my Webapp is stuck at the loading screen. Shift + reload does not help.

Enhancement - show more details on AIS targets

Close to my home there is a TV/Radio mast that apparently sends out AIS..
image

Other software interprets this differenty and show a little bit more info:

image

Close to Malmö we have this:
image
And around Landskrona som other kind of targets that does not show up i Freeboard.
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.