Cruisers Forum
 


Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 07-12-2014, 08:11   #31
Registered User

Join Date: May 2012
Posts: 1,184
Re: OTCurrent Plugin

Solved the problem of ebb tidal currents always showing as violet.

https://github.com/Rasbats/otcurrent_pi

The source has been updated. I needed to use the absolute value of the rate of tidal current. OpenCPN code calculates + and - values for the different direction of flow which meant that all -ve values showed as less than 0.5 kts (violet).

The compiled plugin for Win, O 3.2.2 upwards, is attached. Remove the pdf extension.

The choice of colours is difficult. I am looking at a colorpicker solution, as implemented by Scannav.

Thanks.

Mike
Attached Thumbnails
Click image for larger version

Name:	current.colours.jpg
Views:	304
Size:	23.2 KB
ID:	93170  
Attached Files
File Type: pdf otcurrent_pi.dll.pdf (170.5 KB, 66 views)
Rasbats is offline   Reply With Quote
Old 07-12-2014, 14:23   #32
Registered User

Join Date: Jan 2011
Posts: 670
Re: OTCurrent Plugin

Quote:
Originally Posted by Rasbats View Post
Solved the problem of ebb tidal currents always showing as violet.

https://github.com/Rasbats/otcurrent_pi

The source has been updated. I needed to use the absolute value of the rate of tidal current. OpenCPN code calculates + and - values for the different direction of flow which meant that all -ve values showed as less than 0.5 kts (violet).

The compiled plugin for Win, O 3.2.2 upwards, is attached. Remove the pdf extension.

The choice of colours is difficult. I am looking at a colorpicker solution, as implemented by Scannav.

Thanks.

Mike
The update looks really good.

Colorpicker would be very nice, as long as the selections you make are remembered every time you re-launch the program. I am not sure yet whether the different colors are useful. I would want to use it for awhile before deciding. But colorpicker give an option for everyone to customize.

Right now my thinking is the arrow size plus speed numbers already give me redundant speed information, and different colors would be a third layer of redundancy. My concern is that the colors could be the same as some other symbols on the chart, and thus less visible. With a colorpicker, users all over he world (thus with very different chart color schemes) could tailor the colors for their own charts. I'd have the option of setting all the speeds to the same color if I wanted, or set different colors like it is now.

As for ebb vs. flood, I think the direction that the arrows point is a very clear way to convey that. But I'm just one opinion.
RhythmDoctor is offline   Reply With Quote
Old 07-12-2014, 16:51   #33
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,530
Images: 2
Re: OTCurrent Plugin

Quote:
The compiled plugin for Win, O 3.2.2 upwards, is attached. Remove the pdf extension.
The choice of colours is difficult. I am looking at a colorpicker solution, as implemented by Scannav.
very nice idea. i am starting to agree with rd, about direction, but would still like to see if there is some way to distinguish Flood from Ebb... Maybe Flood is Solid, Ebb is Hollow.

I like the idea of letting user set it too.
rgleason is online now   Reply With Quote
Old 14-12-2014, 12:56   #34
Registered User

Join Date: May 2012
Posts: 1,184
Re: OTCurrent Plugin

The otcurrent plugin now allows users to set the colours for the tidal current arrows. The colours are retained in opencpn.ini when the program/plugin closes.

https://github.com/Rasbats/otcurrent_pi

TODO: Some cleaning up of the code has been done but a lot more is needed.

Win version attached. For O 3.2.2 upwards.

Mike
Attached Files
File Type: pdf otcurrent_pi.dll.pdf (185.0 KB, 68 views)
Rasbats is offline   Reply With Quote
Old 14-12-2014, 15:39   #35
Registered User

Join Date: Jan 2011
Posts: 670
Re: OTCurrent Plugin

The new color selection feature looks great! I've already used it with different color scheme from what it originally had (green-yellow-orange-red-violet for progressively higher speeds)

There is a slight bug that I've noticed in this and prior versions of the plugin. You can see in the attached pic of the entrance to the C&D Canal in Delaware, MD (USA) that there is very low-speed current at 341-359 degrees where the vectors should be pointing north, but instead they are pointing west. There's another one with 166 degree which should be pointing south, but it's also pointing west. When I advance to a different time with higher currents, the vectors point in the proper direction.

I have not seen this bug at other stations, just these three stations which are in the vicinity of the canal, where the currents always run east-west.

Note that the numerical value for the current direction is always correct. It's just the arrow that points the wrong way.
Attached Thumbnails
Click image for larger version

Name:	OTCurrentBug.jpg
Views:	273
Size:	86.2 KB
ID:	93574  
RhythmDoctor is offline   Reply With Quote
Old 14-12-2014, 17:57   #36
Registered User

Join Date: Jan 2011
Posts: 670
Re: OTCurrent Plugin

By the way, I do want to thank you again for this amazing plugin. Today I was doing some planning for an early May 2015 trip down the Delaware River, and it's great to be able to scroll forward in time with just a couple mouseclicks to see the currents all the way down the river. Previously I had to use the (hopelessly terrible) Garmin Homeport software for this capability. With your plugin, OpenCPN becomes a dramatically improved tool for future planning.

Do you have any plans to do a similar tool for tidal stations?
RhythmDoctor is offline   Reply With Quote
Old 14-12-2014, 20:46   #37
Registered User

Join Date: Jan 2011
Posts: 670
Re: OTCurrent Plugin

Another small bug: Your arrows are not aware of manual screen rotation (implemented with [ and ] keys). When I rotate the screen with these keys, the arrows do not adjust their direction with the chart.

I just confirmed that the same problem happens when running in "Course Up" mode. When the chart rotates to maintain "Course Up" the current vectors do not adjust properly.

I generally always use North Up when planning future routes, so it's not a serious problem for me. But it may be a problem for others.
RhythmDoctor is offline   Reply With Quote
Old 15-12-2014, 05:51   #38
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,530
Images: 2
Re: OTCurrent Plugin

Mike, deleted plugin otcurrent_pi and did a fresh git clone
git clone git://github.com/Rasbats/otcurrent_pi.git
mkdir build
cd build
copied opencpn3-2-2.lib to /build/opencpn.lib
cmake .. etc and I get 3 errors. Can you help me out?
Quote:
Build FAILED.

"C:\Data-Dart\Up-Soft\Navigation\o-plugin\otcurrent_pi\build\ALL_BUILD.vcxproj"
(default target) (1) ->
"C:\Data-Dart\Up-Soft\Navigation\o-plugin\otcurrent_pi\build\otcurrent_pi.vcxpro
j" (default target) (3) ->
(ClCompile target) ->
c:\data-dart\up-soft\navigation\o-plugin\otcurrent_pi\src\otcurrent_pi.h(43):
fatal error C1083: Cannot open include file: '../../../include/ocpn_plugin.h': N
o such file or directory [C:\Data-Dart\Up-Soft\Navigation\o-plugin\otcurrent_pi\
build\otcurrent_pi.vcxproj]
..\src\otcurrentOverlayFactory.cpp(45): fatal error C1083: Cannot open include
file: 'dychart.h': No such file or directory [C:\Data-Dart\Up-Soft\Navigation\o
-plugin\otcurrent_pi\build\otcurrent_pi.vcxproj]
c:\data-dart\up-soft\navigation\o-plugin\otcurrent_pi\src\otcurrent_pi.h(43):
fatal error C1083: Cannot open include file: '../../../include/ocpn_plugin.h': N
o such file or directory [C:\Data-Dart\Up-Soft\Navigation\o-plugin\otcurrent_pi\
build\otcurrent_pi.vcxproj]
0 Warning(s)
3 Error(s)
rgleason is online now   Reply With Quote
Old 15-12-2014, 11:08   #39
Registered User

Join Date: May 2012
Posts: 1,184
Re: OTCurrent Plugin

Ok, github has been updated. I removed dychart.h and made direct reference to opencpn_plugin.h, instead of ../.. etc.

The plugin now compiles with 5 warnings, no errors. The warnings I know about.

BUT ... there seems to be a unicode problem on my machine. I get garbled text when running the plugin and the icon is not correct.

Rick ... please try git clone again and see if you have the same problem.

Thanks.
Mike
Rasbats is offline   Reply With Quote
Old 15-12-2014, 14:14   #40
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,530
Images: 2
Re: OTCurrent Plugin

Mike,

did git fetch
and got 3 errors.
went back and did git pull, downloaded several files.
compiled and got the 5 errors.

yes, I can't cpack it using NSIS now.
nohal has an earlier version that does compile here which might help.
https://github.com/nohal/otcurrent_pi maybe a file comparison would shed some light.

Quote:
Build succeeded.

"C:\Data-Dart\Up-Soft\Navigation\o-plugin\otcurrent_pi\build\ALL_BUILD.vcxproj"
(default target) (1) ->
"C:\Data-Dart\Up-Soft\Navigation\o-plugin\otcurrent_pi\build\otcurrent_pi.vcxpro
j" (default target) (3) ->
(ClCompile target) ->
..\src\otcurrent_pi.cpp(405): warning C4800: 'long' : forcing value to bool 't
rue' or 'false' (performance warning) [C:\Data-Dart\Up-Soft\Navigation\o-plugin\
otcurrent_pi\build\otcurrent_pi.vcxproj]
..\src\otcurrent_pi.cpp(406): warning C4800: 'long' : forcing value to bool 't
rue' or 'false' (performance warning) [C:\Data-Dart\Up-Soft\Navigation\o-plugin\
otcurrent_pi\build\otcurrent_pi.vcxproj]
..\src\otcurrent_pi.cpp(407): warning C4800: 'long' : forcing value to bool 't
rue' or 'false' (performance warning) [C:\Data-Dart\Up-Soft\Navigation\o-plugin\
otcurrent_pi\build\otcurrent_pi.vcxproj]
c:\data-dart\up-soft\navigation\o-plugin\otcurrent_pi\src\otcurrentuidialog.cp
p(724): warning C4700: uninitialized local variable 'text' used [C:\Data-Dart\Up
-Soft\Navigation\o-plugin\otcurrent_pi\build\otcurrent_pi.vcxproj]
c:\data-dart\up-soft\navigation\o-plugin\otcurrent_pi\src\otcurrentuidialog.cp
p(728): warning C4700: uninitialized local variable 'spinner' used [C:\Data-Dart
\Up-Soft\Navigation\o-plugin\otcurrent_pi\build\otcurrent_pi.vcxproj]

5 Warning(s)
0 Error(s)
rgleason is online now   Reply With Quote
Old 15-12-2014, 14:32   #41
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,530
Images: 2
Re: OTCurrent Plugin

Excuse me Mike, I had not run
cmake --build . --config release
then ran
cpack
and it compiled fine.
will put on Opencpn Beta File thingie.
File Thingie 2.5.7 rguser rgpass
Under 3.2.2 PI Win

Plugin works fine. Needed to select colors because all fill colors were red.
Would like to have Outline colors with hollow, for ebb tide.
rgleason is online now   Reply With Quote
Old 16-12-2014, 07:15   #42
Registered User

Join Date: May 2012
Posts: 1,184
Re: OTCurrent Plugin

There were two files that had not been updated: otcurrent_pi.pot and POTFILES.in. They referred to tcurrent names not otcurrent.

GitHub has been updated for this.

However ... using Git I am producing a plugin with strange characters. And the plugin crashes OpenCPN. This does not happen when using VS2010 Express. In the past I found that this indicated a UNICODE (lack of) problem.

Anyone have any ideas?

Thanks.
Mike
Attached Thumbnails
Click image for larger version

Name:	otcurrent_problem.jpg
Views:	277
Size:	5.3 KB
ID:	93708  
Rasbats is offline   Reply With Quote
Old 16-12-2014, 08:37   #43
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,530
Images: 2
Re: OTCurrent Plugin

Mike, I just git fetch and compiled the exe version with 0 warnings and 0 errors!

So it works excellently on this end. Hope that helps.

Also updated the file on Opencpn Beta File thingie

"using Git I am producing a plugin with strange characters." Do you mean cmake?
from build directory?
cmake ..
cmake --build .
cmake --build . --config release
cpack
rgleason is online now   Reply With Quote
Old 10-01-2015, 08:33   #44
Registered User

Join Date: Nov 2009
Posts: 45
Re: OTCurrent Plugin

This looks perfect for my needs, i just cant figure out how to install it. Its not listed in PlugIns | Official OpenCPN Homepage is that because its still in beta? I would love to try it out, but just don't understand the install.
StargazerWA is offline   Reply With Quote
Old 10-01-2015, 08:45   #45
Registered User

Join Date: Jan 2011
Posts: 670
Re: OTCurrent Plugin

Download from the the user forum using the link I provided, rename the file to .dll, move it into the \Program Files\opencpn\plugins folder (will be in Program Files (x86) on 64-bit Windows systems), then launch OpenCPN and activate it in Options-Plugins
RhythmDoctor is offline   Reply With Quote
Reply

Tags
current, plug

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
Plugin: DashBoard SethDart OpenCPN 638 Today 13:48
OpenCPN PlugIn Development bdbcat OpenCPN 161 04-09-2019 12:50
BSB 4 PlugIn bdbcat OpenCPN 98 25-04-2018 18:46
New History Plugin for OpenCPN seandepagnier OpenCPN 11 04-10-2010 14:11
Writing Plugin for nv.digital Map Format ? Netsurfer OpenCPN 7 17-08-2010 16:09

Advertise Here


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


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.