GithubHelp home page GithubHelp logo

signalk / freeboard-sk Goto Github PK

View Code? Open in Web Editor NEW
30.0 19.0 26.0 61.98 MB

Chartplotter implementation for Signal K servers

License: Apache License 2.0

JavaScript 0.23% HTML 21.60% CSS 2.40% TypeScript 75.18% SCSS 0.58%
freeboard chart chartplotter signalk

freeboard-sk's Introduction

Signal K

signal-k-logo-tagline

Signal K is a modern and open data format for marine use. Built on standard web technologies including JSON, WebSockets and HTTP, Signal K provides a method for sharing information in a way that is friendly to WiFi, cellphones, tablets and the Internet. A format available to everyone, where anyone can contribute, Signal K is the first truly open data format for the marine industry and is set to revolutionize how we consume and interact with data on boats.

https://signalk.org

freeboard-sk's People

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

Watchers

 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]

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)

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

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.

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

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

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.

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

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?

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

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?

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.

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!

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.

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.

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.

[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

proxied via https support

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

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.

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.

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

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?

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.

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

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

[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.

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.

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.

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.

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...'

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.

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.

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?

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.

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.