Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 11-10-2015, 11:44   #46
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: Masachusetts
Boat: bristol 27
Posts: 2,803
Re: Navico RADAR Plugin Optimization

Quote:
Originally Posted by merrimac View Post
A good way to try this kind of stuff out is to install a virtual machine and run the tcp replay in that, onto the "host only" network that the VM software usually generates. This way you only need software, not hardware.

If you run Linux, try KVM or VirtualBox. KVM is great if you like fiddling, VBox is the easy option.
I have no movies or music to delete:
Code:
sean@coron:~$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            922M     0  922M   0% /dev
tmpfs           188M   18M  171M  10% /run
/dev/sda1        57G   54G  566M  99% /
tmpfs           938M   84K  938M   1% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           938M     0  938M   0% /sys/fs/cgroup
cgmfs           100K     0  100K   0% /run/cgmanager/fs
tmpfs           188M   60K  188M   1% /run/user/1000
I think I can't use a vm
__________________

__________________
boat_alexandra is offline   Reply With Quote
Old 11-10-2015, 12:22   #47
Registered User
 
NahanniV's Avatar

Join Date: Mar 2011
Location: On the Boat
Boat: Finnsailer 38
Posts: 1,143
Re: Navico RADAR Plugin Optimization

Quote:
Originally Posted by boat_alexandra View Post
...
I have implemented color support, please verify because I no longer have a radar to play with.
Hi Sean,

I had a quick look:

Color support is working, but the performance of both Multi-Color and Mono-Color are nowhere near what they were last night ?
It's still good, just not as good.

Radar Only mode is working now, but it should be heads up.

Multi Sweep filter still blanks the screen.

Transparency is working correctly now.

Guard zone rendering appears to be working OK.

Cheers,
JM.
__________________

__________________
NahanniV is offline   Reply With Quote
Old 11-10-2015, 12:53   #48
Registered User
 
NahanniV's Avatar

Join Date: Mar 2011
Location: On the Boat
Boat: Finnsailer 38
Posts: 1,143
Re: Navico RADAR Plugin Optimization

Quote:
Originally Posted by NahanniV View Post
Hi Sean,

I had a quick look:

Color support is working, but the performance of both Multi-Color and Mono-Color are nowhere near what they were last night ?
It's still good, just not as good.

Radar Only mode is working now, but it should be heads up.

Multi Sweep filter still blanks the screen.

Transparency is working correctly now.

Guard zone rendering appears to be working OK.

Cheers,
JM.
Good news! I am wrong on several counts. I should never try to rush through anything (see avatar).

The Multi Sweep filter is working, it was not working in a version I was testing for Douwe.

Also, The performance is fine. I had inadvertently switched to Vector charts, last version was tested with Raster charts. That makes a big performance difference even in RADAR only mode where they aren't visible ! Can the RADAR Only mode be changed somehow so that the non visible charts do not cause a performance hit ?

Sorry for the confusion,
JM.
__________________
NahanniV is offline   Reply With Quote
Old 11-10-2015, 13:02   #49
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: Masachusetts
Boat: bristol 27
Posts: 2,803
Re: Navico RADAR Plugin Optimization

Quote:
Originally Posted by NahanniV View Post
Hi Sean,

I had a quick look:

Color support is working, but the performance of both Multi-Color and Mono-Color are nowhere near what they were last night ?
It's still good, just not as good.
The work got merged with some other recent changes which probably degraded performance. This also happens all the time in opencpn when someone else makes a change not realizing that it spoiled performance.

some of my changes were discarded by kees when he merged my work with douwe's... :sigh: I made this commit a second time so the performance should be back.

Could you give me what your cpu measurements are with and without the shader, and before and after you pull? I'm guessing you are using vector charts, it was less of an issue with raster before, but now it should be fine either way.
Quote:
Radar Only mode is working now, but it should be heads up.

Multi Sweep filter still blanks the screen.
These should now be fixed.

Quote:
Guard zone rendering appears to be working OK.
Yes, it isn't using the shader though.
__________________
boat_alexandra is offline   Reply With Quote
Old 11-10-2015, 14:14   #50
Registered User
 
NahanniV's Avatar

Join Date: Mar 2011
Location: On the Boat
Boat: Finnsailer 38
Posts: 1,143
Re: Navico RADAR Plugin Optimization

Quote:
Originally Posted by boat_alexandra View Post
...
Could you give me what your cpu measurements are with and without the shader, and before and after you pull? I'm guessing you are using vector charts, it was less of an issue with raster before, but now it should be fine either way...
System cpu usage 1%
OpenCpn Idle 7%
All RADAR tests Mono-Color, refresh rate =5

62% Last version, shader on, Overlaying Vector
17% Last version, shader on, Overlaying Raster
62% Last version, shader on, Rader Only with Vector not displayed
17% Last version, shader on, Radar Only with Raster not displayed
45% Last version, shader off, Overlaying Vector
45% Last version, shader off, Overlaying Raster
45% Last version, shader off, Rader Only with Vector not displayed
45% Last version, shader off, Radar Only with Raster not displayed

16% This version, shader on, Overlaying Vector
16% This version, shader on, Overlaying Raster
16% This version, shader on, Rader Only with Vector not displayed
16% This version, shader on, Radar Only with Raster not displayed
45% This version, shader off, Overlaying Vector
45% This version, shader off, Overlaying Raster
45% This version, shader off, Rader Only with Vector not displayed
45% This version, shader off, Radar Only with Raster not displayed

Multi Sweep filter seems OK.

RADAR ONLY orientation seems OK.

Only issue I see is sometimes a few of the spokes don't display correctly, will send a screen capture from my test machine shortly.

Cheers,
JM.
__________________
NahanniV is offline   Reply With Quote
Old 11-10-2015, 14:32   #51
Registered User
 
NahanniV's Avatar

Join Date: Mar 2011
Location: On the Boat
Boat: Finnsailer 38
Posts: 1,143
Re: Navico RADAR Plugin Optimization

Sean,

Here is a screen capture showing the strange spokes, they seem to happen when changing between Overlay and Radar Only mode, but other times too. After a min. or more they go away. Only happens in shader mode.

I think that's the last obvious problem.
Attached Thumbnails
Click image for larger version

Name:	2015-10-11_161500_1400x1050.png
Views:	73
Size:	278.8 KB
ID:	110792  
__________________
NahanniV is offline   Reply With Quote
Old 11-10-2015, 18:55   #52
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,382
Re: Navico RADAR Plugin Optimization

Yes, it's true that many have contributed time, considerable skills and effort - and it really shows with the posts here and the cooperative effort. So here is thanks to you all (and Sean who lent a big shoulder to get over a boulder.)
__________________
rgleason is offline   Reply With Quote
Old 12-10-2015, 09:16   #53
Registered User

Join Date: Oct 2012
Location: Brighton, UK
Boat: Westerly Oceanlord
Posts: 374
Re: Navico RADAR Plugin Optimization

Quote:
Originally Posted by merrimac View Post
Have you checked how the plugin handles (multiple) ethernet devices? It keeps joining multicast networks using each card in turn until it receives data from a radar, then 'sticks' to that network for the duration of the session. This has been done in a way that works on all three platforms. That isn't easy as all platforms have different ways of specifying which device/IP you want to multicast on.
Ah yes: Nice job on the getifaddrs() emulation on windows. My theory was probably wrong then.

Just a thought: if you've discovered the interface on which you're receiving data from the radar would it be an idea to do a setsockopt() on the transmit socket with IP_MULTICAST_IF and the address of the discovered interface? The assumption that you want to transmit commands on the same link that you're receiving them should probably hold true in most cases, although it would mean that you couldn't fix the issue with routing if that assumption didn't hold true.
__________________
muttnik is offline   Reply With Quote
Old 12-10-2015, 09:42   #54
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: Masachusetts
Boat: bristol 27
Posts: 2,803
Re: Navico RADAR Plugin Optimization

Quote:
Originally Posted by NahanniV View Post
System cpu usage 1%
OpenCpn Idle 7%
All RADAR tests Mono-Color, refresh rate =5

62% Last version, shader on, Overlaying Vector
17% Last version, shader on, Overlaying Raster
62% Last version, shader on, Rader Only with Vector not displayed
17% Last version, shader on, Radar Only with Raster not displayed
45% Last version, shader off, Overlaying Vector
45% Last version, shader off, Overlaying Raster
45% Last version, shader off, Rader Only with Vector not displayed
45% Last version, shader off, Radar Only with Raster not displayed

16% This version, shader on, Overlaying Vector
16% This version, shader on, Overlaying Raster
16% This version, shader on, Rader Only with Vector not displayed
16% This version, shader on, Radar Only with Raster not displayed
45% This version, shader off, Overlaying Vector
45% This version, shader off, Overlaying Raster
45% This version, shader off, Rader Only with Vector not displayed
45% This version, shader off, Radar Only with Raster not displayed
So clearly less cpu with the shader, but there should be a difference in cpu from the previous one without the shader...

Quote:
Multi Sweep filter seems OK.

RADAR ONLY orientation seems OK.

Only issue I see is sometimes a few of the spokes don't display correctly, will send a screen capture from my test machine shortly.

Cheers,
JM.
For the spokes... hmm I have seen this and I think maybe it is a problem with the gltexsubimage call... Basically it's missing the last column so it just needs a +1 somewhere.

As for reducing cpu usage when charts aren't even shown. Yes it's possible but would require a function to be added to the plugin interface to support this.
__________________
boat_alexandra is offline   Reply With Quote
Old 12-10-2015, 13:46   #55
Registered User
 
NahanniV's Avatar

Join Date: Mar 2011
Location: On the Boat
Boat: Finnsailer 38
Posts: 1,143
Re: Navico RADAR Plugin Optimization

Quote:
Originally Posted by boat_alexandra View Post
So clearly less cpu with the shader, but there should be a difference in cpu from the previous one without the shader...



For the spokes... hmm I have seen this and I think maybe it is a problem with the gltexsubimage call... Basically it's missing the last column so it just needs a +1 somewhere.

As for reducing cpu usage when charts aren't even shown. Yes it's possible but would require a function to be added to the plugin interface to support this.
All measurments were taken at max refresh rate, so there is still a lot of leeway to reduce CPU usage on slower systems by lowering that.

I think we can call this done if you can fix those bad spokes.

How much effort do you think it would take to get the shader working on OpenGL ES ?

Cheers,
JM.
__________________
NahanniV is offline   Reply With Quote
Old 13-10-2015, 00:34   #56
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: Masachusetts
Boat: bristol 27
Posts: 2,803
Re: Navico RADAR Plugin Optimization

It already works on openglesv2, but not openglesv1 which we use currently. If we can switch to v2 then we also get FBO (hardware accelerated panning)

It's not so simple to switch because v2 has no fixed function pipeline.
__________________
boat_alexandra is offline   Reply With Quote
Old 13-10-2015, 05:58   #57
Registered User

Join Date: Jan 2010
Location: Harlingen, NL
Boat: KMY Stadtship 56
Posts: 205
Re: Navico RADAR Plugin Optimization

Oops, sorry about the failed merge. There were many pages of changes because Douwe had forgot to fix his editor settings at some point, and I had fixed those up on master just after you branched from Douwe's code.

Thanks again for your wonderful work, couldn't have done it! In fact I think this is so good I merged your new changes onto my master branch, even if that artifact is still visible (I saw this as well) but this is too important to keep from the other testers and people compiling from my sources.
__________________
merrimac is offline   Reply With Quote
Old 13-10-2015, 06:04   #58
Registered User

Join Date: Jan 2010
Location: Harlingen, NL
Boat: KMY Stadtship 56
Posts: 205
Re: Navico RADAR Plugin Optimization

As to the 'radar only' mode, we really ought to create a new wxWindow with a 2nd wxCanvas and show the radar only mode there. This will also get rid of the (unwanted?) AIS triangles, allow a native head up mode, and improve performance as we're no longer drawing charts and then erasing them by painting black all over the main window!

If someone would like to help with that, I just don't have the time -- I am also working on Signal K and CANboat -- talking about that, I really need to reverse engineer my auto pilot controls so that I can control it from a smart watch...
__________________
merrimac is offline   Reply With Quote
Old 13-10-2015, 06:09   #59
Registered User

Join Date: Jan 2010
Location: Harlingen, NL
Boat: KMY Stadtship 56
Posts: 205
Re: Navico RADAR Plugin Optimization

Quote:
Originally Posted by boat_alexandra View Post
I have no movies or music to delete:
Code:
sean@coron:~$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            922M     0  922M   0% /dev
tmpfs           188M   18M  171M  10% /run
/dev/sda1        57G   54G  566M  99% /
tmpfs           938M   84K  938M   1% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           938M     0  938M   0% /sys/fs/cgroup
cgmfs           100K     0  100K   0% /run/cgmanager/fs
tmpfs           188M   60K  188M   1% /run/user/1000
I think I can't use a vm
60 Gig disk, I suppose that is a laptop? I've got some 'spare' SATA 2.5 disks for you, if you're interested?
__________________
merrimac is offline   Reply With Quote
Old 13-10-2015, 09:21   #60
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: Masachusetts
Boat: bristol 27
Posts: 2,803
Re: Navico RADAR Plugin Optimization

Yes, but I have no sata ports.
__________________

__________________
boat_alexandra is offline   Reply With Quote
Reply

Tags
navico, plug, radar

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 Radar Overlay PlugIn bdbcat OpenCPN 789 02-12-2017 04:23
Navico radar plugin hardware connection mikereed100 OpenCPN 8 07-12-2015 10:44
Bonehead Award - Navico 3G Radar Cap Erict3 Marine Electronics 30 17-07-2015 22:22
AIS Radar plugin wizard-merlin OpenCPN 1 04-08-2012 08:59
Navico BR24 Radar - Open Source protocol implementation maxxflow OpenCPN 23 30-07-2012 05:20



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 15:38.


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.