Friday, 21 July 2017

OpenPlotter, NMEA data FROM file


          Updated 2017-08-14

To test Openplotter, (OP), together with OpenCPN,(OC), without connecting to the navigation network on board there are two features 
  • Using the NMEA generators, found in the OP "Tools" meny 
  • Use logfiles which are stored within the SignalK application.

The generators are explained in the documentation and here will be a description how to use the logfiles.

The engine in OP is SignalK, (SK), and the configuration for this a
pplication is stored in

/home/pi/.config/openplotter/OP-signalk/openplotter-settings.json

SK/OP will stop working if wrong info or syntax is implemented !!

So always backup the original settings file before testing a new !!

The easiest way to handle files, on raspberry Pi, (RPi), is to make the RPi, act as a Windows fileserver which in RPi:s world is implemented as Samba.

This post describes how to install Samba. The easiest way is to start  "Pi => Accessories => Terminal" and follow the instructions.

You also have to activate "show hidden files". Just Google for Your OS.
For Mac open the terminal and run

$ defaults write com.apple.Finder AppleShowAllFiles true
$ killall Finder

The default settings file, before any setup have been done, OP 13.1, is listed here

If You want to disable, temporarily, all Your configurations and read from a NMEA0183 sample file, which is available in SignalK, do the following;
  • Rename openplotter-settings.json to  openplotter-settings_bup.json
  • Copy this file to the .config/openplotter/OP-signalk/ folder
  • Rename it to openplotter-settings.json
  • Restart SignalK. "OpenPlotter => SignalK => click on "Restart"
  • Wait for the message "Signal K server restarted" in the lower part of the window.
  • Check the data clicking on "Diagnostic" and You will see the NMEA data
  • Add a new connection in OC; "Options => Connections => Add Connection" 
    • Network, TCP, localhost, 10110 and click on "Apply"
  • Open OC and You will be sailing in the south of Finland
If You want to go back till the old settings;
  • Rename openplotter-settings.json to  openplotter-settings_NMEA0183.json
  • Rename openplotter-settings_bup.json to  openplotter-settings.json
  • Restart SignalK. "OpenPlotter => SignalK => klick on "Restart"
There is also another settings file which will read NMEA 2000 sample data from a file.

Please note that if You want to se Your position in OC with this sample file, it is a little more complicated since OC just can use NMEA 0183;
  • Enable/activate the SK plugin "Signal K to NMEA0183"
  • Mark the sentences You want to transfer
  • Add a new connection in OC; "Options => Connections => Add Connection" 
    • Network, TCP, localhost, 10110 and click on "Apply"
  • Check Your position in OC
Or
  • Go to the "Tools" Meny and klick on "NMEA 0183 generator" and create Your own NMEA sentences
  • Start with the RMC sentence where You pick the data from Signal K value
  • For example the Latitude value is populated from 
    • Signal K value
    • -- vessel(self)
    • -- group(navigation)
    • -- key(position.latitude)
    • -- format(lat: ddmm.mm)
  • Continue with all the values within the sentence and save it
  • Check the data You have created using tab "NMEA 0183" 
  • Mark the "system_b" row and click on "Diagnostic"
  • A new window will open showing the RMC sentence
  • Check Your position in OC
And here a post how to record navigation data


No comments:

Post a Comment