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 21-07-2016 14:24

Re: Chart Downloader/Updater Plugin
 
Paul...
Good catch, fixed now. It is a bit hard to monitor the Slovak page for changes as there are no dates there...

Pavel

.Paul. 21-07-2016 14:58

Re: Chart Downloader/Updater Plugin
 
Pavel,

Before the ChartDownloader, I used Wget to download charts. It has an option to track the file dates on the remote server (if the server allows access to file date information). The file's date and time from the remote is set on the local copy as soon as the download is finished. Wget can download files from the remote server that are newer than the dates of previously downloaded files, and previously downloaded files are not downloaded again.

I don't know how hard it would be to get the file dates from the remote server....

Paul

nohal 21-07-2016 15:51

Re: Chart Downloader/Updater Plugin
 
Paul...
We certainly can get modification timestamp of pretty much all files available on the web using something like
Code:

wget --server-response --spider http://www.svp.sk/dunaj/media/ris/ENCs-SK.zip 2>&1 | grep Last-Modified | cut -d : -f 2
The problem is that the chart producers care very little about us trying to follow their updates so the URLs change all the time and as most of the pages are updated manually, they are prone to operator error. Said that, I already have an automatic system watching most of the chart sources periodically, it just can't be 100% reliable as long as the original sources aren't. The rest is up to observant users like you as I really don't surf to all the European RIS sites more than once or twice a year (Usually to just find out that the IENC charts moved to some other place, even harder to find than last time)...

Pavel

.Paul. 21-07-2016 20:39

Re: Chart Downloader/Updater Plugin
 
Pavel,

The ChartDownloader fails to unzip the compressed file from the new zipfile_location for the SK_INLAND charts. I see the ENCs-SK.rar file in the ...\SK_INLAND\ folder as it is being downloaded. As soon as the download is finished, ENCs-SK.rar disappears. The charts remaining in the folder are then chartdldr_pi.dat and SK_IENC_Catalog.xml plus any *.000 charts that were in the folder before the download started.

Here is opencpn.log (starting at the end of plug-in loading) and ending after the ChartBase update starts following an attempt to download SK charts:
Code:

1:34:38 AM: PlugInManager: Loading PlugIn: C:\Program Files (x86)\OpenCPN 4.4.0\plugins\wmm_pi.dll
1:34:38 AM:  C:\Program Files (x86)\OpenCPN 4.4.0\plugins\wmm_pi.dll
              API Version detected: 108
              PlugIn Version detected: 101
1:34:38 AM: Opencpn language reload for:  en_US
1:34:38 AM: Loading catalog for:  opencpn-chartdldr_pi
1:34:38 AM: Loading catalog for:  opencpn-climatology_pi
1:34:38 AM: Loading catalog for:  opencpn-dashboard_pi
1:34:38 AM: Loading catalog for:  opencpn-ge2kap_pi
1:34:38 AM: Loading catalog for:  opencpn-grib_pi
1:34:38 AM: Loading catalog for:  opencpn-ocpn_draw_pi
1:34:38 AM: Loading catalog for:  opencpn-projections_pi
1:34:38 AM: Loading catalog for:  opencpn-weather_routing_pi
1:34:38 AM: Loading catalog for:  opencpn-wmm_pi
1:34:38 AM: Loading catalog for opencpn core.
1:34:38 AM: WMM: WMM model data loaded from file C:\Program Files (x86)\OpenCPN 4.4.0\plugins\wmm_pi\data\/WMM.COF.
1:34:38 AM: PlugInManager: Calling LateInit PlugIn: C:\Program Files (x86)\OpenCPN 4.4.0\plugins\ocpn_draw_pi.dll
1:34:40 AM: NMEA input device initial open failed: COM4...GetLastError():  2
1:34:40 AM: NMEA input device initial open failed: COM3...GetLastError():  2
1:34:40 AM: Chart cache purge
1:34:40 AM: Initializing Chart C:\Charts\ENC\SK_INLAND_2010\2D7D1873.000
1:34:40 AM: Initializing Chart C:\Charts\ENC\AT_INLAND\ENC_ROOT\1SAD1870.000
1:34:41 AM:    ***GPS Watchdog timeout at Lat:29.3203  Lon: -94.7772
1:35:37 AM: LOGBOOK:  2016-07-22 01:35:37 UTC  DR Lat  29.32030 Lon  -94.77720
1:36:38 AM: Detected display size (horizontal): 344 mm
1:39:51 AM: Error: Cannot wait for thread termination (error 6: the handle is invalid.)
1:39:51 AM: Error: Couldn't terminate thread (error 6: the handle is invalid.)
1:41:30 AM: Detected display size (horizontal): 344 mm
1:43:49 AM: Chart cache purge
1:43:49 AM:   
1:43:49 AM: Starting chart database Update...
1:43:49 AM:    No change detected on directory C:\PilotCharts
1:43:50 AM:    No change detected on directory C:\Charts\RNC
1:43:50 AM: Searching directory: C:\Charts\ENC for *.kap
1:43:50 AM: Searching directory: C:\Charts\ENC for *.geo
1:43:50 AM: Searching directory: C:\Charts\ENC for *.000
1:43:50 AM: Loading chart data for C:\Charts\ENC\AT_INLAND\ENC_ROOT\1SAD1870.000
1:43:50 AM: Loading chart data for C:\Charts\ENC\AT_INLAND\ENC_ROOT\1SAD1880.000
1:43:51 AM: Loading chart data for C:\Charts\ENC\AT_INLAND\ENC_ROOT\1SAD1890.000

This is running Windows 10.

I had success using Wget for the download and 7-Zip to extract the files. The Windows unzip routine could not extract the files.

Paul

nohal 21-07-2016 21:22

Re: Chart Downloader/Updater Plugin
 
Paul...
Should be fixed now. It seems that this new version is not packed in RAR format anymore as was the case with the older one (although also named with .ZIP extension)

Pavel

.Paul. 22-07-2016 04:24

Re: Chart Downloader/Updater Plugin
 
Pavel,

The newer SK_INLAND charts downloaded and installed using the updated SK_IENC_Catalog.xml.

Thank you,
Paul


All times are GMT -7. The time now is 22:17.

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


ShowCase vBulletin Plugins by Drive Thru Online, Inc.