Cruisers & Sailing Forums (http://www.cruisersforum.com/forums/)
-   OpenCPN (http://www.cruisersforum.com/forums/f134/)
-   -   Chart Downloader/Updater Plugin (http://www.cruisersforum.com/forums/f134/chart-downloader-updater-plugin-58737.html)

nohal 12-04-2011 09:04

Chart Downloader/Updater Plugin
 
1 Attachment(s)
Testers,
I've hacked together a very early version of a chart downloader/updater plugin.

Currently the only chart source supported is NOAA (both raster and vector charts), although it's easy to extend it to support any other chart sets from authors able to pack the charts individually and produce a simple XML file with the list of the charts and a little bit of metadata.

There was just a very limited testing, so I suggest you don't point it at your regular chart directories. Also the functionality relies heavily on file creation dates, so it's not entirely clear how well would it work for you.

If you want the icon in the toolbar as shown on the screenshot, you have to enable it in plugin's settings. There is no functional difference whether you access the plugin through the settings or toolbar.

The preset chart path (.) is the application runtime directory - it is not a good place to keep your charts, please change it before you start clicking on the Download buttons.

The plugin can't do chart database updates, so you have to go to Settings->Charts and click OK or restart OpenCPN to use the charts you've just downloaded. Also don't forget to add the folders where you download the charts on the Charts tab.

OpenCPN 2.4 beta is required.

Precompiled binaries at https://github.com/nohal/OpenCPN/downloads Just grab chartdldr_pi.dll for Windows or libchartdldr_pi.so for Linux and place to your plugin directory. Still no Mac here...

Source available as usually at https://github.com/nohal/OpenCPN/tree/chartdldr

Enjoy and report back

Pavel

SethDart 12-04-2011 10:38

Re: Chart downloader/updater plugin
 
Great work Pavel!

I started working on this one month ago but didn't get so far. We should organize tasks more closely to avoid double work on such topics. Prior to start working on this, I asked Dave and he told me we should change the internal chart database to xml first to ease plugin access. But I got stuck there trying to understand the internal process.

Can you create a branch in https://github.com/OpenCPN/OpenCPN to ease build process and share one main repo for released work?

Congrats!

nohal 12-04-2011 10:57

Re: Chart downloader/updater plugin
 
Seth...
Yes, access to the chart db is needed - will be much more robust than the solution I've implemented now.
Maybe we should make a page in Wiki with the tasks and ideas where we could keep track on what everyone is working on. I already have a personal list at OpenCPN - ToDo - Redmine where I keep the stuff that I would like to work on in no particular order.
With the branch I'm still not sure whether it's a good idea to create them in the OpenCPN repo, at least before they are "release quality" for me.
I now have it the other way around - more remotes connected to my local repository - pushing upstream is a question of one command.

Pavel

idpnd 14-04-2011 13:17

Re: Chart downloader/updater plugin
 
Sounds exciting, sadly not available in my part of the world

nohal 19-04-2011 06:35

Re: Chart downloader/updater plugin
 
Version 0.2 of the plugin is available. The only notable change is the addition of Inland Electronic Navigation Charts inland waterways chart catalog.
New users will get this data source preset automatically. Users of version 0.1 who want to get access to the charts have to add
Code:

http://crunch.tec.army.mil/enc/echarts/catalog/iencproductscatalog.xml
as a new chart source after upgrade.
Downloads for Windows and Linux 32 and 64-bit are linked directly from PlugIns | Official OpenCPN Homepage

Report any problems you observe

Pavel

gjorgensen 20-04-2011 16:07

Re: Chart Downloader/Updater Plugin
 
Nohal, version 0.2 does not work at all for me. Version 0.1 worked fine. I've tried 0.2 on two different Windows 7 machines and see the same behavior on both. I can select a chart source, and everything populates correctly (including an existing directory if I'm updating or a new directory if I pick one). "Update chart list" works fine and I can select charts. When I click download, I get the download status window but nothing ever happens. There are no updates in the status window and nothing downloads. I can see OpenCPN in an infinite loop occupying one processor 100% from task manager. Clicking Cancel kills the status window, but leaves OpenCPN hung in an infinite loop and requires that I kill the program from Task Manager.

As an aside, a "Select all" button to check/clear all entries in the list would really be handy.

nohal 20-04-2011 23:28

Re: Chart Downloader/Updater Plugin
 
I don't observe this behavior, but have read somewhere about the 100% CPU problem of the tech used. This code has changed quite a bit because of the USACE charts where handling http redirects is needed. Will investigate.

Thanks

Pavel

yantho 21-04-2011 00:27

Re: Chart Downloader/Updater Plugin
 
Hello

on Debian 6 I observe the same problem

and after few seconds total crash of OpenCPN with this line in syslog
kernel: [ 2061.697967] opencpn[4708]: segfault at 0 ip 00007f48cdf99bef sp 00007fff80da6a40 error 4 in libchartdldr_amd64_pi.so[7f48cdf80000+5a000].

sailias 21-04-2011 05:16

Re: Chart Downloader/Updater Plugin
 
Seems to work OK on Ubuntu 32 10.10 but....

1. The icon does not display in the tool bar (same issue on 0.1)
2. feature request: select all button for charts once an area is selected.

/ch

sailias 21-04-2011 05:19

Re: Chart Downloader/Updater Plugin
 
followup:

feature request: auto loading of charts once downloaded so you dont have to do it manually, or possibly a dedicated button if autoload is not preferred (could not think of a use case where its not)

sailias 21-04-2011 05:42

Re: Chart Downloader/Updater Plugin
 
OK now Im experiencing the same behaviour as others, complete system hang. The icon has decided the toolbar is a good place to be however..:)

/ch

nohal 21-04-2011 07:08

Re: Chart Downloader/Updater Plugin
 
Looks like it should be the issue mentioned in WxHTTP - WxWiki
Still can't reproduce on my machines, but having a look how others are preventing it from happening...
The toolbar icon is inserted on next application start after the checkbox is selected currently.
With the fully automatic download I'm really not sure if this idea is cool or not - it can be a lot of data and I would probably try to shoot myself it it happened when I connected abroad on GSM roaming having to pay arm and leg per megabyte. I personally spend a lot of time turning off all these autodownloaders especially on Win machines and probably will be pretty resistant to building another one myself ;)
Select all/download all updated is very reasonable - will be there.

Pavel

cagney 21-04-2011 09:22

Re: Chart Downloader/Updater Plugin
 
1 Attachment(s)
Pavel
I get a crash after a little while, when the downloading of selected charts has started.
Attachment 26423

Thomas

sailias 21-04-2011 17:46

Re: Chart Downloader/Updater Plugin
 
On linux, I experience it only intermitantly, in other words, the first download works fine in general, the second selection is typically where this occurs. Perhaps this is caused by server response delay? resulting in the program to keep trying by launching a new thread or cycle. Just guess, Im clueless..:)

/ch
Ubuntu 10.10

cagney 18-06-2011 04:49

Re: Chart Downloader/Updater Plugin
 
This plugin has not been updated for a while on the plugin download page.
Here is a version for Ubuntu amd64 that works with 2.4.612.
libchartdldr_pi.so


All times are GMT -7. The time now is 19:16.

Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2018, vBulletin Solutions, Inc.


ShowCase vBulletin Plugins by Drive Thru Online, Inc.