SignalK / signalk-java

Installer and web-app for the artemis-server (a java based Signal K master server)
Apache License 2.0
6 stars 6 forks source link

Charts: Debugging? #12

Closed ph1l closed 5 years ago

ph1l commented 7 years ago

I'm having additional trouble getting charts to display in freeboard-sk under signalk-java

  1. Sourced Chart from NOAA: http://www.charts.noaa.gov/RNCs/Agreement.shtml?18652
  2. Converted KAP: 18652_1.KAP
  3. Uploaded using the web interface (that appears successful):

files get extracted in mapcache/

elektron@x61s:~/code/signalk-java$ du -sh signalk-static/mapcache/*
86M     signalk-static/mapcache/18652_1
68M     signalk-static/mapcache/18652_1.zip
4.0K    signalk-static/mapcache/placeholder.txt
1.9M    signalk-static/mapcache/WORLD
23M     signalk-static/mapcache/WORLD1

chart definition appears in self.json:resources.charts

elektron@x61s:~/code/signalk-java$ jq .resources.charts ./conf/self.json
{
  "urn:mrn:signalk:uuid:a7c5e675-26ab-4b0e-8f2f-302590d9acc3": {
    "identifier": "18652_1",
    "name": "SAN FRANCISCO BAY TO ANTIOCH",
    "description": "SAN FRANCISCO BAY TO ANTIOCH",
    "scale": 80000,
    "tilemapUrl": "/./mapcache/18652_1"
  }
}

The Chart List in the freeboard-sk interface appears empty. I can click the Search button with no terms and then I see the chart name show up (SAN FRANCISCO BAY TO ANTIOCH.) Clicking Show, Hide, or Delete appear to have no effect, and the layer does not appear in the layers menu to the right.

What additional debugging can I do on freeboard-sk while it is running under signalk-java? The signalk-static/logs directory doesn't appear to have any related logs and there are no logs under signalk-static/freeboard-sk either. Where do the node console logs end up?

rob42 commented 7 years ago

By default the logs are pretty quiet, they only print errors. this is to save the SD card on RPi. (SD cards have limited writes in their lifetimes). You can use the log configuration console to enable debug logging. The most useful are: nz.co.fortytwo.signalk.handler nz.co.fortytwo.signalk.processor or just: nz.co.fortytwo.signalk

The UI itself is not a node.js app, its just normal HTML5. As such the console logs end up in the web console, look in dev tools on the browser.

freeboard-sk doesnt handle chart selection well at present. It needs improvement to remember selections, and to search better. Its also too easy to remove either the resources entry, or the chart, they should be synchronised.

Once a chart is selected it should appear in the right-hand chart drop-down. It will only appear at the map resolutions on the chart, in your case zooms will be in mapchache/18652_1/tlemapresource.xml. You will not see the chart if you are outside of these zooms, note if its a small chart it can be quite difficult to zoom onto it unless you have a good guide (like openstreetmap) available.

rob42 commented 7 years ago

Needs to reload charts on startup or on search. If self.json is deleted for some reason the chart data is gone and search stops working.

rob42 commented 7 years ago

Ive just added a reload of the chart resources at server boot, so they should now be visible and add immediately (given correct zoom etc).