rob42 / freeboard-installer

Installer to aid in freeboard setup tasks.It loads the arduinos, calibrates the IMU, and converts charts.
GNU General Public License v3.0
1 stars 3 forks source link

Processing Charts - Connections or software issue? #6

Closed pimadness closed 7 years ago

pimadness commented 8 years ago

HI,

I'm not succeeding processing charts to install on the freeboard server and I think it is because of not (in part at least) having the cables connected in the right places.

The server is working correctly as far as I can tell locating itself with GPS correctly on the generic global map so next step is to get the charts processed.

Am connecting the Arduino and freeboard shield to a Linux Box running Elementary Linux. Arduino IDE launches and connects to another Mega 2560 and runs the sketch to make the LED flash.

On the Linux box when I run the freeboard-installer from the command line the install manager launches and I can select the NZ charts files BSB_ROOT unzipped from BSB_BASE.zip downloaded to the Linux box. Running that makes no change to the freeboard server however. Install manager prints:

InstalManager INFO run Processing /home/matthew/Downloads/NZ_Charts/BSB_ROOT/NZ 56/NZ5601.KAP ProcessingPanel INFO process Processing /home/matthew/Downloads/NZ_Charts/BSB_ROOT/NZ 56/NZ5601.KAP ChartProcessor INFO processKapChart Chart dir:/home/matthew/Downloads/NZ_Charts/BSB_ROOT/NZ 56/NZ5601 KAPParser INFO loadHeader skew = 0.0 Exception in thread "Thread-0" java.lang.NoSuchMethodError: org.apache.commons.io.FileUtils.writeStringToFile(Ljava/io/File;Ljava/lang/String;Ljava/nio/charset/Charset;)V at org.signalk.maptools.KapProcessor.createTilePyramid(KapProcessor.java:162) at nz.co.fortytwo.freeboard.installer.ChartProcessor.processKapChart(ChartProcessor.java:192) at nz.co.fortytwo.freeboard.installer.ChartProcessor.processChart(ChartProcessor.java:109) at nz.co.fortytwo.freeboard.installer.ProcessingPanel.process(ProcessingPanel.java:75) at nz.co.fortytwo.freeboard.installer.InstalManager$ChartFileChooser$1.run(InstalManager.java:399)

Connections are as for picture below: freeboard wiring

Grateful any advice re software and connecting cables when connecting to box/installing and for final installed operating mode.

rob42 commented 8 years ago

Ok, a couple of things: Disconnect the black cable from the RPi end, and connect to the USB hub. Its just a power cable for the board. Connect the blue cable to the RPi. It gives comms from Mega to RPi (and power for Mega).

The charts issue is unrelated to the RPi etc. The installManager is just a standalone utility to generate charts in a zipped format, then you move them to the RPi.

The problem with the installer is a version issue: Exception in thread "Thread-0" java.lang.NoSuchMethodError: org.apache.commons.io.FileUtils.writeStringToFile(Ljava/io/File;Ljava/lang/String;Ljava/nio/charset/Charset;)V

This occurs if the classpath is mixed up. Downlaod a fresh jar file, and run under Java 8.

Rob

pimadness commented 8 years ago

Hi Rob,, Thanks for this. I installed updated Java and also latest installer manager. Unzipped BSB_BASE.zip again. Restarted. Found unzipped charts folder BSB_ROOT and pressed, "Process." Got following: (Java version at bottom)

[ Thread-0] InstalManager INFO run Processing /home/matthew/Downloads/NZ_Charts/BSB_ROOT/NZ4212/NZ421201.KAP [ Thread-0] ProcessingPanel INFO process Processing /home/matthew/Downloads/NZ_Charts/BSB_ROOT/NZ4212/NZ421201.KAP [ Thread-0] ChartProcessor INFO processKapChart Chart dir:/home/matthew/Downloads/NZ_Charts/BSB_ROOT/NZ4212/NZ421201 [ Thread-0] KAPParser INFO loadHeader skew = 0.0 Exception in thread "Thread-0" java.lang.NoSuchMethodError: org.apache.commons.io.FileUtils.writeStringToFile(Ljava/io/File;Ljava/lang/String;Ljava/nio/charset/Charset;)V at org.signalk.maptools.KapProcessor.createTilePyramid(KapProcessor.java:162) at nz.co.fortytwo.freeboard.installer.ChartProcessor.processKapChart(ChartProcessor.java:192) at nz.co.fortytwo.freeboard.installer.ChartProcessor.processChart(ChartProcessor.java:109) at nz.co.fortytwo.freeboard.installer.ProcessingPanel.process(ProcessingPanel.java:75) at nz.co.fortytwo.freeboard.installer.InstalManager$ChartFileChooser$1.run(InstalManager.java:399) ^Cmatthew@matthew-linux-box:~/freeboard/freeboard-installer-master$ java -version java version "1.8.0_101" Java(TM) SE Runtime Environment (build 1.8.0_101-b13) Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)

rob42 commented 8 years ago

Hmmm..I will try here and adjust

pimadness commented 8 years ago

Hold on something is processing. I had to go to Properties and tell the .jar file to open with Java 8, until it was still opening with 7 although 8 installed.

On Tuesday, 4 October 2016, rob42 notifications@github.com wrote:

Hmmm..I will try here and adjust

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rob42/freeboard-installer/issues/6#issuecomment-251205417, or mute the thread https://github.com/notifications/unsubscribe-auth/AS172-VkF9IWm1N7PKDb9YP4-DdoNgrqks5qwVqggaJpZM4KLouH .

pimadness commented 8 years ago

Belay the last. A small number of charts were processed and zip files produced but far from all. Any ideas?

Also how should I handle the BSB_UPDATE.zip file?

Thanks for your help,

rob42 commented 8 years ago

There is a huge collection of charts in the NZ BSB archive. Do it in smaller chunks. Also there may be a single chart that blew the available RAM or such. See which file it dies on, and avoid it. BTW the processing needs a LOT of RAM, it wont work on the Pi, I found at least 4Gb was needed. Depending on your platform you may need to execute with params, see http://alvinalexander.com/blog/post/java/java-xmx-xms-memory-heap-size-control and http://www.wikihow.com/Increase-Java-Memory-in-Windows-7

Not sure how to do the BSB updates, I just keep my eyes open, round here the rocks dont move in the wind like in Wellington :-) I think you are supposed to unpack them over the BSB dir, it updates various files? There should be a note with them somewhere.

pimadness commented 8 years ago

Ok I'Il try that thanks and let you know how we go.

Cheers,

On Tuesday, 4 October 2016, rob42 notifications@github.com wrote:

There is a huge collection of charts in the NZ BSB archive. Do it in smaller chunks. Also there may be a single chart that blew the available RAM or such. See which file it dies on, and avoid it. BTW the processing needs a LOT of RAM, it wont work on the Pi, I found at least 4Gb was needed. Depending on your platform you may need to execute with params, see http://alvinalexander.com/blog/post/java/java-xmx-xms- memory-heap-size-control and http://www.wikihow.com/Increase-Java-Memory-in-Windows-7

Not sure how to do the BSB updates, I just keep my eyes open, round here the rocks dont move in the wind like in Wellington :-) I think you are supposed to unpack them over the BSB dir, it updates various files? There should be a note with them somewhere.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rob42/freeboard-installer/issues/6#issuecomment-251296196, or mute the thread https://github.com/notifications/unsubscribe-auth/AS172w8sSbR-k50u2AuCLIUXyc-uZXjHks5qwd0ugaJpZM4KLouH .

pimadness commented 7 years ago

Hi Rob,

I've managed to get the chart files processed (went back to using Mac laptop and it worked after updating Java) and placed in the mapcache folder. Have unzipped three so far. All three show up in the config panel on the left and once moved to the right hand side appear top right in the tile list.

Problem, the charts don't appear beneath the GPS boat position as they should. Only new graphic are purple lines like the Telecom/Spark brand mark underneath GPS boat position.

Grateful ant thoughts.

rob42 commented 7 years ago

The purple 'splat' is your boats track, I assume you are in your berth or at anchor. Its the GPS wobble, causes a scribble of lines for about 50M around your position. After configuring charts you will need to reload the browser. The charts are only shown if the current zoom level is valid for the chart. Try zoom in/out and they may appear.

The other factor affecting them is the home/Boat DNS setting on the config page. The try both. The boat setting only works when the RPi provides the DNS service.

If none of those work, then look in the browser console. Paste any errors here

pimadness commented 7 years ago

Hi Rob

Still not got this sorted. Console attached below. screen shot 2017-01-28 at 4 22 21 pm