Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 01-04-2016, 08:41   #766
Registered User
 
phiggins's Avatar

Join Date: Nov 2004
Location: Toronto, Canada
Posts: 1,286
Send a message via Skype™ to phiggins
Re: OpenCPN General

I have discovered a problem using OPenCPN V4.2.0 with OpenGL turned on. If you load a chart of a given name then reload another chart with the same name, if OpeNGL is on the 2nd chart location will show the first charts contents. With OpenGL off it shows the correct chart.

Attached is an example. I first scanned in a chart called "Unknown_Harbour" at one location. Then I scanned in another chart with the same name "Unknown_Harbour" from another location. If OPENGL is on I see the contents of the first at the 2nd's location. If I turn off OpenGL I see the correct chart.

If this not an known problem I will open a flyspray.
Attached Thumbnails
Click image for larger version

Name:	Location_1.jpg
Views:	105
Size:	277.4 KB
ID:	121847   Click image for larger version

Name:	Location 2 OpenGL on.jpg
Views:	107
Size:	261.4 KB
ID:	121848  

Click image for larger version

Name:	location_2 OpenGL off.jpg
Views:	100
Size:	383.6 KB
ID:	121849  
__________________

__________________
Paul,
" One moment you are running along, the next you are no more." Dean Spanley
phiggins is offline   Reply With Quote
Old 04-04-2016, 06:48   #767
Registered User

Join Date: Jan 2007
Location: Minneapolis
Boat: Irwin 37 CC
Posts: 660
Re: OpenCPN General

Options>Charts>Chart Groups>"Group name">Remove Chart

Removes the selected chart; but, there seems to be no way to undo the "Remove".

Maybe the Remove could be a toggle button or a right-click undo would be nice.
__________________

__________________
David Kester
Pegasus IV
wdkester is offline   Reply With Quote
Old 06-04-2016, 06:20   #768
Registered User

Join Date: Jan 2007
Location: Minneapolis
Boat: Irwin 37 CC
Posts: 660
Re: OpenCPN General

A year (or so) ago, I contacted the Salty Southeast Cruisers Net about a plugin that would use their data (anchorages, trouble spots, marinas...See Cruisers' Net | Cruisers Helping Cruisers) in OpenCPN. Their founder was agreeable; but, unfortunately he died in accident. They are still interested. See the following email from Curtis.

My question is : Would any of the developers like to assist?

Curtis Hoff <curtis.hoff@cruisersnet.net> Apr 3 at 6:33 PM
To
David Kester
Message body
Dave:

OpenCPN integration would still be beneficial to us. I would have to talk with my other partners, but I believe we would be receptive to OpenCPN integration.

However, I doubt we have the available resources for a while due to our upcoming Android release and maybe not the technical expertise. Do you know anyone in the OpenCPN world who we could work with?

Regards,
Curtis

Curtis Hoff, Ph.D.
Web Site & Mobile Development
Salty Southeast Cruisers' Net - Cruisers Helping CruisersCurtis Hoff <curtis.hoff@cruisersnet.net> Apr 3 at 6:33 PM
__________________
David Kester
Pegasus IV
wdkester is offline   Reply With Quote
Old 06-04-2016, 06:59   #769
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 3,986
Re: OpenCPN General

David...
I remember some time when you talked to them, they were not yet able to provide an interface or export the data. If that already changed (and all the partners agree that they want to proceed), I would be glad to help them make the integration happen.

Pavel
__________________
nohal is offline   Reply With Quote
Old 06-04-2016, 11:07   #770
Registered User

Join Date: Jan 2007
Location: Minneapolis
Boat: Irwin 37 CC
Posts: 660
Re: OpenCPN General

Pavel,

Thank you. I forwarded your response.
__________________
David Kester
Pegasus IV
wdkester is offline   Reply With Quote
Old 15-04-2016, 17:34   #771
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 4,852
Re: OpenCPN General

@phiggins...

Re:
I have discovered a problem using OPenCPN V4.2.0 with OpenGL turned on.

Paul, I have not been able to reproduce this behaviour, but I'm not exactly sure of the sequence of events.

Do you have more information, or maybe a logfile snippit to show the two charts being added sequentially?

Thanks
Dave
__________________
bdbcat is offline   Reply With Quote
Old 15-04-2016, 18:01   #772
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 3,986
Re: OpenCPN General

Quote:
Originally Posted by bdbcat View Post
@phiggins...

Re:
I have discovered a problem using OPenCPN V4.2.0 with OpenGL turned on.

Paul, I have not been able to reproduce this behaviour, but I'm not exactly sure of the sequence of events.

Do you have more information, or maybe a logfile snippit to show the two charts being added sequentially?

Thanks
Dave
Dave...
The problem seems to be something different, not related to OpenGL at all - This is the closest I got to the problem Paul describes:

When there are equally named KAP charts in different folders, we get confused.
Testcase:
* Take NOAA RNC 11303 and place the 2 KAPs into the following directory structure
Code:
CHARTDIR
  |->A->11303_1.KAP
  |->B->11303_2.KAP
* Rebuild the chart DB
* Look at 26 20.90 N / 097 25.41 W at reasonable zoom. Everything ok, we can see both the charts quilted.

* Rename B/11303_2.KAP charts to B/11303_1.KAP
Code:
CHARTDIR
  |->A->11303_1.KAP
  |->B->11303_1.KAP
* Rebuild chart database.
* There is no way to get both the charts into the quilt.

It seems that Paul's problem, which he also wasn't able to reproduce on his other system, is caused by this.
I vaguely remember we touched this, or very similar, topic some time ago somewhere, but don't recall any detail.

Pavel
__________________
nohal is offline   Reply With Quote
Old 15-04-2016, 19:26   #773
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 4,852
Re: OpenCPN General

Pavel...

OK, I will look at your test case. I also vaguely remember discussing this once.

However....

On OpenGL, using the raster cache, I have discovered a problem.

Q: What happens to the raster cache when a new updated chart is downloaded, as by dldr?

A: The old cache for this chart should be purged, and a new one built as chart rectangles are displayed.

Problem: In some cases we can get a cache incoherency.

Why:
The cache methods try to detect a change in chart edition date as published in the .KAP header in order to purge any old raster cache. I am finding that NOAA (at least) does not bump the edition date very often. Only the NTM field seems to get updated on every new publication. Its not clear that a NTM update would affect the raster tiles, but best to be conservative here.

So, we can get a new chart installed with an old, apparently valid, cache.
Not good.

Solution:
We need to use something else to identify changed .KAP files in order to trigger a cache purge. We could calculate and record a hash of the .KAP file, but that seems expensive to me. Alternatively, I have a patch which uses also the local KAP file modification time to qualify the cache validity. Seems to work OK so far in testing, I'll push it tonight.

This could be Paul's problem. Two charts, same name, same edition date, same cache. Oops.

My patch would fix Paul's problem, I think, since I record the full time_t value of the file mod time, precise to the second.

Get it?
Dave
__________________
bdbcat is offline   Reply With Quote
Old 15-04-2016, 20:00   #774
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 4,852
Re: OpenCPN General

Pavel...

OK, I looked into your scenario.

And I see the issue, but not the solution. Initially, and when rebuilding the database, both charts end up in the database OK, despite their identical names.

However, when the database is traversed to build a chartstack at a certain lat/lon, duplicate charts with the same name are removed intentionally. Here is the comment in the code:

chartdb.cpp:553
Code:
//    Remove exact duplicates, i.e. charts that have exactly the same file name and nearly the same mod time
//    These charts can be in the database due to having the exact same chart in different directories,
//    as may be desired for some grouping schemes
If I recall my thinking here, some users wanted to create a group structure that had the same chart in different locations of their chart file tree. Then groups were created by judicious upper directory selection.

Not sure what to do here that would not break that earlier idea, but I'm open to suggestions/thoughts. I'll sleep on it.

Dave
__________________
bdbcat is offline   Reply With Quote
Old 16-04-2016, 04:00   #775
Registered User

Join Date: Oct 2014
Posts: 177
Re: OpenCPN General

Dave,

My Windows build of the OpenCPN (master branch) using commits from yesterday (April 15) broke the Auto Follow task bar button and F2 key. With this build, Auto Follow can be turned off with the button or F2 key, but it cannot be turned on again. A left click on the button centers the screen on the own ship position as usual, but the button does not change color, and the ship moves away from the center of the screen (the chart does not pan).

Auto Follow task bar button (and F2 key) work correctly with the source from April 3.

Paul
__________________
.Paul. is offline   Reply With Quote
Old 16-04-2016, 06:28   #776
Registered User

Join Date: Jan 2007
Location: Minneapolis
Boat: Irwin 37 CC
Posts: 660
Re: OpenCPN General

Paul Higgins was probably talking about charts created by GE2Kap whose header looks like:
"! Created by GE2KAP.REX V20.0.0.9 on 2016/04/07 18:39:46 - Use at your own risk!
VER/3.0
BSB/NA=AH_Z18_00001
NU=1,RA=1366,665,DU=0
KNP/SC=4285,GD=WGS84,PR=MERCATOR,PP=24.763
PI=UNKNOWN,SP=UNKNOWN,SK=0.0,TA=90.0
UN=Meters,SD=
DX=1.19,DY=1.08
OST/1"

No edition date(ED=) or NTM.
__________________
David Kester
Pegasus IV
wdkester is offline   Reply With Quote
Old 16-04-2016, 06:36   #777
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 3,986
Re: OpenCPN General

Quote:
Originally Posted by bdbcat View Post
Pavel...

OK, I looked into your scenario.

And I see the issue, but not the solution. Initially, and when rebuilding the database, both charts end up in the database OK, despite their identical names.

However, when the database is traversed to build a chartstack at a certain lat/lon, duplicate charts with the same name are removed intentionally. Here is the comment in the code:

chartdb.cpp:553
Code:
//    Remove exact duplicates, i.e. charts that have exactly the same file name and nearly the same mod time
//    These charts can be in the database due to having the exact same chart in different directories,
//    as may be desired for some grouping schemes
If I recall my thinking here, some users wanted to create a group structure that had the same chart in different locations of their chart file tree. Then groups were created by judicious upper directory selection.

Not sure what to do here that would not break that earlier idea, but I'm open to suggestions/thoughts. I'll sleep on it.

Dave
Dave...
Perhaps we should look at the size of the file? Faster than checksum/fingerprint and IMO much more reliable than name+date...
Do you see some cons?

Pavel
__________________
nohal is offline   Reply With Quote
Old 16-04-2016, 09:04   #778
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 3,885
Re: OpenCPN General

Pavel,

This issue can up with chart downloader too as I recall. I was thinking a hash made from the full path name would be unique. It would not take much time to compute.
__________________
transmitterdan is offline   Reply With Quote
Old 16-04-2016, 09:25   #779
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 3,986
Re: OpenCPN General

Dan...
Yes, of course, but it will break the other use case Dave described where we actually want to identify the "duplicate" charts present in several different locations on the filesystem...

Pavel
__________________
nohal is offline   Reply With Quote
Old 17-04-2016, 05:42   #780
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 3,885
Re: OpenCPN General

I'm ok with requiring all unique chart files to have unique file names. I haven't found any government supplied chart datasets that violate this rule.

I would not like to have to read entirely every chart file to build the database. The process is slow enough already.
__________________

__________________
transmitterdan 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
OpenCPN bdbcat OpenCPN 1343 19-09-2009 15:59
Hi - Just a Few Brief General Questions valley Meets & Greets 5 26-08-2009 12:19
OpenCPN with BSB v4 selkie Navigation 4 03-08-2009 11:32



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 21:09.


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.