Allow NMEA 0183 file input/output - Printable Version +- OpenMarine (https://forum.openmarine.net) +-- Forum: OpenPlotter (https://forum.openmarine.net/forumdisplay.php?fid=1) +--- Forum: Feature Requests (https://forum.openmarine.net/forumdisplay.php?fid=5) +--- Thread: Allow NMEA 0183 file input/output (/showthread.php?tid=518) Pages:
1
2
|
Allow NMEA 0183 file input/output - abarrow - 2017-05-30 I wonder if it would be possible to include "file" as a type of input or output on the KPLEX tab. I have been able to edit the kplex.conf file directly to include this type, and it shows up on the list of NMEA devices, but if I double click on it and then close, OP eliminates it from the list. I'm trying to implement a way to convert an incoming non-checksummed NMEA string to something with a checksum. First step for me is to implement either a file or a named pipe as an output from kplex. Since it appears that it isn't persistent, I can't go much farther on that path using Openplotter. Allowing this might also provide a means of doing NMEA logging. RE: Allow NMEA 0183 file input/output - PaddyB - 2017-05-30 (2017-05-30, 10:12 PM)abarrow Wrote: I wonder if it would be possible to include "file" as a type of input or output on the KPLEX tab. I have been able to edit the kplex.conf file directly to include this type, and it shows up on the list of NMEA devices, but if I double click on it and then close, OP eliminates it from the list. Another one which would be a small flow for node-red, I actually have a old wind sensor which I fed through an arduino to calculate a correct checksum. If only I could figure out how to send NMEA sentences from node-red to kplex.............. RE: Allow NMEA 0183 file input/output - abarrow - 2017-05-30 (2017-05-30, 10:18 PM)PaddyB Wrote: Another one which would be a small flow for node-red, I actually have a old wind sensor which I fed through an arduino to calculate a correct checksum. I don't suppose you could share your Arduino code? At least I wouldn't have to start from scratch! RE: Allow NMEA 0183 file input/output - PaddyB - 2017-05-30 (2017-05-30, 10:48 PM)abarrow Wrote: I don't suppose you could share your Arduino code? At least I wouldn't have to start from scratch! Here are the 2 arduino functions which did the work.. Quote:String parseNmea(String nmeaBad)I was actually just having a look at node-red function but couldn't get it to work, javascript makes my head hurt : Still failing at sending an nmea sentence to kplex from node red as well. Oh well. : RE: Allow NMEA 0183 file input/output - abarrow - 2017-05-31 Thanks! RE: Allow NMEA 0183 file input/output - PaddyB - 2017-05-31 (2017-05-31, 12:09 AM)abarrow Wrote: Thanks! OK, getting somewhere To strip the "$" off the front of the message and the "*" and chcksum from the end try a function like:- Code: var nmeaFull=msg.payload; Then to calculate a new checksum try a function like :- Seems to work OK checking against http://www.hhhh.org/wiml/proj/nmeaxor.html Code: var nmea = msg.payload; And the node-red code :- Code: [ That was fun over morning coffee : Sooooooo,,, how on earth do we get that into kplex!!! PS - I'm not a programmer but tend use CNP (cut and paste from google ) so - if any of you clever people want to point out beter ways of any tips or tricks please, please take a moment to spread the wisdom, these forums are a great place to learn, thanks YAY!!! At last, so simple - Doh! All that was missing was a line feed. This works from node red showing up in the nmea diagnostic. Note, I had to manually edit the kplex file to create a UDP input with no address: Code: [udp] And the node-red function needs a carriage return/ line feed added like :- msg.payload = msg.payload+"\r\n" But it works at last! RE: Allow NMEA 0183 file input/output - holgerw - 2017-05-31 Hello good Solution to input/patch the NMEA Data. But another Thing about KPLEX Config: Why do we allways get these system_a and system_b ports with default. Both were INPUTS and get DATA from the same UDP-in Port 10110. In my Opinion one is obsolete. RE: Allow NMEA 0183 file input/output - PaddyB - 2017-05-31 (2017-05-31, 11:50 AM)holgerw Wrote: Hello Not sure and don't know enough to consider going near the delete button..... One last thing, when node red was outputting to address = "localhost" , the address in openplotter nmea tab seemed to ned to be blank to accept the data, I've changed node red to send to address "10.10.10.1" , with openplotter set to look there it seems to work OK. And another tip - if you want to quickly see whats coming in a port you can use this in a terminal.. netcat -ul 10108 (port 10108) And a quick node-red flow which creates a new NMEA message which opencpn dashboard recognises and will automatically ut into the logbook konni. Note - you need to have an input on 10.10.10.1:10108 in the nmea tab for this to work. Ta Code: [ RE: Allow NMEA 0183 file input/output - Sailoog - 2017-05-31 abarrow: edit your new settings in kplex.conf after the line "###Manual settings" and they will be persistent. If not, it is a bug. holgerw: we need 2 UDP 10110 inputs because some tools send data to "localhost" an others send data to "127.0.0.1". Do not ask me why but kplex does not get both sources into the same place and we need 2 inputs. I think it is not fault of kplex but how raspbian manages this. This was added a few time ago and maybe this has been solved. Would need to try. RE: Allow NMEA 0183 file input/output - holgerw - 2017-06-01 (2017-05-31, 04:58 PM)Sailoog Wrote: holgerw: we need 2 UDP 10110 inputs because some tools send data to "localhost" an others send data to "127.0.0.1". This was added a few time ago and maybe this has been solved. Would need to try. This issure is gone: cat /etc/hosts 127.0.0.1 localhost ::1 localhost ip6-localhost ip6-loopback ff02::1 ip6-allnodes ff02::2 ip6-allrouters keep on with your great development! HoW |