Cruisers Forum
 


Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 14-03-2019, 14:19   #16
Registered User

Join Date: Feb 2019
Location: Cartagena, Spain
Boat: Furia 372 - 11.20m
Posts: 348
Re: Dashboard wind angle

Quote:
Originally Posted by nohal View Post
But we do have it there...
https://opencpn.org/wiki/dokuwiki/do...shboard_plugin

Should we duplicate the information from NMEA Revealed beyond listing the sentence? No, that we should not do, unless we can make it well and keep it up to date.
I think it's fine like that.
It is not about duplicating information. It is about exposing what sentences O processes.
Tehani is offline   Reply With Quote
Old 14-03-2019, 14:23   #17
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,208
Re: Dashboard wind angle

We do expose what sentences OpenCPN processes, including the now discussed MWV.
We do not need to duplicate the detailed information about their structure, that information is maintained elsewhere, in a completely sufficient way and all we need is reference the source of the information.
We do not have the manpower, and there is no need, to maintain a copy of the information, especially with zero added value.
nohal is offline   Reply With Quote
Old 14-03-2019, 14:25   #18
Registered User

Join Date: Feb 2019
Location: Cartagena, Spain
Boat: Furia 372 - 11.20m
Posts: 348
Re: Dashboard wind angle

Quote:
Originally Posted by nohal View Post
We do expose what sentences OpenCPN processes, including the now discussed MWV.
We do not need to duplicate the detailed information about their structure, that information is maintained elsewhere, in a completely sufficient way and all we need is reference the source of the information.
We do not have the manpower, and there is no need, to maintain a copy of the information, especially with zero added value.
We're saying the same, I'm slower, and sometimes I have to correct because I'm not a native English speaker.
Tehani is offline   Reply With Quote
Old 15-03-2019, 07:48   #19
Registered User

Join Date: Aug 2016
Location: ABC's
Boat: Prout Snowgoose 35
Posts: 1,756
Re: Dashboard wind angle

Quote:
Originally Posted by Tehani View Post
NMEA 0183 Sentences Not Recommended for New Designs
Approved by the NMEA 0183 Standard Committee as of October 1, 2008:

VWR - Relative (Apparent) Wind Speed and Angle
The use of $--MWV is recommended.

--------------------------------------------------------------------------
NMEA 0183 - Standard For Interfacing Marine Electronic Devices.
Version 3.01
January 1, 2002
MWV - Wind Speed and Angle:

$--MWV,x.x,a,x.x,a,A*hh<CR><LF>
Field 1: Wind angle, 0 to 359 degrees
From this it looks like VWR is much newer, so don't see why it wouldn't be recommended.

Anyhow. My wind data comes in from my N2K network and processed by OPcan.

It seems that the NMEA2000 sentences use negative for port and positive numbers for starboard. Kplex seems oblivious to this, and so when converting to NMEA01803 MWV sentences, just blindly uses the negative figures. The conversion for VWR appears to be better.
Attached Thumbnails
Click image for larger version

Name:	Screenshot 2019-03-15 at 15.43.04.jpg
Views:	83
Size:	77.8 KB
ID:	188054  
mikedefieslife is offline   Reply With Quote
Old 15-03-2019, 08:34   #20
cruiser

Join Date: Nov 2007
Location: Probably in an anchorage or a boatyard..
Boat: Ebbtide 33' steel cutter
Posts: 5,030
Re: Dashboard wind angle

Quote:
Originally Posted by mikedefieslife View Post
From this it looks like VWR is much newer, so don't see why it wouldn't be recommended.

Anyhow. My wind data comes in from my N2K network and processed by OPcan.

It seems that the NMEA2000 sentences use negative for port and positive numbers for starboard. Kplex seems oblivious to this, and so when converting to NMEA01803 MWV sentences, just blindly uses the negative figures. The conversion for VWR appears to be better.
Don't think Klex does any conversion, afaik signalk does that. I've had similar issues with openplotter environment.wind.angleApparent using the sigK - nmea converter plugin, solved by a little bit of node-red to convert from negative to 360deg then send as nmea0183 though sounds like a bug in the app, one day I'll ask on slack. Does OPcan auto convert to nmea?

conachair is offline   Reply With Quote
Old 15-03-2019, 10:42   #21
Registered User

Join Date: Aug 2016
Location: ABC's
Boat: Prout Snowgoose 35
Posts: 1,756
Re: Dashboard wind angle

Sorry, yes I meant SignalK not Kplex. No Opcan doesn't auto convert from what I can see (again my mistake about the processing). Canbot is used and converts the data in a json format that Signal K can read.
mikedefieslife is offline   Reply With Quote
Old 15-03-2019, 10:57   #22
cruiser

Join Date: Nov 2007
Location: Probably in an anchorage or a boatyard..
Boat: Ebbtide 33' steel cutter
Posts: 5,030
Re: Dashboard wind angle

Quote:
Originally Posted by mikedefieslife View Post
Sorry, yes I meant SignalK not Kplex. No Opcan doesn't auto convert from what I can see (again my mistake about the processing). Canbot is used and converts the data in a json format that Signal K can read.
Were you using the sigK to nmea app? I suspect the authors might be glad to hear of any inconsistencies so will get round to posting this to slack with as much info as poss.

Join the Signal K community on Slack!
conachair is offline   Reply With Quote
Old 15-03-2019, 11:12   #23
cruiser

Join Date: Nov 2007
Location: Probably in an anchorage or a boatyard..
Boat: Ebbtide 33' steel cutter
Posts: 5,030
Re: Dashboard wind angle

Very strange.......

Not doing it now, converts to 0 - 360deg, like the code says it should...
https://github.com/SignalK/signalk-t...tences/MWVR.js

Code:
nmea.radsToDeg(angle).toFixed(2),
conachair is offline   Reply With Quote
Old 15-03-2019, 13:08   #24
Registered User

Join Date: Feb 2019
Location: Cartagena, Spain
Boat: Furia 372 - 11.20m
Posts: 348
Re: Dashboard wind angle

Quote:
Originally Posted by mikedefieslife View Post
From this it looks like VWR is much newer, so don't see why it wouldn't be recommended.
VWR is a sentence not recommended. It is used by some old devices. I have experienced a lot about this.

Quote:
Originally Posted by mikedefieslife View Post
It seems that the NMEA2000 sentences use negative for port and positive numbers for starboard. Kplex seems oblivious to this, and so when converting to NMEA01803 MWV sentences, just blindly uses the negative figures. The conversion for VWR appears to be better.
It is not so simple, most angles in NMEA2000 are given without sign. Very few: For example Magnetic Variation (declination) and Rudder (commanded and position) are signed.

In any case, you can check this here:

https://github.com/canboat/canboat/b...analyzer/pgn.h

If you look for "wind angle" (PGN 130306), you will see that it sets false after RES_RADIANS. This "false" means that it is without a sign.
Another example: "Rudder position" (PGN 127245), you will see that says "true". This value is signed.
I have checked ALL the standard angles data (and some propietary) of this pgn.h. I can assure you that they are correct. (Garmin, Airmar, Raymarine and almost all of Simrad's match exactly).
I have only detected that Simrad has an error in his "magnetic variation".
Tehani is offline   Reply With Quote
Old 16-03-2019, 02:24   #25
Registered User

Join Date: Aug 2016
Location: ABC's
Boat: Prout Snowgoose 35
Posts: 1,756
Re: Dashboard wind angle

Quote:
Originally Posted by Tehani View Post
VWR is a sentence not recommended. It is used by some old devices. I have experienced a lot about this.



It is not so simple, most angles in NMEA2000 are given without sign. Very few: For example Magnetic Variation (declination) and Rudder (commanded and position) are signed.

In any case, you can check this here:

https://github.com/canboat/canboat/b...analyzer/pgn.h

If you look for "wind angle" (PGN 130306), you will see that it sets false after RES_RADIANS. This "false" means that it is without a sign.
Another example: "Rudder position" (PGN 127245), you will see that says "true". This value is signed.
I have checked ALL the standard angles data (and some propietary) of this pgn.h. I can assure you that they are correct. (Garmin, Airmar, Raymarine and almost all of Simrad's match exactly).
I have only detected that Simrad has an error in his "magnetic variation".
But in the image I posted above of the of the Signalk diagnostic input, the description for environment.wind.angleApparent specifically says Negative to port.

It is also listed this was in the signalk reference documentation.

Quote:
/vessels/<RegExp>/environment/wind/angleApparent

Units: rad (Radian)

Description: Apparent wind angle, negative to port
Appendix A: Keys Reference (Vessel) · Signal K Documentation

I'm afraid I'm not really technical enough to know much about it, but I'm had to post any requested outputs.
Attached Thumbnails
Click image for larger version

Name:	Screenshot 2019-03-16 at 10.18.39.jpg
Views:	74
Size:	78.4 KB
ID:	188150  
mikedefieslife is offline   Reply With Quote
Old 16-03-2019, 04:17   #26
Registered User

Join Date: Feb 2019
Location: Cartagena, Spain
Boat: Furia 372 - 11.20m
Posts: 348
Re: Dashboard wind angle

Quote:
Originally Posted by mikedefieslife View Post
But in the image I posted above of the of the Signalk diagnostic input, the description for environment.wind.angleApparent specifically says Negative to port.

It is also listed this was in the signalk reference documentation.
True, SignalK stores the wind angle with a sign. I saw only the name of the group.
The problem is here:
https://github.com/SignalK/signalk-t...tences/MWVR.js

MWVR calls the function nmea.radsToDeg (angle) .toFixed (2) "without correcting the sign, this can be done before conversion to degrees and before configuring the sentence:

*** if (angle <0) angle = angle + 2 * Math.PI
*** return nmea.toSentence ([
******** '$ INMWV',
******** nmea.radsToDeg (angle) .toFixed (2),
******** 'R',
******** speed.toFixed (2),
******** 'M',
******** 'TO'
****** ])

This effect will always be given, you will not be the only person to whom it happens. I think we should inform so that it is corrected.

José Luis
Tehani is offline   Reply With Quote
Old 16-03-2019, 04:32   #27
cruiser

Join Date: Nov 2007
Location: Probably in an anchorage or a boatyard..
Boat: Ebbtide 33' steel cutter
Posts: 5,030
Re: Dashboard wind angle

Quote:
Originally Posted by Tehani View Post
This effect will always be given, you will not be the only person to whom it happens. I think we should inform so that it is corrected.
s
Just asked on slack after creating the prob with a little node red sending random values >
conachair is offline   Reply With Quote
Old 16-03-2019, 04:46   #28
cruiser

Join Date: Nov 2007
Location: Probably in an anchorage or a boatyard..
Boat: Ebbtide 33' steel cutter
Posts: 5,030
Re: Dashboard wind angle

Quote:
Originally Posted by Tehani View Post
*** if (angle <0) angle = angle + 2 * Math.PI
*** return nmea.toSentence ([
That seems to have fixed it, full marks

Added to the file MWVR.js in
/home/pi/.signalk/node_modules/@signalk/signalk-to-nmea0183/sentences
conachair is offline   Reply With Quote
Old 16-03-2019, 10:46   #29
Registered User

Join Date: Feb 2019
Location: Cartagena, Spain
Boat: Furia 372 - 11.20m
Posts: 348
Re: Dashboard wind angle

Quote:
Originally Posted by conachair View Post
That seems to have fixed it, full marks

Added to the file MWVR.js in
/home/pi/.signalk/node_modules/@signalk/signalk-to-nmea0183/sentences
Created a Pull Request.

https://github.com/SignalK/signalk-to-nmea0183/pulls

José Luis
Tehani is offline   Reply With Quote
Old 17-03-2019, 04:22   #30
cruiser

Join Date: Nov 2007
Location: Probably in an anchorage or a boatyard..
Boat: Ebbtide 33' steel cutter
Posts: 5,030
Re: Dashboard wind angle

Quote:
Originally Posted by Tehani View Post
Created a Pull Request.

https://github.com/SignalK/signalk-to-nmea0183/pulls

José Luis
And an update has been released, with a couple of new functions to create the positive 0-360. A few minutes to update signalk and restart. Isn't opensource wonderful
conachair is offline   Reply With Quote
Reply

Tags
wind


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sailing off wind angle - tack tick with ES7 Aloha_float Marine Electronics 5 28-08-2018 06:35
OpenCPN Manual on Ground Wind, True Wind, Apparent Wind Dockhead OpenCPN 11 15-08-2018 20:15
Calibration of wind instrument angle for Raymarine system? fxykty Marine Electronics 13 08-02-2018 15:26
OCPN receiving incorrect Apparent Wind Angle affinite OpenCPN 5 13-06-2016 01:22
different angle then, who loves their wind gen... charliehows Electrical: Batteries, Generators & Solar 4 16-04-2012 11:09

Advertise Here


All times are GMT -7. The time now is 15:28.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.