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
Logging
#1
Hello,

I would like to log data during races, and in an attempt to do this I have manually edited kplex.conf as follows:

[file]
name=log
filename=/home/pi/logs/nmea.log
direction=out
append=yes
eol=n


This log file contains data just from the IMU, but not other data such as GPS, boat speed, wind speed/direction etc (which is what I want in the log)
This data is obtained through an Actisense NGT-1- and I can see this data- say in OpenCPN using port 10110.

I am guessing that the problem might be that this data is coming straight from SignalK and bypassing Openplotter ?

If someone can help me, I would be thankful


Andrew
Reply
#2
Since OPlotter dumps the data set over the network on port 30330 you can try logging from the terminal with the nc (netcat) command.

nc localhost 30330 > log.txt

A command like this should save the data in the log.txt file. I've tried it and it works for me.

I suppose you can also try it with port 10110 to see which one works for you. In my case, it works both ways.

nc localhost 10110 > log.txt
Why are sailors more daring than other men?
Because: No man is so often afraid
like the sailors.

"Of the questions of the seafaring world", in
The Tree of Science, Ramon Llull
Reply
#3
Actisense NGT-1 device is not sending NMEA 0183 but N2K, so you do not have to use kplex to log your data.

N2K data is converted to signal k so you need to log from there. Open signal k ui admin and login. Then go to server - data providers and enable loggers. Files will be saved in /home/pi/Logs
Reply
#4
(2018-08-26, 02:43 AM)barney2074 Wrote: Hello,

I would like to log data during races, and in an attempt to do this I have manually edited kplex.conf as follows:

[file]
name=log
filename=/home/pi/logs/nmea.log
direction=out
append=yes
eol=n


This log file contains data just from the IMU, but not other data such as GPS, boat speed, wind speed/direction etc (which is what I want in the log)
This data is obtained through an Actisense NGT-1- and I can see this data- say in OpenCPN using port 10110.

I am guessing that the problem might be that this data is coming straight from SignalK and bypassing Openplotter ?

If someone can help me, I would be thankful


Andrew

You could try installing influxDB and chronograf, then use the signalk influxSB writer. Woks really well and doesn't use much processor power. 

This is a graph of pressure >

[Image: LqH7f4E.png]
Reply
#5
thank you Pinguino, Sailoog and Paddy for your responses.
I will try these options.
Reply
#6
as an update- I have tried the 3 options, plus also using the OpenCPN 'VDR' plugin (which i guess is similar to the netcat option), plus the 'Log All SignalK' plugin

I should have explained that I want to use the data to analyse races (retrospectively) so being able to easily get the data off the Openplotter is a factor.
I have been producing Google Earth tracks for own boat plus other boats, with data on the wind/boat speed for each
You can 'replay' the race to see where it was won or lost

I agree that the InfluxDB option is fantastic, and the data is well structured, easy to analyse, and obviously everything is timestamped
However, for my specific purpose- it is not easy to get the data off the boat, and it also does not include AIS data (so I can't see what other boats were doing)

The 'Log All SignalK' plugin option gets close, and all the records are timestamped- but it seems to be in a different 'delta' JSON format that SignalK cannot replay ?
{"updates":[{"source":{"sentence":"MWV","talker":"WI","type":"NMEA0183","label":"OPkplex"},"timestamp":"2018-09-02T00:23:26.032Z","values":[{"path":"environment.wind.speedTrue","value":2.8808896187142587},{"path":"environment.wind.angleTrueWater","value":2.55690735475551}]}],"context":"vessels.urn:mrn:imo:mmsi:0"}

Logging the raw data from the SignalK data provider also gets close- but it introduces a timestamp prefix to the record that SignalK does not like (or utilise) when trying to replay it in either SignalK, or OpenCPN/VDR. It is easy to remove this prefix- but it would be great to be able to use this data.
1536055302603;N;$GPGLL,3337.06,S,15119.56,E,100142.521,A*25

So for now- I am just going to use the raw data from SignalK

Andrew
Reply
#7
Seen this website just come online? Might be handy for viewing.
http://www.chartedsails.com/?utm_source=...aign=post1
Reply
#8
thanks for the link- that is pretty good.

For my purposes: I ended up:
1. saving the delta SK log files onto a USB drive
2. Removing the USB drive at the end of the race
3. Parse the log files into a Postgres database
4. Use Grafana to generate charts from the database
5. Produce color-coded/time enabled Google Earth file from the database

It sounds a bit complicated, but only takes a few minutes once you have it set up. Samples here:
https://snapshot.raintank.io/dashboard/s...Ec?orgId=2
https://dconstructors-my.sharepoint.com/...g?e=7lVeG7


Grafana is great for these time series charts, and you can zoom in or out to see what what happening

The only thing I haven't been able to figure out is how to include true wind speed/direction- it is obviously calculated, but not included in the SK data. If anyone has an idea on this, I would be grateful


Andrew
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)