Home        Store        Docs        Blog

Bugfix for NMEAinput.py from Waterlinked


(Bo Koppel) #1

Hi!
Just got info from Waterlinked that there was a bug in JSON part of there Python example script for sending position and heading from external NMEAsource to Waterlinked system.

Note that heading should be HDT string.
If You have input string as magnetic HDG or HDM, you can convert that to HDT for example with OpenCPN module NMEAconvert


#2

Hi Bo!

Do you think it would be valuable if the script also parsed HDG or HDM messages? Not sure how to best handle NMEA stream where multiple of these occur, maybe parameters/arguments to the script to select which one to use.


(Bo Koppel) #3

Hi @wlkh
Thanks for input!
Yes, I think it would be of use to have HDG and HDM handling in Waterlinked python example NMEA input.
In that way it will be easier to use a basic fluxgate compass to get better heading than the built in one.

One way to do that could be part in the Python module example where the HDG and HDM parts are comment marked (green and disabled) and easy to make active by taking out the comment marks (" ")
That means like You suggest above.

Alson I think that easiest is to skip input of deviation and earth magnetic error, just to use the input HDG or HDM as HDT without correction.

Bo


#4

Thanks for the feedback. I’ve added support for using either HDT, HDG or HDM in the script now: https://github.com/waterlinked/examples/commit/20cac7a5d9de3864c95ec777dab2f7d66a5ca6a1

You can specify with the -c parameter which one to use. For example -c hdm


(Bo Koppel) #5

Thanks, that was quick!


(Steven LE BARS) #6

Hi @wlkh ,

I tried the last GitHub version of InputNmea.py with my external heading sensor this week-end, it worked fine. Nonetheless, I do not understand how I can simultaneously get the input from my GPS and from my heading sensor as they come from 2 different serial ports. How should I modify the code to do so otherwise? Sorry, I am not a confirmed python developer.

  • one question I have always forgotten to ask you guys: is there any way to configure manually sound velocity in the waterlinked system? What is the default VOS considerered?

(Bo Koppel) #7

To have two serial inputs you need two hardware serial ports to input these NMEA sources as you write.
After inputting 2 streams you need to merge or matrix them.
Splitting or matrixing could easiest be done in a computer with separate software for that.
In the same software both NMEA sentences could be sent on as UDP network streams.
These streams could be sent to other computers, or to programs like Python in the same computer.
More info on this forum:
https://discuss.bluerobotics.com/search?q=nmea%20route