Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 07-01-2016, 16:52   #1
Registered User

Join Date: Nov 2007
Location: Probably in an anchorage or a boatyard..
Boat: Ebbtide 33' steel cutter
Posts: 3,537
MWV sentences not working in dashboard

I have a Nasa NMEA wind sensor - Accessories: NASA Marine Instruments

Connected to opencpn I can see these sentences coming in the nmea debug window.

Code:
$WIMWV,27,R,00,N,A*0C
$YXXDR,C,22,C*49
$WIMWV,27,R,00,N,A*0C
$YXXDR,C,22,C*49
$WIMWV,27,R,00,N,A*0C
$YXXDR,C,22,C*49
In the dashboard, however, I can't get anything showing with any of the apparent wind or true wind instruments.

I must be doing something wrong, or is the data badly formatted?

Any ideas? VDR file attached
nasa_sensor.txt.pdf
TIA
__________________

__________________
conachair is offline   Reply With Quote
Old 07-01-2016, 17:43   #2
Registered User

Join Date: Nov 2007
Location: Probably in an anchorage or a boatyard..
Boat: Ebbtide 33' steel cutter
Posts: 3,537
Re: MWV sentences not working in dashboard

Think I *might* have found the issue - google came up with some example MWV sentences which worked when played back through the VDR ..
$WIMWV,200.0,R,11.0,N,A*11

Almost the same but the degrees and windspeed are to 1 decimal place.

The nasa is just integers without the trailing ".0"

That's annoying, but not the end of the world as it will be going through an arduino anyway which should be able to add those in on the way.
__________________

__________________
conachair is offline   Reply With Quote
Old 08-01-2016, 00:36   #3
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 1,967
Re: MWV sentences not working in dashboard

conachair..
Very good. Many thanks for sharing the info about the Nasa wind sensor. I've that one on my list for a possible replacement. The prize is not bad. Now I know what to do if I go for that one.
Håkan
__________________
Hakan is offline   Reply With Quote
Old 08-01-2016, 01:55   #4
Registered User

Join Date: Nov 2007
Location: Probably in an anchorage or a boatyard..
Boat: Ebbtide 33' steel cutter
Posts: 3,537
Re: MWV sentences not working in dashboard

If anyone knows an easy way to add ".0" to the data I'm all ears

First thoughts are to take the sentences apart with the arduino tinygps++ custom object then sticking them together again after adding the ".0" where required.

Assuming that is the problem....

TIA
__________________
conachair is offline   Reply With Quote
Old 08-01-2016, 02:17   #5
Marine Service Provider

Join Date: May 2013
Location: Norway
Posts: 571
Re: MWV sentences not working in dashboard

Quote:
Originally Posted by conachair View Post
If anyone knows an easy way to add ".0" to the data I'm all ears

First thoughts are to take the sentences apart with the arduino tinygps++ custom object then sticking them together again after adding the ".0" where required.

Assuming that is the problem....

TIA
Maybe the NMEA converter plugin will do the job ??
Plugins for OpenCPN 4.1 | Official OpenCPN Homepage
__________________
petter5 is offline   Reply With Quote
Old 08-01-2016, 04:07   #6
Registered User

Join Date: Nov 2007
Location: Probably in an anchorage or a boatyard..
Boat: Ebbtide 33' steel cutter
Posts: 3,537
Re: MWV sentences not working in dashboard

Quote:
Originally Posted by petter5 View Post
Maybe the NMEA converter plugin will do the job ??
Plugins for OpenCPN 4.1 | Official OpenCPN Homepage
Thanks, I hadn't thought of that one.

Close, it works "statically", if I use the repeat each second option with a fixed "old" sentence, the NMEA converter adds the extra ".0"'s automatically but doesn't seem to want to make a new MWV sentence from itself.
__________________
conachair is offline   Reply With Quote
Old 08-01-2016, 05:20   #7
Registered User

Join Date: Nov 2007
Location: Probably in an anchorage or a boatyard..
Boat: Ebbtide 33' steel cutter
Posts: 3,537
Re: MWV sentences not working in dashboard

Update - the data coming out of the nasa unit seems to have the wrong checksums. The decimal point was a red herring.

$WIMWV,27,R,00,N,A*0C should be...

$WIMWV,27,R,00,N,A*26


So looks like it definitely needs some processing before being useful.
__________________
conachair is offline   Reply With Quote
Old 08-01-2016, 06:03   #8
Registered User

Join Date: Jun 2015
Posts: 199
Re: MWV sentences not working in dashboard

Quote:
Originally Posted by conachair View Post
If anyone knows an easy way to add ".0" to the data I'm all ears

First thoughts are to take the sentences apart with the arduino tinygps++ custom object then sticking them together again after adding the ".0" where required.

Assuming that is the problem....

TIA
Too bad It's not the problem. How old is your instrument (still under warranty)? It's a known issue with some nasa Clipper Wind Sytem, at least since 2007.

Your instrument is computing the checksum with the '*' included and it's wrong...
For example replace

$WIMWV,32,R,00,N,A*08
with
$WIMWV,32,R,00,N,A*22

and it works, 22 is 8 XOR '*' in hexa

BTW there's no wind speed in your capture, is it normal?

options setting 'Control Checksum' doesn't help, dashboard plugin always computes and uses checksum.
__________________
did-g is offline   Reply With Quote
Old 08-01-2016, 07:06   #9
Registered User

Join Date: Nov 2007
Location: Probably in an anchorage or a boatyard..
Boat: Ebbtide 33' steel cutter
Posts: 3,537
Re: MWV sentences not working in dashboard

Quote:
Originally Posted by did-g View Post
Too bad It's not the problem. How old is your instrument (still under warranty)? It's a known issue with some nasa Clipper Wind Sytem, at least since 2007.
Good few years old now, and in fairness is designed to work with their own display. I've a soft spot for nasa but they are cheap and cheerful so can't really complain much.


Quote:
Your instrument is computing the checksum with the '*' included and it's wrong...
For example replace

$WIMWV,32,R,00,N,A*08
with
$WIMWV,32,R,00,N,A*22

and it works, 22 is 8 XOR '*' in hexa
Well spotted!!!


Quote:
BTW there's no wind speed in your capture, is it normal?
Is when the sensor is sitting on the chart table, but definitely not outside


Quote:
options setting 'Control Checksum' doesn't help, dashboard plugin always computes and uses checksum.
Ah, I had a quick play with that and wondered why it wouldn't work turned off, thanks.

I wrote a quick arduino sketch with the correct checksum and all seems well with the dashboard when reading that data, so end of the day no great drama, the feed would go though an arduino anyway after the display so a few lines of code should make it well behaved again.


Quote:
/*

This example code is in the public domain.
*/
String NMEA0Deg="WIMWV,0,R,00,N,A";
String NMEA90Deg="WIMWV,90,R,05,N,A";
String NMEA180Deg="WIMWV,180,R,10,N,A";
String NMEA270Deg="WIMWV,270,R,15,N,A";
int CheckSum;


// the setup routine runs once when you press reset:
void setup() {
// initialize serial communication at 9600 bits per second:
Serial.begin(4800);

}

// the loop routine runs over and over again forever:
void loop() {

CheckSum=checkSum(NMEA0Deg);
String NMEA0DegOut="$" + NMEA0Deg + "*" + String(CheckSum, HEX);
Serial.println(NMEA0DegOut);

delay(1000);

CheckSum=checkSum(NMEA90Deg);
String NMEA90DegOut="$" + NMEA90Deg + "*" + String(CheckSum, HEX);
Serial.println(NMEA90DegOut);


delay(1000);

CheckSum=checkSum(NMEA180Deg);
String NMEA180DegOut="$" + NMEA180Deg + "*" + String(CheckSum, HEX);
Serial.println(NMEA180DegOut);


delay(1000);

CheckSum=checkSum(NMEA270Deg);
String NMEA270DegOut="$" + NMEA270Deg + "*" + String(CheckSum, HEX);
Serial.println(NMEA270DegOut);

delay(1000);

}


//-----------------
char checkSum(String theseChars) {
char check = 0;
// iterate over the string, XOR each byte with the total sum:
for (int c = 0; c < theseChars.length(); c++) {
check = char(check ^ theseChars.charAt(c));
}
// return the result
return check;
}
__________________
conachair is offline   Reply With Quote
Old 09-12-2017, 22:39   #10
Registered User

Join Date: Dec 2017
Posts: 1
Smile Re: MWV sentences not working in dashboard

Hi, got a similar problem trying to feed an NMEA WMV from an Arduino into a NASA Meteoman. It was just not responding. I was trying to emulate the NASA wind sensor output (3wire) to see if the problem was in the Meteoman before climbing the mast.

In the end I found out I had to 'invert' the TX signal to get it to work.

Now I have to climb the mast and find why the wind sensor is not working.


//**************************************************

#include <SoftwareSerial.h> CR = 13 LF = 10
SoftwareSerial altSerial(8, 9, 1); // RX=8, TX=9, Invert=YES
// ***************
String sensordata1 ="$WIMWV,316,R,6.8,N,A*37";
String sensordata2 ="$YXXDR,C,26,C*4D";
String sensordata3 ="$WIMWV,247,R,14.1,N,A*08";
String sensordata4 ="$YXXDR,C,26,C*4D";
String sensordata5 ="$WIMWV,250,R,20.9,N,A*01";
String sensordata6 ="$YXXDR,C,26,C*4D";
String sensordata7 ="$WIMWV,282,R,24.7,N,A*04";
String sensordata8 ="$YXXDR,C,26,C*4D";
String sensordata9 ="$WIMWV,321,R,26.3,N,A*0A";
String sensordata10 ="$YXXDR,C,26,C*4D";


/* =============================================*/
void setup() {
/* ============================================ */

altSerial.begin(4800);
delay(1000);

while (!altSerial) {
; // wait for serial port to connect. Needed for native USB port only
}
}

/* ============================================ */
void loop(){
/* ============================================ */

while (altSerial.available() <= 0)
{
altSerial.println(sensordata1);
altSerial.println(sensordata2);
altSerial.println(sensordata3);
altSerial.println(sensordata4);
altSerial.println(sensordata5);
altSerial.println(sensordata6);
altSerial.println(sensordata7);
altSerial.println(sensordata8);
altSerial.println(sensordata9);
altSerial.println(sensordata10);
}

}
__________________
mwau032 is offline   Reply With Quote
Old 10-12-2017, 02:00   #11
Registered User

Join Date: Nov 2007
Location: Probably in an anchorage or a boatyard..
Boat: Ebbtide 33' steel cutter
Posts: 3,537
Re: MWV sentences not working in dashboard

Quote:
Originally Posted by mwau032 View Post

In the end I found out I had to 'invert' the TX signal to get it to work
That's because the arduino serial works on TTL which is different to rs232 NMEA 0183 which the nasa works on, there are other differences but inverted logic is one.
Better off with a rs232/ttl adaptor from eBay which will look after voltage differences as well.
Same listening to the NASA sensor, the voltages it uses might not work with the arduino software serial library straight onto a pin, might even blow the pin if you are unlucky.
Also, I have an older nasa wind sensor which sends the wrong nmea checksum, it works going into the meteoman but some other kit might not be so forgiving. I have a bit of arduino code somewhere to replace the checksum with a correct one , I'll post later if I can find it.(edit - found it, it's 2 posts up )
__________________

__________________
conachair is offline   Reply With Quote
Reply

Tags
enc

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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
NMEA AIS Sentences with Tag block. O 4.0 Do not show AIS targets. Gilletarom OpenCPN 4 08-12-2015 11:35
OpenCPN 3.3.xxxx and plugins : NMEA sentences list ? Gilletarom OpenCPN 17 01-05-2014 07:02
OpenCPN not sending NMEA autopilot sentences. Islander OpenCPN 6 16-04-2014 08:02
dashboard water temp (not metric?? RickyEM OpenCPN 0 12-05-2013 14:31
Which NMEA Sentences Does an Autopilot Use ? svpresent Marine Electronics 7 17-09-2010 03:21



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 06:48.


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.