Seatalk to nmea183 depth conversion?

Discussion and support for the Nmea4Wifi multiplexer - a 4-input Nmea 0183 wifi multiplexer.
Marchi
Posts: 7
Joined: Tue Apr 02, 2019 9:54 pm

Seatalk to nmea183 depth conversion?

Post by Marchi » Sun Apr 14, 2019 3:24 pm

Hi,
I completed instalation of nmea4wifi connected to Seatalk ST60 tridata+wind+autopilot instruments. After few atempts of TCP/UDP setup etc. I manage to get some input traffic on nmea debug window on OpenCpn and some data on dashbords. :)
I think the depth data is wrong because it shows 1766m in a 2m depth. ST60 showing 2m.
Also I've got only AWS and AWA data not TWS and TWA.
Where all data from Seatalk can be found/activated/filtered... What Seatalk to nmea compiler is capturing.

I'm new in nmea world, so sorry for beginers questions.

Congrats for great product!
Last edited by Marchi on Wed Apr 17, 2019 8:07 pm, edited 1 time in total.

Luis Sa
Site Admin
Posts: 843
Joined: Thu May 04, 2017 4:12 am

Re: Seatalk to nmea183

Post by Luis Sa » Sun Apr 14, 2019 6:57 pm

Hello Marchi,

Thank you for your message. I admit that it is not trivial to master the capabilities of the multiplexer. Regarding SeaTalk1 I note that it only translates SeaTalk1 >>> Nmea183 and not Nmea183 >>> SeaTalk1. I wrote the conversion software based on the public available description of the SeaTalk1 datagram. The software that the mutlplexer uses is available here:

viewtopic.php?f=6&t=80

I did not get feedback of wrong depth conversion but Iwill try to read my software again to see how 2m transforms into 1766.

I understand that you that only get apparent wind data. I am not an expert but I think that wind sensors only get apparent wind speed and angle and the instruments that receive that data will calculate the true data using heading data that they receive from other sensors or gps.

Regards, Luis

Luis Sa
Site Admin
Posts: 843
Joined: Thu May 04, 2017 4:12 am

Re: Seatalk to nmea183

Post by Luis Sa » Sun Apr 14, 2019 7:09 pm

Hello again Marchi,

I have a Windows programme that interacts with the multiplexer. I am not sure if OpenCPN can record (save into a file) Nmea data that it receives on a connection. My programme is capable of doing that. In order to debug the depth error it would be useful to get a file with the Nmea0183 received data so that i could examine the data. This is just an idea.

Regards, Luis

User avatar
schnapsy
Posts: 25
Joined: Wed Apr 03, 2019 8:19 am
Contact:

Re: Seatalk to nmea183

Post by schnapsy » Mon Apr 15, 2019 8:53 am

Hello all,

On OpenCPN, it is possible to record all the nmea data with the VDR plugin on a txt file.
Regards,
AlainS

Marchi
Posts: 7
Joined: Tue Apr 02, 2019 9:54 pm

Re: Seatalk to nmea183

Post by Marchi » Wed Apr 17, 2019 7:58 pm

Hello Luis!

I will get nmea log file as soon as I came back to the boat. I think this weekend :)
I'm not insisting that 1766m is the right number that is shown on depth dashboard, but it was some 4 digits number for shure. I will record the log file.

My setup is ST60 Seatalk1 out - multipexer input 4 - nmea183 wifi

I then receive the wifi nmea data on OpenCpn on Computer
and nmea data on some android app.

I also connect multiplexer nmea out to ST60 nmea in, to control autopilot. Didn't test this at the time.

Looking forward to research and test all features of your great device.

Luis Sa
Site Admin
Posts: 843
Joined: Thu May 04, 2017 4:12 am

Re: Seatalk to nmea183 depth conversion?

Post by Luis Sa » Wed Apr 17, 2019 8:56 pm

Hello,

Thank you and I hope you get it right! This weekend I will travel to Greece and my "availability" to participate in the forum is reduced as it depends on having internet and other things!

And also I will be replacing my old Nmea2Wifi multiplexer by a new Nmea4Wifi multiplexer on my own boat!n :D

Regards, Luis

Marchi
Posts: 7
Joined: Tue Apr 02, 2019 9:54 pm

Re: Seatalk to nmea183 depth conversion?

Post by Marchi » Fri Apr 19, 2019 7:49 pm

I just manage to take foto of nmea debug window. Hope you can see the nmea depth code.
Attachments
IMG_20190419_205929-1984x1120.jpg

Luis Sa
Site Admin
Posts: 843
Joined: Thu May 04, 2017 4:12 am

Re: Seatalk to nmea183 depth conversion?

Post by Luis Sa » Fri Apr 19, 2019 8:18 pm

Hello Marchi,

I am posting below the code that performs the translation of SeaTalk1 "Depth Below Transducer or DBT" to Nmea 0183. The resulting sentence starts with "$SDDBT,". In your screenshot I see: $SDDBT,,,1740.8,M,, (the *1C is a check sum and then is the CR LF termination).

I will try to research this in the next couple of hours. If I discover something I will post here, otherwise I will try again aboard MARGARIDA next week (my flight to Greece is tomorrow).

Regards, Luis

Code: Select all

// DBT using integers
// ==================
uint16_t Parse00() {
//  long time0 = micros();
  const char DBT[] = "$SDDBT,";
  uint16_t len = 0;
  len += sprintf(nmea_4, DBT);
  // now you can test the filtering
  if ( CheckNmeaFlt_4() == false ) { return 0; }  
  uint16_t ii = (ST[3] << 8) | ST[4] ;
  uint16_t DD = ii / 10;
  uint8_t F = ii - DD * 10;
  if ( ST[2] & 0x40 ) { // DephBT is meters
    len += sprintf(nmea_4 + len, ",,%u.%u,M,,*", DD, F );
  }
  else { // DephBT is feet
    len += sprintf(nmea_4 + len, "%u.%u,f,,,,*", DD, F );    
  }
  int XOR = checkSum( nmea_4 );
  len += sprintf(nmea_4 + len, "%.2X", XOR );
//  Serial.println( micros() - time0);
  return len + 1;
}

Luis Sa
Site Admin
Posts: 843
Joined: Thu May 04, 2017 4:12 am

Re: Seatalk to nmea183 depth conversion?

Post by Luis Sa » Fri Apr 19, 2019 10:17 pm

Hello again,

I spent the last 3 hours trying to figure out why you get 1740.8 meters. No success! :oops:

Here is the known descrition of the SeaTalk1 DBT datagram:

seatalk2.gif

Unfortunately I have to postpone this research. I just left it here for me to remember when I arrive in Greece. Or may be someone reading this, discover what is the problem :roll: . Also, if someone else is using the multiplexer with SeaTalk, I would kindly ask if you are getting this reported problem. Thanks in advance.

In order to solve this I would need to know the REAL 5 bytes SeaTalk datagram. The only thing that I can think is to write a programme for the multiplexer that instead of doing what it does would store or show the received SeaTalk datagrams on P4. I could send you an ESP32 that you would place in the socket instead of the one you have, just to get those values. But that would take some time. Another thing that would be useful was to have pair of values measured in the "field". Now I have 2m to compare to 1470.8m. If you can take note of different pair of values may be I could discover the pattern and the possible error.

Best Regards and sorry! Luis

Marchi
Posts: 7
Joined: Tue Apr 02, 2019 9:54 pm

Re: Seatalk to nmea183 depth conversion?

Post by Marchi » Sat Apr 20, 2019 10:52 am

1,6m = 1382,40
1,8m = 1510.40
1,9m = 1612,80
2,0m = 1740,80

With offset of 3,0m
4,8m = 4044,80

Offset of st60 is 0,0m, so for real depth you have to add some 40cm. But anyway, multiplex converting numbers from instrument and those should be the same.
Hope it'll help.

Im not going in to deeper water at the moment.
.

Post Reply