Cruisers Forum
 


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 24-12-2014, 09:31   #1
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,627
Images: 2
Tack and Laylines Plugin - Beta?

From your local standalone plugins compile directory
git clone git://github.com/cowelld/tackandlay_pi.git tackandlay_pi

After changing tackandlay.h line 34 to
// #include "ocpnDC.h"
#include "ocpn_plugin.h"

Then copy the correct version of opencpn.lib into the build directory.
I used opencpn3-3-2410.lib because the plugin is API 1.11

Compiles under Windows7 as standalone. Also made executable with NSIS setup.
cmake ..
cmake --build .
cmake --build . --config release
cpack

-----------------
Have tried this with very recent compile of Opencpn beta 3.3.2410.
Requires opengl be turned on. Preferences prompts for a *.pol boat polar file, which when selected a blank polar comes up in a window.
After starting grib and setting boat location and waypoint, can't figure out how to get the plugin to work.
------------------
Can anyone make some suggestions?
------------------
Looks like it could be an extension of Konni Polars or Sean's Weather_routing.

rgleason is offline   Reply With Quote
Old 03-03-2015, 18:38   #2
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,627
Images: 2
Re: Tack and Laylines Plugin - Beta?

There are some difficulties importing Polars and seeing them on the polar grid, also the polars. I do not know which version works with tack and lay. Polar_pi had a similar problem and it was fixed recently so it is much easier to use with weather_routing_pi (Polar_pi polar file version was using several slightly different things such as delimiters and the starting True wind designators.

Dave has offered to fix this so that polars are more forgiving about tab delimiters and ";" and the capitalized true wind first line designators vs lower case, and the other subtle true wind designator differences.

Therefore I am attaching several different examples of .pol (polar_pi and other programs) and .csv files (weather_routing)

So here are the files:

Alexandra_Polar.pol
Quote:
twa/tws;0;2;4;6;8;10;12;15;18;21;24;28;32;36;40;45;50; 55;60
0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0
3;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0
6;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0
9;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0
12;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0
15;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0
18;0;0.37449;0.53288;0.65063;0.74674;0.83071;0.904 38;1.0022;1.0888;1.167;1.2385;1.3257;1.4054;1.479; 1.5476;1.6274;1.7016;1.7703;1.8359
...Shortened

boat_A35.pol

Quote:
TWA\TWS 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 60
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
5 0 0.21 0.42 0.63 0.8 0.86 0.92 0.94 0.95 0.97 0.98 0.98 0.99 0.95 0.88 0.81 0.74 0.67 0.6 0.53 0.46 0.37 0.28 0.19 0.09 0 0 0 0 0 0
10 0 0.42 0.85 1.27 1.6 1.72 1.83 1.88 1.91 1.93 1.95 1.96 1.97 1.91 1.77 1.63 1.49 1.35 1.21 1.07 0.93 0.74 0.56 0.37 0.19 0 0 0 0 0 0
15 0 0.64 1.27 1.9 2.4 2.59 2.75 2.83 2.86 2.9 2.93 2.94 2.96 2.86 2.65 2.44 2.23 2.02 1.81 1.6 1.4 1.12 0.84 0.56 0.28 0 0 0 0 0 0

60ftmono.pol

Quote:
TWA 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
30 1.2 2.0 2.8 3.6 4.2 4.8 5.4 5.9 6.3 6.7 7.0 7.2 7.4 7.5 7.6 7.7 7.8 7.8 7.8 7.8 7.8 7.7 7.7 7.6 7.5 7.4 7.3 7.1 7.0 6.9 6.8 6.7 6.8 6.9
32 1.4 2.2 3.1 3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 10.0 10.1 10.1 10.1 10.1 10.1 10.1 10.1 10.1 10.1 10.1 10.1 10.1 10.0 10.1 10.1
48 2.3 3.6 4.8 5.8 6.8 7.5 8.2 8.8 9.1 9.4 9.5 9.7 9.8 9.9 10.0 10.0 10.1 10.1 10.2 10.2 10.2 10.3 10.3 10.3 10.3 10.3 10.3 10.3 10.3 10.3 10.3 10.2 10.3 10.3
50 2.4 3.7 5.0 6.0 6.9 7.7 8.4 8.9 9.3 9.5 9.7 9.8 9.9 10.0 10.1 10.2 10.2 10.3 10.3 10.4 10.4 10.4 10.5 10.5 10.5 10.5 10.5 10.5 10.5 10.5 10.5 10.4 10.5 10.5
Attached Files
File Type: doc Alexandra_Polar-CSV.doc (10.8 KB, 61 views)
File Type: doc Nell_Polar_Computed.CSV.doc (7.3 KB, 87 views)
File Type: doc boat_Class40.pol.doc (5.7 KB, 72 views)
File Type: doc boat_A35.pol.doc (5.4 KB, 57 views)
File Type: doc Boat_Polar.CSV.doc (7.3 KB, 57 views)
File Type: doc 60ftmono.pol.doc (12.2 KB, 67 views)
rgleason is offline   Reply With Quote
Old 06-03-2015, 05:56   #3
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,627
Images: 2
Re: Tack and Laylines Plugin - Beta?

Dave,
You can also go to OpenCPN Beta File Thingie rguser rgpass and find the Polar_Files folder. There are polar files there and under the next sub-folder Perf_Polar (101 files) and Perf_Excel (2 files) there are other examples. Sorry I forgot I had uploaded those.
rgleason is offline   Reply With Quote
Old 08-03-2015, 06:34   #4
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,627
Images: 2
Re: Tack and Laylines Plugin - Beta?

Polar Files - Ingestion - Cruisers & Sailing Forums
rgleason is offline   Reply With Quote
Old 24-03-2015, 23:35   #5
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,627
Images: 2
Re: Tack and Laylines Plugin - Beta?

Dave,

I have moved both your version of Polar_pi and and TackandLay_pi into MSVC++10 OpenCPN project V4.1 and they compile fine with no errors.

I have tried to run OpenCPN project (after picking opencpn as startup project) in Debug mode and am getting errors possibly because I have some MSVC setup glitch (I have copied uidata over, perhaps I need other stuff), anyway I am going to use the release versions in the V4.1 that I compiled earlier and installed to see where I get until I can get debug msvc working.

I think tackandlay is compiled and will work now. I had your modified polar_pi working this morning.
rgleason is offline   Reply With Quote
Old 28-04-2015, 20:42   #6
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,627
Images: 2
Re: Tack and Laylines Plugin - Beta?

I have recompiled and uploaded again. Then tried it. I was able to show a polar file in the polar screen when it was loaded. Then tried to set a Race mark and bombed before I could load VDR with the Harmut file to provide the necessary data. This plugin requires Opencpn be turned ON.

Here are screenshots of what I could take.
Attached Thumbnails
Click image for larger version

Name:	TackandLay.png
Views:	336
Size:	168.0 KB
ID:	101141   Click image for larger version

Name:	TackandLay-2.png
Views:	302
Size:	167.9 KB
ID:	101142  

rgleason is offline   Reply With Quote
Old 28-04-2015, 20:55   #7
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,627
Images: 2
Re: Tack and Laylines Plugin - Beta?

1. Requires Opengl to be turned on.
2. From Settings > Options > Plugins > TnL Preferences pick a polar that shows.
3. First set a Race Mark (Right Click) in the area of the nmea data.
4. Then start the Nmea data stream (Hartmut file, netherlands has wind, cog, sog, etc)
5. You can see a block like boat with an indicator for wind I believe. You will also see an indicator at the Race mark.
6. Then it froze on me this time.
7. Did this twice.
rgleason is offline   Reply With Quote
Old 08-02-2016, 05:06   #8
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,627
Images: 2
Re: Tack and Laylines Plugin - Beta?

This morning I thought I would try to build tackandlay_pi and it worked.
It is uploaded to Opencpn Beta File thingie.
I have opened it and started using it, but am still learning how it works again.
Give it a try, report back please.

OpenCPN Beta File Thingie rguser rgpass
Under 4.2.0 PI WIN
TackandLay_pi-0.1-ov4.2-3f43f08-cor-VMG-calc-win32
rgleason is offline   Reply With Quote
Old 21-03-2016, 17:30   #9
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,627
Images: 2
Re: Tack and Laylines Plugin - Beta?

Beta for 4.2. - Tack and Lay Plugin for Sailors. (by Dave Cowelld.)

First, this plugin requires a Polar file that uses [TAB] delimiters and CRLF or LF at the end of each line. Currently it will not ingest polars that use [space] delimiters or [; semi-colon] delimiters as Polar_pi and Weather_routing do.

So make sure the polar you use is TAB delimited. I have not found many that way, but using notepad++, the find and replace and the extended characters button, with /t used for TAB it can be accomplished fairly readily. Hopefully Dave will make the plugin more useful by cribbing the portions of Polar_pi that ptulp created so successfully and effectively.

I will upload a polar file that works, along with a
GFS20160321230606102.grb.doc grib file to be used with grib_pi and
TackandLay_pi-0.1-ov4.2-3f43f08-cor-VMG-win32.exe.doc
Please take the ".doc" off of each of these files before using.

Hartmut-netherlands.txt.zip.pdf please take .pdf off and unzip it.
Attached Files
File Type: doc GFS20160321230606102.grb.doc (22.5 KB, 45 views)
File Type: doc Oceanis-Polar-Tab-delimited.pol.doc (4.1 KB, 44 views)
File Type: doc TackandLay_pi-0.1-ov4.2-3f43f08-cor-VMG-win32.exe.doc (241.8 KB, 45 views)
File Type: pdf Harmut-Netherlands.zip.pdf (484.9 KB, 81 views)
rgleason is offline   Reply With Quote
Old 21-03-2016, 17:53   #10
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,627
Images: 2
Re: Tack and Laylines Plugin - Beta?

Ok after you have downloaded and changed the names and unzipped Harmut-netherlands.txt and placed them in the respective directories for grib, nmea, and polar files, install tackandlay and VDRplayer.

Then open OpenCPN and Enable the plugin under Settings > Plugins > TackandLay.
You will then want to click on Preferences to direct TackandLay to use the Polar you downloaded, browse to the polar and the Polar graphic should appear.

Then click on OK and Apply. Then Close and you should be back to the main screen.

1. GRIB - Click on Grib and load the grib provided.
2. Go to the Netherlands or hit Center on the Grib control panel and zoom in. Now you know where it is located.
3. VDR File - Click on the VDR player (not VDRrecord) and select the vdr file Harmut-netherlands.txt. From the menubar AIS dropdown turn off Attenuate Less Critical and Show AIS - those aren't needed.
4. Now click on the TnL button in the Toolbar. You will see a sketch of a boat and two tack lines with a wind indicator. And also the Own boat will change to show two laylines going from the boat.
5. Now pick where a partially windward Race Mark might be set by right clicking and select from the dropdown "Set Race Mark". A mark will eventually appear with also with two laylines.
6. Now watch the race unfold, as in armchair sailor. Get used to doing this so you can do it on the water.

A little problem: I think the VDR might be crashing, but I am not sure. It could also be TackandLay is not good on memory and has memory leaks, but I am not sure. This will need to be fixed. Also we would like to set the angles of the laylines, separately for port and starboard.

It could be a very nice useful plugin and it is very close to working!
I have a bunch of screenshots below.
Attached Thumbnails
Click image for larger version

Name:	TnL+VDR+Grib.png
Views:	165
Size:	93.5 KB
ID:	121174   Click image for larger version

Name:	TnL-earlier-screen-Set-Race-point.png
Views:	196
Size:	193.9 KB
ID:	121175  

Click image for larger version

Name:	TnL-Earlier-shot-Shows-Race-Mark.png
Views:	202
Size:	265.5 KB
ID:	121176   Click image for larger version

Name:	O-not-responding.png
Views:	170
Size:	60.2 KB
ID:	121177  

Click image for larger version

Name:	VDR-Memory-Issue-perhaps.png
Views:	155
Size:	131.2 KB
ID:	121178  
rgleason is offline   Reply With Quote
Old 21-03-2016, 17:58   #11
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,627
Images: 2
Re: Tack and Laylines Plugin - Beta?

Here is the Options > Plugins - Tack and Lay - Preferences results showing the polar loaded.
Attached Thumbnails
Click image for larger version

Name:	TnL-Options-PLugins-Preferences.png
Views:	165
Size:	149.9 KB
ID:	121179  
rgleason is offline   Reply With Quote
Old 22-03-2016, 05:25   #12
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,627
Images: 2
Trying to Isolate the cause of the OpenCPN crashes.

See the VDR thread. Ran some tests using OpenCPN 4.2.0 + VDR_pi and I've concluded that is not the problem.

Now running Ov4.2.0 + VDR_pi with Hartmut-Netherlands.txt nmea file (3mb) and
Grib_pi with a small 8 day Wind and Wind gust grib to see if there is a failure.

About Halfway through the VDR file CPU max was 3.2% and Memory max was increasing and at 142.8mb. I thought there would be a problem but all of a sudden something got flushed and the memory use went back down to about 115mb.

And now about 3/4 of the way through the VDR file with Grib file playing continuously, CPU max is 1% and Memory use max is 58mb.

Now at the end of the VDR file CPU is about and Memory use max is

So it appears that both these plugins are not the problem..CPU 1.1% and Memory max 59mb

That would lead to the TackandLay Plugin as the likely problem.
rgleason is offline   Reply With Quote
Old 22-03-2016, 06:33   #13
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,627
Images: 2
Re: Tack and Laylines Plugin - Beta?

I tried building a fresh version of TackandLay_pi from Dave Cowelld's git repository.

C:\Users\Frederick\Documents\GitHub\o-plugin\dc-tackandlay_pi>git branch -va
* master 3f43f08 Corrected VMG calculation
remotes/origin/HEAD -> origin/master
remotes/origin/master 3f43f08 Corrected VMG calculation

It compiled beautifully without a single warning or error.
When I try it with Opencpn v4.2.0 it seems to fail immediately.

It did not seem to require the standard buildwin package (no errors) but I copied those files and directories over to the buildwin directory and built the plugin again and installed it in O4.2.0.

This one seems to be crashing. Will report more later.
rgleason is offline   Reply With Quote
Old 22-03-2016, 07:58   #14
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,627
Images: 2
Re: Tack and Laylines Plugin - Beta?

Reading the Polar Files seems to be the main Crash problem IMHO

I need to remind about this post
http://www.cruisersforum.com/forums/...ml#post1768749

Also this github thread
https://github.com/cowelld/tackandla...ment-199705153

Today I have concluded that the plugin gets to the starting blocks, but fails to start due to problems reading polars.

First I tried making the oceanis-fintot polar smaller, just up to 14 knots.
That was read under preferences, but the plugin failed after starting.

Then I realized that 145 degrees line had zeros in it, so I interpolated the speed in place of the zeros. (The plugin should just throw that line out (all zeros, bad data).
That was read under preferences, but the plugin failed after starting.

Then I tried just deleting the 145 degree line.
That was read under preferences, but the plugin failed after starting.

I also tried version 4.2.0 and 4.2.1 Opencpn, and also tried running the plugin without Grib data, because I think the wind data comes from the nmea file.

None of it really made a difference. The plugin seems to crash each time after showing promise by display of laylines at the boat, at the boat symbol to the side and at the Race Mark (when this is possible, but this morning it always crashed before I could place a Race mark and I cannot determine what has changed from last night.

I am going to attach some pics and various polar files tried. So perhaps the problem can be fixed.
Attached Thumbnails
Click image for larger version

Name:	Polar-fill-appears-to-load-ok.png
Views:	140
Size:	100.4 KB
ID:	121244   Click image for larger version

Name:	Options-Plugins-TnL-Preferences.png
Views:	158
Size:	249.2 KB
ID:	121245  

Click image for larger version

Name:	Typical-when-opening-Polar-file-found-laylines-show-then-crash.png
Views:	156
Size:	47.2 KB
ID:	121246   Click image for larger version

Name:	Notebook++Polar-file-view-with-View-Show-Symbol-all-On.png
Views:	158
Size:	210.7 KB
ID:	121247  

Click image for larger version

Name:	Notebook++View-of-smaller-polar-145-line-completed-without-zeros.png
Views:	125
Size:	349.1 KB
ID:	121248  
Attached Files
File Type: txt oceanis31-finot-conq-TAB-smaller-and-fix-145-zeros.pol.txt (944 Bytes, 58 views)
File Type: doc oceanis31-finot-conq-TAB-delete145-zeros-line.pol.doc (2.0 KB, 39 views)
File Type: doc Oceanis-Polar-Tab-delimited.pol.doc (4.1 KB, 41 views)
rgleason is offline   Reply With Quote
Old 24-03-2016, 00:49   #15
Registered User

Join Date: Mar 2013
Location: Le Bono, Brittany, France
Boat: Northshore, Southerly 110, 10.30m
Posts: 63
Re: Tack and Laylines Plugin - Beta?

For those who are still interested in getting tackandlay plugin to work, I have made a fork with an import of the polar file loading code from polar_pi.

I have also added a few correction in the logic to avoid crashes when entering invalid or empty file name and defined a control of the limit for boat speed and wind angle to avoid array limit violation when reading invalid data.

My patches have not made it yet in Master but can be cloned here.
git@github.com:dominig/tackandlay_pi.git

Note they are still quite a few issues to solve to get that plugin at release level.

Unfortunately, it is still easier to get it to crash than to work.

Regards

Dominig
dominig is offline   Reply With Quote
Reply

Tags
plug


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
sail by lee and starport tack whoiswct Rules of the Road, Regulations & Red Tape 20 14-10-2014 11:54
Bug: Grib plugin fails to load on beta Version 3.1.1319 Build 2013-01-19 AlainT OpenCPN 5 01-02-2013 03:09
400: Starboard Tack and Autopilot Fuse Life Aquatic Lagoon Catamarans 0 07-09-2011 11:49
Hard Tack and Swill smithy Cooking and Provisioning: Food & Drink 15 31-07-2011 05:04

Advertise Here


All times are GMT -7. The time now is 07:49.


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.