FDX protocol

598 views
Skip to first unread message

joachim bakke

unread,
Nov 3, 2014, 7:04:39 AM11/3/14
to kp...@googlegroups.com
Hi again,

My setup is (sorry for the repetition):
Nexus Server
Generic Multiplexer
AIS
Raspberry Pi with kplex

Now my question is if I can connect the PC as if it was connected directly to the Nexus server. Apparently, there is some communication between the PC and the Nexus server to see if the server should talk NMEA or FDX. The problem is that I know nothing about the FDX protocol. When connecting a PC directly to the Nexus Server, I can create polar diagrams and change the settings of my instruments. 

The Nexus Server is hidden behind the console, and I used to have the usb cord pulled out to be able to connect. Now it will be more permanently connected to the RPi. Does Kplex filter out anything not strictly NMEA or will it pass other sentences as well?

I guess I could make a patchbay of cables for every possibility (USB B out of the console and USB A back into RPi, and a USB A-A "null modem" from the computer to the RPi etc).

Does anybody have experience with FDX?

Keith Young

unread,
Nov 3, 2014, 10:00:56 AM11/3/14
to kp...@googlegroups.com


No experience of FDX but unless it involves lines which start with a ! or $, ends with a \n then kplex will discard it. Behaviour was a bit different in 1.0 and before and kplex with checksumming disabled would be far more liberal about passing \n-terminated lines.

For more general conversion duties I'd look at socat

joachim bakke

unread,
Nov 17, 2014, 8:02:09 AM11/17/14
to kp...@googlegroups.com
Thanks,

For my own and others' reference, here is what I have found so far. The nexus server starts with nmea in 4800 bauds, and if it receives a special sentence ( $PSILFDX,,R), it switches to FDX mode, which is binary data on 115200 or 19200 bauds, not sure before I have tested). There is a box you can buy which does exactly that, plus logs the binary stream to logfiles in increments such as RaceAAA.nxb, RaceAAB.nxb etc. These files can be read by the Nexus software, and you can create polar diagrams that are used to output target boat speeds etc. I don't mind another box, but since I already have a computer on board (RPi with Kplex) I thought it would be a good challenge to include this in the setup. 

What I might do if I have enough time, is to pass the data through  a patch USB cable to the GPIO serial and log the incoming binary data to the file. If I have the computer with the software, there would be no data to log, but otherwise, I would be logging and populating data for the software to make the polars, and ultimately have the RPi output the target boat speed to the system.

So what is left to figure out is automatic numbering of log files, interpolating polar data and outputting this to the system, as well as initiating the FDX protocol and logging binary data. Everything looks simple when you have no clue what you are doing...

Joachim

Taylor Brockman

unread,
Mar 5, 2015, 11:19:23 PM3/5/15
to kp...@googlegroups.com

Joachim,

I am actively developing Raspberry Pi B+ data logging and analysis with a Nexus NX2 FDX Server aboard a J/120 in Charleston, SC, USA.

I have hit the limit of the 4800 Baud and need to increase resolution.  I will attempt the $PSILFDX,,R sentence, log the resulting binary to disk for inspection and report back.  Thank you for the direction.

All my source is available as project  "Seatop"      https://github.com/ntbrock/seatop-console

FYI, I am performing post-race analysis using custom python routines, a Mysql back ETL (Extract Transform Load) routine and Tableau data analysis. (Screenshot below).  Ultimate goal is to enable "on the water" performance analysis of maneuvers to provide real time feedback to crew via audio and video.

Sincerely,
Taylor


joachim bakke

unread,
Mar 9, 2015, 4:52:27 AM3/9/15
to kp...@googlegroups.com
Excellent, then we are at least two in the same boat.

I picked up some good tips from you github. I have used a more cumbersome way to get the nmea data out from pynmea2.( if msg.sentence_type == 'ROT': rateofturn = msg.rate_of_turn) etc...

Eventually, I'll opensource my stuff. It's still early days and I haven't fully tested it, but what I am trying to achieve is to get all relevant data out from nmea, calculate and pass target boat speed, polar speed and tack/reach angles to nx server. (done, not tested on board)

The data is being stored in a mysql polar table (as long as the engine is off), and I am getting these out to a webpage with highcharts charts such as this: http://jsfiddle.net/joabakk/doj2nL4u/

I will also store the data in an rrd db to show trending graphs of % performance, wind angle etc with highcharts

Freeboard is used for charts, and I have an SDR AIS receiver which will provide AIS data as long as the AIS transceiver is not on.

I will mainly be using this for an overnight race, and I am working at scouring their webpage for the participant list with handicap etc to a separate mysql db. When i register a sighting (I see sailnumber XX), I aim to calculate their and my corrected time. Also useful post race, to see when I lost/gained.

I abandoned the FDX track for now, as I haven't seen the need for it. But what I might do is to connect kplex to the terminal of the nx server instead of the rs232 port, and rather have the rs232 pass through the rPi to the GPIO USB cable to the instrument panel. That way I can both log and pass the fdx data and have nexus race running in parallel with my kplex setup.

None of this would have been possible without kplex though and I am ever grateful for the project.

Joachim
Reply all
Reply to author
Forward
0 new messages