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.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Modify a NMEA183 sentence in Signal K (Solved without needing to modify)
#1
Hi,
I have a Stowe Databox connected via a NMEA to USB adapter to a PI 4.  All the NMEA sentences, except for one, are standard and display correctly in the data browser in Signal K and in the dashboard in Opencpn.
The non standard sentence is DBK.  It has an additional character in the first position.  Either an "A" if depth is live/correct or a "V" if it is last valid depth.  I need to strip the first field containing this character out of the sentence.
This seems easy enough if I ignore Signal k and run the serial input directly to Opencpn as the NMEAconverter plugin can modify NMEA sentences.
However I would like to stream all data through Signal K.  Is there a simple way to see the raw NMEA 183 data that Signal K is receiving and to modify it before SignalK parses it?
I see an option for Data fiddler.  Could  this be used to remove the first field?
Will I have to learn Node Red !!
Jodel

Subsequently noticed that the Stowe instruments also send DBT  (Depth below the transducer).
This sentence is standard and I use that instead of DBK.  As I have a lift keel boat there is very little difference between DBK and DBT when the keel is lifted.  When the keel is down, I know that I need about a metre below transducer to avoid touching the bottom.
Reply
#2
(2021-12-14, 12:09 AM)Jodel Wrote: Hi,
I have a Stowe Databox connected via a NMEA to USB adapter to a PI 4.  All the NMEA sentences, except for one, are standard and display correctly in the data browser in Signal K and in the dashboard in Opencpn.
The non standard sentence is DBK.  It has an additional character in the first position.  Either an "A" if depth is live/correct or a "V" if it is last valid depth.  I need to strip the first field containing this character out of the sentence.
This seems easy enough if I ignore Signal k and run the serial input directly to Opencpn as the NMEAconverter plugin can modify NMEA sentences.
However I would like to stream all data through Signal K.  Is there a simple way to see the raw NMEA 183 data that Signal K is receiving and to modify it before SignalK parses it?
I see an option for Data fiddler.  Could  this be used to remove the first field?
Will I have to learn Node Red !!
Jodel

I have worked around the problem.  I manually added direct connections to Opencpn in its connections tab and it reads the DBK sentence correctly. So now I have nothing going through Signal k, but my next step will be to route all the NMEA from  Opencpn to signal K .
This seems to be the reverse of the thinking in Openplotter but so far seems to work better for me.  Any disadvantages to this approach?
Jodel
Reply
#3
(2021-12-14, 05:01 PM)Jodel Wrote: I have worked around the problem.  I manually added direct connections to Opencpn in its connections tab and it reads the DBK sentence correctly. So now I have nothing going through Signal k, but my next step will be to route all the NMEA from  Opencpn to signal K .
This seems to be the reverse of the thinking in Openplotter but so far seems to work better for me.  Any disadvantages to this approach?
Jodel

If you plan to always be running opencpn when the Pi is on then should be OK. Might be worth an ask on the signalk slack channel> http://slack-invite.signalk.org/
They quite like the feedback. I thought every nmea sentence coming in went straight back out again on port 10110 but apparently not, my wind sensor sends some none standard ones which don't make it. Thanks for posting, it helps bringing obscure things like this to light  Cool
Reply
#4
(2021-12-15, 04:33 PM)PaddyB Wrote:
(2021-12-14, 05:01 PM)Jodel Wrote: I have worked around the problem.  I manually added direct connections to Opencpn in its connections tab and it reads the DBK sentence correctly. So now I have nothing going through Signal k, but my next step will be to route all the NMEA from  Opencpn to signal K .
This seems to be the reverse of the thinking in Openplotter but so far seems to work better for me.  Any disadvantages to this approach?
Jodel

If you plan to always be running opencpn when the Pi is on then should be OK. Might be worth an ask on the signalk slack channel> http://slack-invite.signalk.org/
They quite like the feedback. I thought every nmea sentence coming in went straight back out again on port 10110 but apparently not, my wind sensor sends some none standard ones which don't make it. Thanks for posting, it helps bringing obscure things like this to light  Cool

Thanks for that.  As I will be using the set-up purely in the context of navigation as opposed to monitoring sensors etc. I should be OK.  As I have the boat in commission on the water  about 15 mins. from my house I will be able to play around with the various options over the winter months. 
I was surprised that Opencpn dealt with the non standard NMEA DBK sentence and ignored the extra first field.
The Stowe instruments  that I have are probably considered obsolete now but as they are working well and put out all the data in NMEA 183 they are proving easy to integrate in Openplotter.
My next task is to input the route data from Opencpn to the Stowe Databox and see if it sends it out  with the other NMEA stuff.
JOdel
Reply
#5
(2021-12-15, 04:33 PM)PaddyB Wrote: I thought every nmea sentence coming in went straight back out again on port 10110 but apparently not, my wind sensor sends some none standard ones which don't make it. 

Hi, been digging a bit deeper, it looks like I was wrong, all nmea sentences received should go straight out again. The wind sentences I was looking at are >
$PLCJ,73C5,4D36,32,6283,8272

Seems the reason they weren't getting sent out is because the checksum is wrong, actually missing. There's a switch in the signalk connections setup to validate the checksum , with that off and opencpn control checksum unticked the messages show up in opencpn nmea debug window. 

Could it be your DBK sentence has a wrong checksum? Do you have an actual message copied we could look at? 
Reply
#6
(2021-12-16, 07:41 PM)PaddyB Wrote:
(2021-12-15, 04:33 PM)PaddyB Wrote: I thought every nmea sentence coming in went straight back out again on port 10110 but apparently not, my wind sensor sends some none standard ones which don't make it. 

Hi, been digging a bit deeper, it looks like I was wrong, all nmea sentences received should go straight out again. The wind sentences I was looking at are >
$PLCJ,73C5,4D36,32,6283,8272

Seems the reason they weren't getting sent out is because the checksum is wrong, actually missing. There's a switch in the signalk connections setup to validate the checksum , with that off and opencpn control checksum unticked the messages show up in opencpn nmea debug window. 

Could it be your DBK sentence has a wrong checksum? Do you have an actual message copied we could look at? 

In my case the DBK sentence has an "A" or a "V" in the first field. This I understand is non-standard.  Opencpn seem to ignore it and prints the correct depth on its dashboard if I make the connection directly in opencpn.  If I connect to Signal K, its data browser shows zero for depth.  I'll take a copy of a Stowe DBK sentence next time I am on the boat.

Somewhat related,  I have two NMEA to usb adapters.  One works and the other seems not to.
Any recommendations for  adapters for both in and out that work well with Openplotter.?
Would a RS 232 to USB be sufficient?

Jodel


Jodel
Reply
#7
Jodel,

Have you configured OpenCPN to send info back to SignalK? many people configure a UDP connection back to SignalK from OpenCPN to send route information that OpenCPN is calculating (usually only transmitting RMB, XTE, APB) in your case it may be worthwhile seeing if the DBK sentence is corrected when OCPN sends it back out
Reply
#8
(2021-12-19, 09:36 PM)Jodel Wrote: In my case the DBK sentence has an "A" or a "V" in the first field. This I understand is non-standard.  Opencpn seem to ignore it and prints the correct depth on its dashboard if I make the connection directly in opencpn.  If I connect to Signal K, its data browser shows zero for depth.  I'll take a copy of a Stowe DBK sentence next time I am on the boat.

Just had another play - a non standard nmea sentence gets passed straight through to port 10110, though you may need to deselect the validate checksum option. Seems very strange that opencpn displays DBK in the dashboard? I can only get that to work using a $**dpt sentence. 
DBK does show up in the opencpn nmea debug window after going through signalk. 
Node red could make any sentence you want, which might be the way to go. 


https://opencpn.org/wiki/dokuwiki/doku.p..._sentences
Dashboard Plugin[/url]

Dashboard Plugin recognized NMEA 0183 sentences[url=https://opencpn.org/wiki/dokuwiki/doku.php?id=opencpn:opencpn_user_manual:advanced_features:nmea_sentences#dashboard_plugin_recognized_nmea_0183_sentences]
  • DBT - Depth Below Transducer
  • DPT - Depth of Water
  • GGA - Global Positioning System Fix Data
  • GLL - Geographic Position - Latitude/Longitude HDG Heading - Deviation & Variation
  • GSV - Satellites in view
  • HDM - Heading - Magnetic
  • HDT - Heading - True
  • MTA - Air Temperature (obsolete)
  • MDA - Meteorological Composite (obsolete) -see below
  • MTW - Mean Temperature of Water
  • VLW - Distance Traveled through Water
  • MWD - Wind Direction & Speed
  • MWV - Wind Speed and Angle
  • RMC - Recommended Minimum Navigation Information
  • RSA - Rudder Sensor Angle
  • VHW - Water speed and heading
  • VTG - Track made good and Ground speed
  • VWR - Relative Wind Speed and Angle
  • VWT - True Windspeed and Angle (obsolete)
  • XDR - Transducer Values - see below
  • ZDA - Time & Date - UTC, day, month, year and local time zone
Reply
#9
(2021-12-20, 04:18 AM)Techstyle Wrote: Jodel,

Have you configured OpenCPN to send info back to SignalK? many people configure a UDP connection back to SignalK from OpenCPN to send route information that OpenCPN is calculating (usually only transmitting RMB, XTE, APB) in your case it may be worthwhile seeing if the DBK sentence is corrected when OCPN sends it back out

Hi,
I am also working at the moment on connecting a NASA GPS repeater to Opencpn and am having some problems also with the sentence format.  I have another thread running on that.  https://forum.openmarine.net/showthread.php?tid=3811
I have only one working NMEA to usb adapter at the moment.(plus one on order).  I think I will be able to get everything working in OpenCPN as I am used to its Connection tab, the NMEA debugger and the filtering.  I am not sure how to do all that stuff in Signal K.
When I get OpenCPN working with all the correct data I intend to do as you suggest - send it all to Signal K so that I can have connections from my tablet and browse various dashboards.
Jodel
Reply
#10
Hi,
After a lot of experimentation I have reverted to streaming everything through SignalK.
The big advantage was the ease of setting up KIP to have it display dashboards in a browser.
The only data coming from OpenCpn now is the route data RMB and RMC.
I have the connection from SignalK to OpenCpn coming through TCP as opposed to using the signalk protocol.
This means I can see it in the Debug window and also filter RMB and RMC from looping.
It is now all working as I want. Openplotter is so versatile particularly if a little effort is put in to understanding how it all hangs together! Smile
Jodel
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)