Polar File Conversion

This is advanced material, not for beginners.

Weather_routing_pi and Polar Formats

The plugin has a very useful Edit mode for polars under

  • WeatherRouting Configuration > Boat > Edit

  • Then highlight the polar file and Select Edit.

    • Dimension Tab enables adding and deleting columns and rows.

wxrte edit polar file

For example: Changing the anomalous value 4.7 to 6.6 results in a smoother curve at 47 degrees and 10 knots TWS.

The weather_routing_pi plugin references several files located in c:/ProgramData/opencpn/plugins/weather_routing.

To see where these files are set in the plugin, select a route or make a new one.

  • Pick Configuration > Edit

  • Then pick Boat > Edit a tabbed dialogue box will open.

Plot Details Tab

  • Open, Save and Save as Buttons

  • This is the pointer to the boat>.xml file which contains the boat sailing characteristics, it is initially set to boat.xml or boat-climatolgy.xml.

  • After you have gone through all the tabs and set the boat’s Lwl, Loa, Displacement, etc.

  • Save as using your boat’s name.

  • Then "open" that file each time weather_routing needs those settings.

OpenCPN <boat>.xml File (Boat-Climatology.xml)

Found under Configuration > Edit > Boat Edit > Plot Details Tab the file referenced is boat.xml or boat-climatology.xml.

This is a typical <boat>.XML file, one of the initial default files Boat-Climatology.xml

<?xml version="1.0" encoding="utf-8" ?>
<OpenCPNWeatherRoutingBoat version="1.13" creator="Opencpn Weather Routing plugin">
    <Polar FileName="C:\ProgramData\opencpn\\plugins\weather_routing\polars\Example\Example-0-10.pol" />
    <Polar FileName="C:\ProgramData\opencpn\\plugins\weather_routing\polars\Example\Example-6-24.pol" />
    <Polar FileName="C:\ProgramData\opencpn\\plugins\weather_routing\polars\Example\Example-15-30.pol" />
    <Polar FileName="C:\ProgramData\opencpn\\plugins\weather_routing\polars\Example\Example-24-60.pol" />
</OpenCPNWeatherRoutingBoat>

This file references the polar files that will be used for the current routing, the first one being Example-0-10.pol

OpenCPN <polar.pol (Example-0-10.pol)

The second file is under Configuration > Edit > Boat Edit > Polar Tab and this is likey to have 4 polar files on initial installation. Highlight one of the files. Polar File Tab shows the path of the Polar file being used, if one exists, otherwise the program has builtin VPP calculation using the boats characteristics which have been entered, which is in effect when the path shows as "<computed>".

If you have prepared a polar file in the Opencpn format for your boat, you can load it into the plugin from this tab, and after you Save from the Plot Details tab, the pathname will be remembered.

Sometimes the plugin is picky about these files. If it is close the plugin and opencpn and reopen, to reset it. Then try again. The two sample files are shown below. They are paired. If you load the XML file the referenced polar file will be loaded if it is in the path and the correct format.

This is a typical <boat_polar>.csv or <boat_polar>.pol, the first polar file referenced by the default Boat-Climatology.xml

twa/tws;1;2;3;4;5;6;7;8;9;10
52;;0.4;0.8;1.9;3.5;4;4.3;4.7;5;5.5
60;0.01;0.5;0.9;2.1;3.7;4.3;4.6;4.9;5.6;6.5
75;0.01;0.5;1.1;2.3;3.8;4.5;4.9;5.3;5.8;6.6
90;0.01;0.6;1.1;2.4;3.9;4.6;5.1;5.5;5.9;6.6
110;0.01;0.5;1;2.3;3.6;4.2;5;5.5;5.9;6.6
120;0.01;0.5;0.9;2;3.4;3.9;4.7;5.2;5.7;6.6
135;0.01;0.45;0.8;1.9;3.1;3.6;4.2;4.6;5.2;6
150;0.01;0.4;0.7;1.8;2.8;3.2;3.6;4;4.8;5.7
180;0.01;0.3;0.6;1.6;2.5;2.8;3.2;3.8;4.4;5.1

qtVLM Polar Format

  1. Extension of the file name. Csv

  2. Separator ';' (semicolon)

  3. Double-entry table

    • The first cell always contains 'TWA \ TWS'

    • The first line lists the wind forces. Vlm does not go beyond 60 knots of wind.

  4. Beginning of each line gives the look, then each value corresponding to the shape and strength of the wind (column heading).

  5. The digital data of the polar use a decimal point, 'that is the point.' An integer (no point ended) is valid.

  6. Whites are valid (value = 0.0) but discouraged. Thank you for being explicit.

  7. Text file format is UNIX ie lines that are terminated by LF (Line Feed) and not CR (Carriage Return) and LF.

  8. A good text editor windows (PsPad or Notepad + +) knows rerecord this format.

    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.000;0.000;0.000;0.000;0.000;0.000;0.000;0.000;0.000;0.000;0.000;0.000;0.000;0.000;0.000;0.000;0.000;0.000;0.000;0.000;0.000;0.000;0.000;0.000;0.000;0.000;0.000;0.000;0.000;0.000;0.000
    5;0.000;0.210;0.420;0.630;0.800;0.860;0.920;0.940;0.950;0.970;0.980;0.980;0.990;0.950;0.880;0.810;0.740;0.670;0.600;0.530;0.460;0.370;0.280;0.190;0.090;0.000;0.000;0.000;0.000;0.000;0.000

Maxsea Polar Format (same as Adrena, or SailGrib WR)

http://www.sailgrib.com/wr-user-guide [sailgrib.com WR User Guide]

  1. The first row defines the True Wind Speed.

  2. The first column defines the True Wind Angle.

  3. In the example, the theoretical hull speed for various wind velocities and wind angles is in the cells.

  4. Modify the True Wind Speed values in the first row. The example below uses 10 and 30 Kts.

  5. Enter these values in the first row and delete the other columns.

In an Excel spreadsheet

TWA 10 15 20 25
30 2.0 5.4 7.2 7.9
90 4.7 9.5 11.5 12.8
150 2.9 7.4 10.5 13.0

Bluewater Racing, and Expedition Polar file format

Quote: A polar file is a sequence of lines. Each line describes the curve for one windspeed, ws. Optionally, the first line may begin with the string "pol", in which case it is treated as a comment line. This klunky format is not my idea; it is for compatibility with Expedition and other software tools, and because it loads easily into spreadsheet tools such as Excel.

Each curve is described on one line of the text file by a windspeed, followed by a sequence of pairs of True Wind Angle and boatspeed. (TWA in degrees, BSP in knots) eg:

10 30 0 45 6 90 8.1 160 7 180 5
15 30 0 40 8 90 12 150 10 165 9 170 5

This gives two curves, one for windspeed 10, one for windspeed 15. Different curves may have different TWA points, and different numbers of points. The line for windspeed 10 specifies a boatspeed of zero knots at a true wind angle of 30 degrees, a boatspeed of six knots at TWA 45, 8.1 knots at 90, seven knots at 160 degrees, and five knots at 180 degrees.

There can be a zero windspeed curve with non-zero boatspeed, i.e., “when the wind is gone, the motor’s on.”

Rules for the data in polar files:

  1. One windspeed curve per line.

  2. There must be a least 3 points per curve.

  3. There must be at least one non-zero windspeed curve.

  4. The minimum TWA is zero, and the maximum is 180.

  5. The 2nd smallest TWA in a line is the best VMG upwind angle for that windspeed. The 2nd largest TWA is the best VMG downwind angle for that

  6. The first TWA should be less than any 2nd TWA in any curve. Ideally, zero.

  7. The last TWA should be greater than any 2nd-to-last TWA in any curve. Ideally, 180

If these rules are broken, the behavior of the program is undetermined.

Bluewater Racing Example (and Expedition)

2 24 28 32 36 40 44 48 52 56 60 64 68 72 76 80 84 88 92 96 100 104 108 112 116 120 124 128 132 136 140 144 148 152 156 160 164 168 172 176 180
4 24 28 32 36 40 44 48 52 56 60 64 68 72 76 80 84 88 92 96 100 104 108 112 116 120 124 128 132 136 140 144 148 152 156 160 164 168 172 176 18
6 24 28 32 36 40 44 48 52 __4.5__ 56 60 __5__ 64 68 72 76 __5.5__ 80 84 88 92 __5.7__ 96 100 104 108 112 __5.8__ 116 120 __5.5__ 124 128 132 136 __4.8__ 140 144 148 152 __4__ 156 160 164 168 172 176 180
8 24 28 32 36 40 44 48 52 __5.4__ 56 60 __6__ 64 68 72 76 __6.4__ 80 84 88 92 __6.6__ 96 100 104 108 112__ 6.7__ 116 120 __6.5__ 124 128 132 136 __6__ 140 144 148 152 __5__ 156 160 164 168 172 176 180
10 24 28 32 36 40 44 48 52 __6.1__ 56 60 __6.5__ 64 68 72 76 __6.8__ 80 84 88 92__ 7__ 96 100 104 108 112 __7.1__ 116 120 7 124 128 132 136 __6.6__ 140 144 148 152 __5.9__ 156 160 164 168 172 176 180
12 24 28 32 36 40 44 48 52 6.4 56 60 6.7 64 68 72 76__ 7__ 80 84 88 92 __7.3__ 96 100 104 108 112 __7.4__ 116 120 7.3 124 128 132 136 7 140 144 148 152 __6.5__ 156 160 164 168 172 176 180
14 24 28 32 36 40 44 48 52 6.8 56 60 6.8 64 68 72 76 7.2 80 84 88 92 7.5 96 100 104 108 112 7.6 116 120 7.6 124 128 132 136 7.4 140 144 148 152 6.9 156 160 164 168 172 176 180
16 24 28 32 36 40 44 48 52 6.7 56 60 6.9 64 68 72 76 7.3 80 84 88 92 7.6 96 100 104 108 112 7.7 116 120 7.9 124 128 132 136 7.7 140 144 148 152 7.3 156 160 164 168 172 176 180
18 24 28 32 36 40 44 48 52 56 60 64 68 72 76 80 84 88 92 96 100 104 108 112 116 120 124 128 132 136 140 144 148 152 156 160 164 168 172 176 180
20 24 28 32 36 40 44 48 52 6.7 56 60 7 64 68 72 76 7.4 80 84 88 92 7.7 96 100 104 108 112 7.9 116 120 8.2 124 128 132 136 8.3 140 144 148 152 7.9 156 160 164 168 172 176 180
22 24 28 32 36 40 44 48 52 56 60 64 68 72 76 80 84 88 92 96 100 104 108 112 116 120 124 128 132 136 140 144 148 152 156 160 164 168 172 176 180
24 24 28 32 36 40 44 48 52 56 60 64 68 72 76 80 84 88 92 96 100 104 108 112 116 120 124 128 132 136 140 144 148 152 156 160 164 168 172 176 180
26 24 28 32 36 40 44 48 52 56 60 64 68 72 76 80 84 88 92 96 100 104 108 112 116 120 124 128 132 136 140 144 148 152 156 160 164 168 172 176 180
28 24 28 32 36 40 44 48 52 56 60 64 68 72 76 80 84 88 92 96 100 104 108 112 116 120 124 128 132 136 140 144 148 152 156 160 164 168 172 176 180
30 24 28 32 36 40 44 48 52 56 60 64 68 72 76 80 84 88 92 96 100 104 108 112 116 120 124 128 132 136 140 144 148 152 156 160 164 168 172 176 180
32 24 28 32 36 40 44 48 52 56 60 64 68 72 76 80 84 88 92 96 100 104 108 112 116 120 124 128 132 136 140 144 148 152 156 160 164 168 172 176 180
34 24 28 32 36 40 44 48 52 56 60 64 68 72 76 80 84 88 92 96 100 104 108 112 116 120 124 128 132 136 140 144 148 152 156 160 164 168 172 176 180
36 24 28 32 36 40 44 48 52 56 60 64 68 72 76 80 84 88 92 96 100 104 108 112 116 120 124 128 132 136 140 144 148 152 156 160 164 168 172 176 180