Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 18-01-2011, 05:49   #1
Registered User
 
antonm's Avatar

Join Date: Feb 2010
Location: Saint Petersburg, Russia
Posts: 66
wvschart.cpp Code and Hard-Coded wvs43.dat

I need some help with sorting out code in wvschart.cpp. First of all the problem:

As you probably remember I am working on Debian inclusion of the OpenCPN and most hot topic for now is the data files that are distributed along with OpenCPN tarball. Of cause Debian and I sure other distros as well does not want to have the same data distributed several times by different software. Not only due to space, but also to the easy handling of fixes and corrections to the data.

One of such data is Wolrd Vector Shoreline that is included as wvs43.dat file. Debian has xtide package that ships World Vector Shoreline data too. The only thing that there is only wvs1.dat available there. As I understand this is the higher resolution version of the same data as in wvs43.dat.

I am thinking about possibility of making OpenCPN to use wvs1.dat instead of wvs43.dat.

Based on initial review this file is explicitly specified in wvschart.cpp. First it uses it to check the parameters sanity in constructor of WVSChart class. This is not a big deal as it just open/close the file there.

More interesting is that for data retrieval, it uses wvsrtv function that looks to be taken from xtide. Thought It passes the actual path to wvs43.dat file to it. I see there is even code to parse /etc/xtide.conf for the list of dirs and some code to automagically choose the best file based on resolutions (just first sight guess). But this code is disabled in OpenCPN, and the path to the actual wvs43.dat file is passed instead.

Does somebody know of why the wvs43.dat was set explicitly. Is this just for simplicitly or the commented out code did not work for some reason? Any thoughs of the possibility of replacing wvs43.dat to wvs1.dat? Any advantages or disadvantages?

That is because another way is to request xtide mantainer to include wvs43.dat along with wvs1.dat. So any general considerations are welcomed.
__________________
antonm is offline   Reply With Quote
Old 18-01-2011, 06:25   #2
Registered User

Join Date: Jul 2010
Location: Monastir, Tunisia
Boat: Amel Sharki
Posts: 1,777
antonm,

I too have worked a little bit with the OpenCPN code to find out if it is possible to compile it for the Mac OX S operating system. I soon have seen that the code must completely be rewritten for such a project and at the moment my spare time is limited.

Then I have seen the OpenCPN version from Navigatrix for Ubuntu Linux. Mac OS X can run any operating system with the help of Parallels. Navigatrix uses as basic world chart a "World Magnetic Variation 2010 georeferenced" kap file which might be a good idea to have the declinations on hand. May be you have a look for Navigatrix.

Gerhard
__________________
CarCode is offline   Reply With Quote
Old 18-01-2011, 09:43   #3
Registered User

Join Date: Dec 2005
Location: WNA
Boat: Dufour 35
Posts: 3,249
antonm

Both wvs1.dat (4.7 MiB) and wvs43.dat (2.1Mib) are distributed with OpenCPN. There is no problem compiling, pointing to wvs1.dat instead of wvs43.dat. As expected wvs1.dat is much more detailed.
I think that size and speed of loading, is one factor, why the smaller file is used. The shoreline with wvs43.dat is very coarse and probably pretty useless with xtide. For OpenCPN i does not matter, as the use of this background is more or less to show a new user that the program works, even before the first "proper" charts are loaded.
Dave has raised the question of perhaps have another background chart, such as the Blue Marble kap file 1.2 MiB(download at Opencpn.org).

Thomas
__________________
cagney is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Code Zero ? bluewater General Sailing Forum 42 12-02-2012 09:50
Colour Code Question kavw Electrical: Batteries, Generators & Solar 1 13-09-2010 21:25
Dress Code chucktro Monohull Sailboats 34 21-12-2009 11:29
Code Zero Furler kiapa Deck hardware: Rigging, Sails & Hoisting 13 27-10-2009 18:38
No More Code ? GordMay Marine Electronics 3 24-08-2005 05:07



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

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


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.