Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 30-03-2016, 15:33   #16
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,377
Re: Tack and Laylines Plugin - Beta?

Dominig has been working on Dave's plugin and it now builds in windows vc++ and runs! More details later. Thankyou Dominig!
__________________

__________________
rgleason is online now   Reply With Quote
Old 31-03-2016, 15:34   #17
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,377
Re: Tack and Laylines Plugin - Beta?

Dominig has been improving Dave's plugin and it is now working for Windows users.
Thank you again.

This is a Beta, and there are still some things needed but on my machines when an appropriate VDR nmea file is played it is showing laylines. I am not yet sure if the math for the laylines is correct, as I need to find a nmea recording that has a boat tacking upwind. Also it would help greatly if the VDR_pi player controls were improved so that we could select where to start playing the file on the progress bar and be able to continue to select the start location...

Anyway, here is a first description of how to use the TackandLay_pi Plugin.

TackandLayline_pi

Windows Installation and Use

Download the plugin from the Opencpn.org download website (or Opencpn Beta File Thingie https://tgp-architects.com/files/ rguser rgpass First check the SHA258 for the file to be sure it is orginal. Also while you are on OpenCPN Beta File Thingie look under "Home/Polar Files/Polars" and download one or two polars for your use with the TackandLay_pi plugin. Also download the file Hartmut-Netherlands-Leg1.txt and Hartmut-Netherlands-Leg2.txt from the Nmea directory. Save these files to a directory you can access from Opencpn.

Then execute the tackandlay_pi.exe file and install into Opencpn4.2.0 or 4.2.1. Be sure that tackandlay_pi.dll landed in the proper opencpn/plugins folder (check the folder).

From inside OpenCPN select Options > Plugins > Find the TnL plugin and "Enable" it. Then select "Preferences" and a file browser window will immediately pop up and prompt you for the location of the Polar file you wish to use (See 1st screenshot). Select one of the polar files you downloaded. Once the polar file is selected the Polar graphic should appear in a window (see 2nd screenshot). Now hit "OK" in the Options menu to go back the the main program.

For testing purposes, you must install VDR_pi (Voyage Data Recorder/Player) and "play" a nmea file, to provide data if you are not providing an active stream of nmea boat data to OpenCPN. Install and enable VDR_pi and start the plugin by hitting the "Play" icon and selecting the Hartmut-Netherlands-Leg1.txt for example. Once the file is being played you should see Own boat moving (in the Netherlands-Merkermeer area) and a progress file being displayed. Speed up playing of the file with the speed slider. Check that there is a steady stream of nmea data recieved by OpenCPN by using Options > Connections > Show Nmea window. Next turn off the AIS data to simplify the screen, by selecting Menubar dropdown uncheck "Show AIS targets".

Now start the TnL plugin by clicking on the TnL toolbar icon. A graphic of the boat in a circle should pop up with an indicator for Wind (do not know if it is True or Apparent). Also the boat should show two laylines that are green or cyan or black at different times, along with a wind feather. (See the 3rd screenshot).

Next "Set Race Mark" by hovering the mouse in an appropriate location, Right Click and select "Set Race Mark".
(See the 3rd screenshot for the popup menu). This Race mark can be reset in a different location using the same Right-Click selection.

===
Notes: I have not figured out what data the plugin is using or what formulas, to create the laylines. On this machine the laylines seem to be closer together, however the wind always seems to be downwind with the nmea files I am using and I am not at all sure the laylines are acting correctly yet. However these are just improvements in the math that may be needed. For some reason on the other machine I was getting laylines that made more sense to me.

We also need to determine which data is being used. GPS or Speedo and Heading, True or Apparent Wind, etc. and exactly what the math should be.

Rick Gleason
Attached Thumbnails
Click image for larger version

Name:	Options-Plugins-Tnl-Enable-Preferences-Browse-Polar.png
Views:	168
Size:	181.1 KB
ID:	121793   Click image for larger version

Name:	TnL-Options-Plugins-Tnl-Enable-Preferences-Polar.png
Views:	143
Size:	198.0 KB
ID:	121794  

Click image for larger version

Name:	TnL-Right-Click-Set-Race-Mark.png
Views:	161
Size:	187.6 KB
ID:	121795  
__________________

__________________
rgleason is online now   Reply With Quote
Old 31-03-2016, 15:45   #18
Registered User

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

Quote:
Originally Posted by rgleason View Post
Dominig has been improving Dave's plugin and it is now working for Windows users.
Thank you again...
.... I am not yet sure if the math for the laylines is correct, as I need to find a nmea recording that has a boat tacking upwind.
Rick Gleason
I know that they are not.
Tracked with bug https://github.com/cowelld/tackandlay_pi/issues/18

With a bit of luck I will find a correction soon
__________________
dominig is offline   Reply With Quote
Old 31-03-2016, 15:55   #19
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,377
Re: Tack and Laylines Plugin - Beta?

Note Preliminary User Guide is here
https://github.com/oyvjel/tackandlay_pi/wiki
I used the screenshot URL's for the Cruisers Forum Tackandlay Thread and it worked for the Github User guide. ...Very handy, but where are screenshots stored or uploaded in github? Still have not figured this part out. If you give a URL does github just store a copy of the image?

Later: Yes
https://camo.githubusercontent.com/a...39343630333139

Dominig
Quote:
I know that they are not.
Tracked with bug https://github.com/cowelld/tackandlay_pi/issues/18
Thanks, will try to help on this.

I need make a new TackandLay documentation page on OpenCPN.org User Docs.
__________________
rgleason is online now   Reply With Quote
Old 31-03-2016, 16:18   #20
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,377
Re: Tack and Laylines Plugin - Beta?

OpenCPN Beta File Thingie rguser rgpass
tackandlay_pi-0.2-win32 is available.
Windows Beta

VirusTotal.com results
SHA256: eb75578e79ec736c689017ead56ad4758034c61868724ce5ec 20fb6dc0a10e5e File name: tackandlay_pi-0.2-win32.exe Detection ratio: 0 / 56 Analysis date: 2016-03-31 22:07:30 UTC ( 1 minute ago )
__________________
rgleason is online now   Reply With Quote
Old 31-03-2016, 16:37   #21
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,377
Re: Tack and Laylines Plugin - Beta?

From looking at the Dashboard instruments while playing VDR_pi with Hartmut-Netherlands-Leg1.txt it appears that the green wind arrow at the boat symbol inside the circle is using True Wind Direction. Also I believe SOG and COG (from GPS) are being used. Not Heading and STW. This is not necessarily bad, we just should know, and perhaps in the future be able to pick which is being used after we figure things out.
__________________
rgleason is online now   Reply With Quote
Old 02-04-2016, 07:11   #22
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,377
Re: Tack and Laylines Plugin - Beta?

Please note the User Guide has been moved to Dave's Github wiki now:

https://github.com/cowelld/tackandla..._pi-User-Guide
__________________
rgleason is online now   Reply With Quote
Old 04-04-2016, 19:28   #23
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,377
Re: Tack and Laylines Plugin - Beta?

Dominig,

Have git fetch and built your polar changes. Then tried using TnL.
1. Loading Polars seemed more stable and reliable.
2. There were some differences dependent on the end of line having [CL][LF] or [LF]

When the file (A36-polars) has end of line [LF] there is a second black set of polars showing in the polar diagram and the two laylines are further apart.

When the file (Bristol32-polars) uses end of line [CL][LF] the polar diagram shows as being more accurate without the black overlay, with this polars the laylines are close together.

Attached are multiple polars for A-36 and Bristol32 is separate zip files. Please remove the .PDF and unzip. The A-36 files create the doubled black polar diagram. The Bristol32 files create the single polar but the laylines are closer together.
The Bristol32 files are all (semi-colon) ; delimited. The A-36 polar files are Tab delimited, and ; delimited. I did not try space delimited yet.

I've been looking for a good nmea file with SOG, COG, wind and position with the wind clearly upwind and then a good segment downwind, for testing. However I have not found one yet.

Hartmut-Netherlands is generally wind direction as more of a reach, but it does have all the data required to run TnL. I find that when the wind goes forward of the beam the laylines change, same thing when wind goes aft of the beam, the laylines change to black color. I believe. When this occurs, the position of the "Race Mark" should be moved by hand to be downwind or upwind, as appropriate, in order to visualize how the laylines should be working.
Attached Thumbnails
Click image for larger version

Name:	Bristol32.png
Views:	93
Size:	111.3 KB
ID:	122011   Click image for larger version

Name:	Bristol32-file.png
Views:	49
Size:	27.6 KB
ID:	122012  

Click image for larger version

Name:	A36-Polar.png
Views:	54
Size:	222.8 KB
ID:	122014  
Attached Files
File Type: pdf Bristol32-Polar.zip.pdf (1.6 KB, 10 views)
File Type: pdf A-35-Polar.zip.pdf (6.6 KB, 7 views)
__________________
rgleason is online now   Reply With Quote
Old 05-04-2016, 08:32   #24
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,377
Re: Tack and Laylines Plugin - Beta?

I've been trying to determine what is the essential nmea data for the current Tackandlay_pi to work.

I know Hartmut-Netherlands.txt does work and contains
Position
COG
SOG
Mag HDG
STW
App Wind Angle
App Wind Speed
True Wind Angle
True Wind Speed
True Wind Direction (eg 53 degrees Mag)
Depth
Clock
True HDG - not available
Heel - not available

---

This is a pure guess about what data is needed by the plugin at the moment.
COG & SOG from Gps
HDG magnetic (Learned necessary -tried nmea 08.09.15A.txt)
True Wind Speed
True Wind Direction (magnetic)
STW (may not be needed for simple laylines*)
Mag HDG (may not be needed for simple laylines*)

* no set and drift calculated (leeway + current)

Still looking for upwind tacking and downwind tacking nmea files with the above data.

There are a several other nmea files that have True Wind Angle and True Wind Speed, but NOT True Wind Direction and TackandLay does NOT work.

Request:
It also it seems to me that most of my nmea files have apparent wind angle and apparent wind speed. Is it possible for the TnL plugin to have an option to calculate True Wind (Angle, Speed and Direction) when needed? This would open up the number of files that we could use for testing, I think.

Request:
Then is is possible to have the plugin sense when true wind (angle, speed, dir) is not available and automatically switch to calculating what is needed and simply post a message, "TW calculated" somewhere in the menu?

Further tests of polar files:
I tested polar files that end in LF and CRLF that are delimited with "semicolon", "space ", "tabs" and they all work with TnL. For some reason the polars diagrams that end in LF generally display a second black polar overlay that is not correct, but I don't think it affects the calculations being done (I may be wrong about that because there appears to be a big different in the layline angles being displayed).

Additionally, I noticed that degree lines that had all zeros did not seem to bother TnL, so they are accepted as lacking data, and perhaps are calculated or just skipped, but do not seem to interfere with operations.

I have not tried files that deviate from the format header "TWA/TWS;" etc to see if the file is converted.

Also I noticed that after testing TnL I had trouble shutting down OpenCPN and it would not close normally.
__________________
rgleason is online now   Reply With Quote
Old 06-04-2016, 07:05   #25
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,377
Re: Tack and Laylines Plugin - Beta?

These paragraphs from Polar Navy explain what is necessary to calculate True Wind, giving some examples.

Quote:
When used with “relative” (apparent) wind data source, PolarCOM provides two modes of “true” wind calculation. These modes are labeled “STW” (Speed Through Water) and SOG in the configuration.
1. Mode STW is a “traditional” method, used by most hardware wind instruments. It needs no GPS input and requires STW and HDG (your vessel heading) to calculate “true” wind. It also results in an approximation of “true” wind.
2. Mode SOG provides more precise “true” wind calculation, but it also requires COG as well as HDG. That means you still need a heading sensor to calculate “true” wind – having only GPS input without heading is not sufficient.
Perhaps TnL_pi should eventually provide both modes of calculation, and they should be made clear in selection or presentation if automatic.
__________________
rgleason is online now   Reply With Quote
Old 06-04-2016, 07:53   #26
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,377
TnL ---> becomes "Sailing Console"

With considerable additional programming, this tool TnL_pi can eventually become a great "Sailing Console" (data display at ownship) [see Tracker tackandlay_pi section for some additional ideas for this Sailing console]. This would enhance the utility of the other excellent OpenCPN Sailing Tools/Plugins:

Polar_pi Use nmea data to create polar diagrams and files used with TnL & WxRouting (User Manual)
Weather_routing_pi Uses polar files, grib & climatology to create routing point A>B (User Manual)
SweepPlot_pi Plot speed & course to see result of small adjustments. User config. (need User Manual)
Climatology_pi 30 ys Noaa wind (monthly avg) Pilot Charts useful like a grib file. (User Manual)
Grib_pi Download and use Grib predictive files from Noaa and other sources. (User Manual)
__________________
rgleason is online now   Reply With Quote
Old 06-04-2016, 08:08   #27
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,377
True Wind calculation, SOG+COG vs BSP+HDG

Another take on the calculation..

Quote:
..you should calculate the true wind with the apparent wind speed and angle (a vector), to which you add the vector of the boat speed and heading.
..boat speed and heading should not be the one taken on the water, but on the ground. That means that you need COG & SOG coming from the GPS, and not the Boat SPeed and HeaDinG returned by the instruments (like speedometer and compass). [He prefers the more accurate SOG method, which requires more data.]
Imagine that:
You are sailing is absolutely NO wind at all, and you have a current of 3 knots, taking you to the 270° true. The apparent wind you feel comes from the 270° true, at 3 knots. We assume that your boat speed - returned by the speedometer - is 0 knots, and we just don't care about the heading.
If you combine this apparent wind vector with the data returned by the GPS (COG=270°, SOG=3), than you appropriately find that the TWS is zero, as it actually is. [More accurate method]
But if you use the Boat Speed returned by the speedometer, then you find a TWS of 3 knots, which is absolutely wrong! [Second STW "Traditional" method]

I believe most of the stations computing the True Wind for you are in fact using the data coming from the instruments (and not the GPS). I need to check that..., but is that is the case, then there is a problem.
__________________
rgleason is online now   Reply With Quote
Old 06-04-2016, 10:13   #28
Moderator
 
Paul Elliott's Avatar

Cruisers Forum Supporter

Join Date: Sep 2006
Posts: 3,868
Images: 4
Re: Tack and Laylines Plugin - Beta?

This True/Apparent/Ground/Water debate has been going on for years, and I don't think a generally accepted answer is any closer.

For sailing / polars, I prefer the water-based calculations. We need boat-referenced AWA/AWS, Speed through the water, heading (where the bow is pointing), and leeway (which is usually estimated). Current and the ground-referenced wind speed/direction are of no concern for these calculations.

As an example, NavMonPc can do, as an option, water-referenced AW-to-TW calculations, or can do ground-based (GPS) AW-TW calcs.

NavMonPc ignores leeway in the water-based calculations, but it probably should at least make an effort. Leeway depends on boat and conditions, so a fixed calculation will not suffice. If you have GPS COG data, then the difference between COG and Heading is the combination of leeway and current -- still difficult to unravel.

The calculations are simple trigonometry. NavMonPc can create TW NMEA sentences from the AW and water/ground data, and use these for display and to be sent to other instruments / programs.

I suggest you include the water / ground calculations and let the user decide which to use. Sometimes they don't have all the data they need for one or the other method.
__________________
Paul Elliott, S/V VALIS - Pacific Seacraft 44 #16 - Friday Harbor, WA
www.sailvalis.com
Paul Elliott is online now   Reply With Quote
Old 06-04-2016, 12:51   #29
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,377
Re: Tack and Laylines Plugin - Beta?

There is another nascent effort under the Dashboard plugin thread that was being developed by tom_BigSpeedy that looked very interesting. There is no publicly available code yet, but there are screenshots and discussion last fall. tom_BigSpeedy wanted to test his work more this spring before releasing, I believe. Here are some links:
Current-speed-and-direction-set-and-drift-or-vdr
Now show current
Data at Ownship
Current
Target VMG & Speed
New Instruments-Dashboard
Active-routing-Drift Dogleg

I hope we hear from tom_BigSpeedy this spring sometime.
__________________
rgleason is online now   Reply With Quote
Old 07-04-2016, 10:03   #30
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,377
NavMonPC -Calculations - True/Apparent/Ground/Water

Quote:
This True/Apparent/Ground/Water debate has been going on for years, and I don't think a generally accepted answer is any closer.

For sailing / polars, I prefer the water-based calculations. We need boat-referenced AWA/AWS, Speed through the water, heading (where the bow is pointing), and leeway (which is usually estimated). Current and the ground-referenced wind speed/direction are of no concern for these calculations.

As an example, NavMonPc can do, as an option, water-referenced AW-to-TW calculations, or can do ground-based (GPS) AW-TW calcs.

NavMonPc ignores leeway in the water-based calculations, but it probably should at least make an effort. Leeway depends on boat and conditions, so a fixed calculation will not suffice. If you have GPS COG data, then the difference between COG and Heading is the combination of leeway and current -- still difficult to unravel.

The calculations are simple trigonometry. NavMonPc can create TW NMEA sentences from the AW and water/ground data, and use these for display and to be sent to other instruments / programs.

I suggest you include the water / ground calculations and let the user decide which to use. Sometimes they don't have all the data they need for one or the other method.
Thank you Paul, good explanation.

Perhaps there is a way of determining Leeway through Heeling Angle, which (for starting assumptions) is directly relative to the sideways force of the wind? Baggy sails, more heel angle; light wind less heal angle.

Taking this another step further. The keel weight is swinging through an arc and the topsides of the hull come into play the greater the heel angle so the leverage increases and moment increases (not linearly). To measure this we could hang a heavy weight out abeam on the boom, measure the heal angle. Then do the same with a lighter weight. That would give us some idea of the sideways force.

Then we'd need to come up with a measurement of the planer resistance of the keel to that known sideways force (heeling angle). This sounds outlandish, but you could tow the boat sideways (at several heeling angles) with a scale on the towline (in no current), and include rate of slippage to determine the resistance of the keel area and the leeway. Then somehow make a chart of Heel Angle to Leeway that is used in the calculations. Another way to do it would be to tow the boat with a halyard and an second line from the stern to keep the boat at right angles, and measure the heel angle (several different angles), lbs and speed (in no current). Then make the chart. I think B&G does something like this with a Leeway table but it is less involved... Then using the heeling chart we could separate Leeway from Current.

Can someone come up with a better way of determining Leeway using Heel Angle so that we can know Current?
Perhaps it is a matter of sailing in "no current", recording various wind speeds, the Heeling Angle, HDG and COG which would represent the amount of "slippage" or Leeway, for the given boat characteristics. How can we determine when there is "no Current"? This is getting into mini VPP programming.
__________________

__________________
rgleason is online now   Reply With Quote
Reply

Tags
plug

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



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 11:00.


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.