This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Why the wind instuments output MWV and not VMR
#1
Hello,

I am scratching my head on this as to my understanding any wind measuring device, reads apparent wind. Now what I read from the several devices' guides the devices output MWV (wind speed and angle), not VMR (Relative Wind Speed and Angle) sentences. Anybody knows why? Or maybe I am totally wrong about that?

To the point ...

BTW: assuming I'd need some multiplexer do you think it is possible to send NMEA sentences to RPi to convert the sequence (what way?) and send it back to the multiplexer to output it to TP?

Thanks in advance for help and suggestions,

Marek
S/Y Milonga
Jeanneau Fantasia 27
POL 18616, Gdańsk, POLAND
  Reply
#2
I think you are referring to VWR, not VMR sentence
I'm in the process of learning, too, but as far as I discovered I think you can convert it with node-red.
Right now I'm working (trying, in fact) at similar "issue", I'll let you know if I'll have some success Smile
Fair winds
- S/Y Haimana
  Reply
#3
(01-25-2020, 09:36 PM)BeMarek Wrote: Hello,

I am scratching my head on this as to my understanding any wind measuring device, reads apparent wind. Now what I read from the several devices' guides the devices output MWV (wind speed and angle), not VMR (Relative Wind Speed and Angle) sentences. Anybody knows why? 

MWV is recommended >
Quote:VWR - Relative (Apparent) Wind Speed and Angle NMEA 0183 Sentences Not Recommended for New Designs Approved by the NMEA 0183 Standard Committee as of October 1, 2008 Wind angle in relation to the vessel's heading and wind speed measured relative to the moving vessel. The use of $--MWV is recommended.
https://www.nmea.org/Assets/100108_nmea_...esigns.pdf

The 2nd field in MWV should be 'R' for apparent wind , 'T' for true wind. Just tried it sending a MWV to sigK with 'r' then 't', R gets mapped to environment.wind.angleApparent and 'T' to environment.wind.angleTrueWater. 

Quote:MWV Wind Speed and Angle 1 2 3 4 5 | | | | | $--MWV,x.x,a,x.x,a*hh
1) Wind Angle, 0 to 360 degrees
2) Reference, R = Relative, T = True
3) Wind Speed
4) Wind Speed Units, K/M/N
5) Status, A = Data Valid
6) Checksum 
  Reply
#4
(01-26-2020, 07:26 AM)PaddyB Wrote: The 2nd field in MWV should be 'R' for apparent wind , 'T' for true wind. Just tried it sending a MWV to sigK with 'r' then 't', R gets mapped to environment.wind.angleApparent and 'T' to environment.wind.angleTrueWater. 

Thank you for the explanation. The document from nmea.org is very informative.

I've sent an email to Autonnic with similar question and they answered that the sentence is as follows:

Quote:$WIMWV,aaa.a,R,ss.s,N,A*hhhhh<CR><LF>


So there is an R here which looks good. Now I just need to cross my fingers that my old good Navico TP200cx will interpret it correctly. In the guide they state:


Quote:The TP20 & TP30 also extracts the apparent wind angle from the following NMEA0183 sentences -
VWR Apparent Wind Speed & Angle
MWV Wind Speed & Angle

This resulted me going into initial confusion, but hopefully that will work as expected. BTW, the guy from Autonnic wrote that they could somehow change it in the device to make it talk with VWR if I wished.

Marek
S/Y Milonga
Jeanneau Fantasia 27
POL 18616, Gdańsk, POLAND
  Reply
#5
I played a little bit with node-red and finally I've got some expected output...
I managed to make node-red to "read" environment.wind.speedApparent and environment.wind.speedApparent and send as MWV sentence. 
It is made for MWV but will be very easy to change it to VWR, as you need. Just edit the MWV function

The node-red code, bellow. Just copy and paste it into node-red clipboard.
Code:
[{"id":"e4d4603d.6a578","type":"signalk-subscribe","z":"ee22123e.a5ff8","name":"windApparent","mode":"sendAll","flatten":true,"context":"vessels.self","path":"environment.wind.*Apparent","source":"","period":1000,"x":110,"y":40,"wires":[["e4f6bc29.01868"]],"outputLabels":["angle"]},{"id":"e4f6bc29.01868","type":"function","z":"ee22123e.a5ff8","name":"MWV","func":"var S = context.get(\"S\") || 0; //get from context or default to 0\nvar A = context.get(\"A\") || 0; //get from context or default to 0\n\nswitch (msg.topic){\n    case \"environment.wind.speedApparent\":\n        S = msg.payload; //payload NOT paydoad  :)\n        context.set(\"S\", S); //store in context for next time \n        break;\n    case \"environment.wind.angleApparent\":\n        A = msg.payload; //payload NOT paydoad  :)\n        context.set(\"A\", A); //store in context for next time \n        break;\n}\n\nmsg.temp = \"WIMWV,\" + A.toFixed(2) + \",R,\" + S.toFixed(2) + \",N,A\";\n\nvar nmea = msg.temp;\nvar checksum = 0; \n\nfor(var i = 0; i < nmea.length; i++) { \n  checksum = checksum ^ nmea.charCodeAt(i); \n}\nchecksum = checksum.toString(16);    //convert to hex\nnmea = '$' + nmea + '*' + checksum;  //make the full nmea sentence again\n\nmessage =  nmea + '\\r\\n';\n\nmsg.topic = \"WIMWV\";\nmsg.payload  = message;\nreturn msg;\n\n","outputs":1,"noerr":0,"x":290,"y":40,"wires":[["f6e4875e.141ea8"]]},{"id":"cbb96f97.6bade","type":"debug","z":"ee22123e.a5ff8","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":450,"y":100,"wires":[]},{"id":"1fa02e62.c03462","type":"signalk-send-nmea0183","z":"ee22123e.a5ff8","name":"","nmea0183Event":"nmea0183out","x":490,"y":140,"wires":[]},{"id":"f6e4875e.141ea8","type":"delay","z":"ee22123e.a5ff8","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":270,"y":140,"wires":[["1fa02e62.c03462","cbb96f97.6bade"]]}]

I also have to thanks to PaddyB for his help guiding me in the right direction.
Any comments and critics are welcome, this is my first node-red code and any hints will be appreciate it.

Fair winds,
Seb
- S/Y Haimana
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)