Cruisers Forum
 

Go Back   Cruisers & Sailing Forums > Seamanship, Navigation & Boat Handling > OpenCPN
Cruiser Wiki Click Here to Login
Register Vendors FAQ Community Calendar Today's Posts Log in

Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 06-07-2016, 22:43   #1
Registered User

Join Date: Jun 2010
Location: St. Petersburg, Florida
Boat: Gemini 3200
Posts: 982
Chart Display Failure when Stepping Through Track

Running 4.4.0 on 64-bit Ubuntu 14.04 I encountered a problem with the chart display when stepping through a track (see 2016-07-04.gpx). When I tried to move past leg 34 the chart display changed to what is shown in the attached screenshot (Screenshot from 2016-07-05 00_16_07.png). I don't see anything anomalous about the track. Can anyone else duplicate the error? Any ideas about what caused it?

I don't get an error on my 32-bit Ubuntu computer. On my 64-bit Windows 10 computer I don't get the distorted view but the display switches from the raster chart I was using to a vector chart as shown in the Windows 10 screenshot (Windows 10 screenshot.png).

Fabbian
Attached Thumbnails
Click image for larger version

Name:	Screenshot from 2016-07-05 00_16_07.png
Views:	127
Size:	203.0 KB
ID:	127497   Click image for larger version

Name:	Windows 10 screenshot.png
Views:	103
Size:	90.5 KB
ID:	127498  

Attached Files
File Type: gpx 2016-07-04.gpx (6.3 KB, 54 views)
fgd3 is offline   Reply With Quote
Old 07-07-2016, 06:59   #2
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,401
Re: Chart Display Failure when Stepping Through Track

Fabbian...

Not sure what you mean by "stepping through" a track? More info?

Does the fault happen if you zoom out and work at a smaller scale, like 1:20000?

Thanks
Dave
bdbcat is offline   Reply With Quote
Old 07-07-2016, 07:18   #3
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: Chart Display Failure when Stepping Through Track

Fabbian,

Does this issue occur with only this one chart?

Does it occur only at a particular zoom or location or?

Could you remove the vector charts from the list on the 32bit machine and try to reproduce the problem there?

Sean
seandepagnier is offline   Reply With Quote
Old 07-07-2016, 10:25   #4
Registered User

Join Date: Jun 2010
Location: St. Petersburg, Florida
Boat: Gemini 3200
Posts: 982
Re: Chart Display Failure when Stepping Through Track

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

Not sure what you mean by "stepping through" a track? More info?

Does the fault happen if you zoom out and work at a smaller scale, like 1:20000?

Thanks
Dave
Here's how I was "stepping through" the track. I opened the route manager, then opened the track properties. I clicked on the first leg of the track, then visited each leg in turn. I was trying to relate the track leg to the corresponding point on the chart so I could determine from the track properties time stamp when I passed that point. Everything worked just fine all the way to leg 34. When I left leg 34 (for any subsequent leg) the error occurred.

I've never had this happen before so I suspect there's something wrong with my track. But I can't see anything in the GPX file that looks suspicious.

I think the same think happened when I was zoomed out to a smaller scale, but I will have to test that specifically and get back to you.

Fabbian
fgd3 is offline   Reply With Quote
Old 07-07-2016, 10:31   #5
Registered User

Join Date: Jun 2010
Location: St. Petersburg, Florida
Boat: Gemini 3200
Posts: 982
Re: Chart Display Failure when Stepping Through Track

Quote:
Originally Posted by boat_alexandra View Post
Fabbian,

Does this issue occur with only this one chart?

Does it occur only at a particular zoom or location or?

Could you remove the vector charts from the list on the 32bit machine and try to reproduce the problem there?

Sean
I have only seen it with this chart and this track. I'll be watching for it more carefully in the future.

I don't think removing the vector charts on the 32 bit machine will make a difference, as all three machines have the same charts and the same chart folder structure. I'll see what I can do, though.

Fabbian
fgd3 is offline   Reply With Quote
Old 07-07-2016, 16:22   #6
Registered User

Join Date: Jun 2010
Location: St. Petersburg, Florida
Boat: Gemini 3200
Posts: 982
Re: Chart Display Failure when Stepping Through Track

I ran some more tests with 64-bit Ubuntu and produced the following screen shots which I hope will illlustrate what I'm seeing more clearly. The program opens zoomed in to scale 9600 (OpenCPN start.png). When I open the track properties and start stepping through the track (Leg 0.png) the display shows the start point of the currently selected leg at the center of the chart. All is good through leg 34 (Leg 34.png). But when I select any leg after 34 the display becomes distorted as in Leg 35.png. Selecting any chart from the piano keys or zooming in or out restores the display.

Next I zoomed out to scale 38400 and moved to the beginning of the track (Out Leg 0.png). As I stepped through the track everything was displayed properly through leg 34 (Out Leg 34.png). When I selected leg 35 the background went black, the zoom factor changed, and it appears I was switched to a vector chart. Scale remained 38400 but the number in parentheses changed from 1.0x to 2606x.

That's similar to the behavior I saw in 64-bit Windows 10, although the scale and zoom factors are a bit different.

One difference between Ubuntu and Windows is I can step through a track in Ubuntu with the up and down arrow keys. The properties dialog box captures those keystrokes. In Windows I have to use the mouse to click on each leg. The up and down arrow keystrokes go back to the chart window and move the chart up and down.

I will post screenshots of the same activity with Windows when I can.

Fabbian
Attached Thumbnails
Click image for larger version

Name:	OpenCPN start.png
Views:	82
Size:	183.3 KB
ID:	127544   Click image for larger version

Name:	Leg 0.png
Views:	141
Size:	204.9 KB
ID:	127545  

Click image for larger version

Name:	Leg 34.png
Views:	88
Size:	221.2 KB
ID:	127546   Click image for larger version

Name:	Leg 35.png
Views:	107
Size:	257.7 KB
ID:	127547  

Click image for larger version

Name:	Out Leg 0.png
Views:	101
Size:	376.6 KB
ID:	127548   Click image for larger version

Name:	Out Leg 34.png
Views:	108
Size:	363.7 KB
ID:	127549  

Click image for larger version

Name:	Out Leg 35.png
Views:	109
Size:	181.9 KB
ID:	127550  
fgd3 is offline   Reply With Quote
Old 07-07-2016, 16:45   #7
Registered User

Join Date: Jun 2015
Posts: 379
Re: Chart Display Failure when Stepping Through Track

Quote:
Originally Posted by fgd3 View Post
Running 4.4.0 on 64-bit Ubuntu 14.04 I encountered a problem with the chart display when stepping through a track (see 2016-07-04.gpx). When I tried to move past leg 34 the chart display changed to what is shown in the attached screenshot (Screenshot from 2016-07-05 00_16_07.png). I don't see anything anomalous about the track. Can anyone else duplicate the error? Any ideas about what caused it?

I don't get an error on my 32-bit Ubuntu computer. On my 64-bit Windows 10 computer I don't get the distorted view but the display switches from the raster chart I was using to a vector chart as shown in the Windows 10 screenshot (Windows 10 screenshot.png).

Fabbian
Hi,
I'm able to reproduce the switch from raster to vector on a 32 bit Ubuntu (old), I'll try to a have a look at it.
Could be related to another issue with the region and glu tess : sometime C = A intersect B is bigger than A .. there's an up to 10-6 error and it doesn't play will with:
glChartCanvas::ClippedViewport
bbox.GetMaxLon() > cvp.GetBBox().GetMaxLon() is true

Sean why is LLRegion constructor and InitBox using float?
did-g is offline   Reply With Quote
Old 07-07-2016, 23:16   #8
Registered User

Join Date: Jun 2010
Location: St. Petersburg, Florida
Boat: Gemini 3200
Posts: 982
Re: Chart Display Failure when Stepping Through Track

These screenshots were made on my 32-bit Ubuntu 14.04 computer. Both zoomed in and out they show the chart switching from raster to vector when I try to move past leg 34 to leg 35. In this respect the 32-bit Ubuntu installation behaves like the 64-bit Windows 10 installation. I can't produce the distorted chart I get with the 64-bit Ubuntu installation.

Fabbian
Attached Thumbnails
Click image for larger version

Name:	OpenCPN start.png
Views:	107
Size:	197.9 KB
ID:	127551   Click image for larger version

Name:	Leg 0.png
Views:	116
Size:	232.4 KB
ID:	127552  

Click image for larger version

Name:	Leg 34.png
Views:	105
Size:	271.6 KB
ID:	127553   Click image for larger version

Name:	Leg 35.png
Views:	131
Size:	192.2 KB
ID:	127554  

Click image for larger version

Name:	Out Leg 0.jpg
Views:	106
Size:	402.7 KB
ID:	127555   Click image for larger version

Name:	Out Leg 34.jpg
Views:	103
Size:	402.6 KB
ID:	127556  

Click image for larger version

Name:	Out Leg 35.png
Views:	164
Size:	196.4 KB
ID:	127557  
fgd3 is offline   Reply With Quote
Old 08-07-2016, 07:46   #9
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,401
Re: Chart Display Failure when Stepping Through Track

Fabbian/did-g...

Thanks for the screenshots.

I see the trouble here. The method MyFrame::JumpToPosition() is rather brain-dead when it needs to jump to a location crossing chart boundaries.

There is very old logic there which detects this crossing case, and then makes the easy (and wrong) choice to select the smallest scale chart on the stack to be the new reference chart.

With respect to reference chart selection, the Quilt class has been radically improved since JumpToPosition() was originally coded. So there is no need to force a quilt reference chart selection. Quilt will do the intuitively correct thing when the new viewport is set, at least as far as I have tested. To try out some long jumps, I tested using RouteManagerDialog, selecting waypoints far away from present location, and then "CenterView"

So, the simple solution is this:

Code:
void MyFrame::JumpToPosition( double lat, double lon, double scale )
{
    if (lon > 180.0)
        lon -= 360.0;
    vLat = lat;
    vLon = lon;
    cc1->StopMovement();
    cc1->m_bFollow = false;
/*
    //  is the current chart available at the target location?
    int currently_selected_index = pCurrentStack->GetCurrentEntrydbIndex();

    //  If not, then select the smallest scale chart at the target location (may be empty)
    ChartData->BuildChartStack( pCurrentStack, lat, lon );
    if(!pCurrentStack->DoesStackContaindbIndex(currently_selected_index)){
        pCurrentStack->CurrentStackEntry = pCurrentStack->nEntry - 1;
        int selected_index = pCurrentStack->GetCurrentEntrydbIndex();
        if( cc1->GetQuiltMode() )
            cc1->SetQuiltRefChart( selected_index );
    }
*/
    if( !cc1->GetQuiltMode() ) {
        cc1->SetViewPoint( lat, lon, scale, Current_Ch->GetChartSkew() * PI / 180., cc1->GetVPRotation() );
    } else {
        cc1->SetViewPoint( lat, lon, scale, 0, cc1->GetVPRotation() );
    }

    cc1->ReloadVP();

    SetToolbarItemState( ID_FOLLOW, false );

    if( g_pi_manager ) {
        g_pi_manager->SendViewPortToRequestingPlugIns( cc1->GetVP() );
    }
}
That is, skip the code which tries to reset the reference chart, and simply carry on.

Works for me. I'll post a patch today.

Fabbian, I forget, are you building from source?

Thanks again
Dave
bdbcat is offline   Reply With Quote
Old 08-07-2016, 08:38   #10
Registered User

Join Date: Jun 2010
Location: St. Petersburg, Florida
Boat: Gemini 3200
Posts: 982
Re: Chart Display Failure when Stepping Through Track

Quote:
Originally Posted by bdbcat View Post
Fabbian, I forget, are you building from source?
No. I'd like to learn how to build from source but I'm not that far along yet.

Fabbian
fgd3 is offline   Reply With Quote
Reply


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
Measure speed through water without making hole through hull. Lars_L Construction, Maintenance & Refit 29 26-03-2015 11:58
mast de-stepping and stepping jnrdafoe Atlantic & the Caribbean 0 04-08-2013 11:47
Want To Buy: Strong track or Batt cars with Track thesparrow Classifieds Archive 1 25-12-2011 12:29

Advertise Here


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


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.