SignalK / signalk-to-nmea0183

Signal K Node server plugin to convert Signal K to NMEA 0183
Apache License 2.0
13 stars 28 forks source link

Missing VHW NMEA183 sentence with speed through water #72

Closed olewsaa closed 1 year ago

olewsaa commented 3 years ago

I do not get speed through water in OpenCPN when running the SignalK to NMEA183 converter. Most other data is OK. I'm using the converter to feed the Polar diagram recorder (also tested VDR, which works ok, but no STW). The speedThroughWater signalK works fine, display nicely on the instrument panel web app and OpenCPN dashboard. I do not find a tick box for VHW on the plugin config, but the file VHW.js exists and there is a reference to speedThroughWater in that file. I have also redirected the NMEA183 sentences to a file and searched for VHW without finding any.

It would be nice to have the Polar diagram based on speed though water in addition to speed over ground reference. Any possible fix for this ?

tkurki commented 3 years ago

It's there in demo.signalk.org. Are you absolutely sure it is missing?

(demo.signalk.org is behind authentication, so plugin config is not publicly accessible on purpose)

image

olewsaa commented 3 years ago

I have looked for it, but as the system is onboard and not here at home I cannot do it again. Did it undergo upgrades or additions lately ? Maybe I have a slightly older version. My versions seems to have the same as the figure in the git readme. The RPi onboard is not normally connected to the internet, only some time to time for upgrades etc. I have system at home where things are on-line and updated, there I find the VHW tick box. It might be a simple as an update ?

thompero commented 1 year ago

Even if the VHW is activaded in the tick box it is not present at serial interface. I'm using a Raspery with Pican-M to send nmea183 via serial port using Signalk Simulator. Most nmea sentenses are ok but not VHW (water speed and heading). E.g MWV, MWT, DBT and HDT are all ok. These I have in seriel inteface, tcp and Signalk Databrowser. The VHW values are present in the Signalk Databrowser but not in serial interface or tcp (using putty). Both Raspberry (Buster) and Signalk (v16.19.0, 9.2.0) were updated last week.

tkurki commented 1 year ago

VHW output requires these three data: https://github.com/SignalK/signalk-to-nmea0183/blob/master/sentences/VHW.js#L17

are they present in your data?

thompero commented 1 year ago

Nice with a fast answer :) I have checked my file and it has exactly the same content. I also have put the file You refered to in the directory instead of the original one and still the same result – no VHW at serial out.

tkurki commented 1 year ago

Not what i meant. Check in DataBrowser that you have all those three paths with data.

thompero commented 1 year ago

Sorry, my misstake! I commented away the two first data paths leaving only the Speed in the file and now I have it on the serial port. Signalk Simulator is only sending "Heading true".

thompero commented 1 year ago

To fast solution! The VHW is present at serial out but of course with wrong content. Is there a way to have the "Magnetic variation" from the Simulator? Any fix in some Simulator file?

tkurki commented 1 year ago

The order of the paths in the array correspond to the parameters of the function that follows https://github.com/SignalK/signalk-server/wiki/FAQ:-Frequently-Asked-Questions#how-to-add-missing-units-and-static-data-eg-displayname so commenting paths out will put the values in the wrong parameter.

But modifying the source code manually is anyway a poor way to do this, as it will get overwritten when updating to a future version and won't be there if you need to reinstall.

But https://github.com/SignalK/signalk-server/wiki/FAQ:-Frequently-Asked-Questions#how-to-add-missing-units-and-static-data-eg-displayname has instructions for adding missing (static) data, that would persist over signalk-to-nmea0183 updates and should be copied over to a new system if you need to reinstall.