OpenMarine
Logging - Printable Version

+- OpenMarine (https://forum.openmarine.net)
+-- Forum: OpenPlotter (https://forum.openmarine.net/forumdisplay.php?fid=1)
+--- Forum: How do I...? (https://forum.openmarine.net/forumdisplay.php?fid=3)
+--- Thread: Logging (/showthread.php?tid=1425)



Logging - barney2074 - 2018-08-26

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


RE: Logging - pinguino - 2018-08-26

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


RE: Logging - Sailoog - 2018-08-28

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


RE: Logging - PaddyB - 2018-08-28

(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]


RE: Logging - barney2074 - 2018-08-29

thank you Pinguino, Sailoog and Paddy for your responses.
I will try these options.


RE: Logging - barney2074 - 2018-09-04

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


RE: Logging - PaddyB - 2018-09-04

Seen this website just come online? Might be handy for viewing.
http://www.chartedsails.com/?utm_source=cruisersforum&utm_medium=forumpost&utm_campaign=post1


RE: Logging - barney2074 - 2018-09-14

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/snapshot/swifCxkCy1upcsqwO4I0Wpp5h36I7NEc?orgId=2
https://dconstructors-my.sharepoint.com/:u:/p/andrew/EUxjXK5jBbpEu3jhXeeEgJ0BkiNKP3lbAiFgLprLFgj8Yg?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