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 22-05-2023, 14:18   #166
Registered User

Join Date: Jun 2022
Location: Cantabria
Boat: Jeanneau - Merry Fisher 925
Posts: 433
Re: Plugin Polar

Please, don't call me crazy.

Installed latest version of Polar plugin and it starts working correctly.
O 5.8.2 windows 11 ARM64

well, only, I switch to STW and doesn't record anything, even I have switched on the plotter that has STW sensor, with GPS sensor is recording as expected.

but this is not the problem, after being working with everything, (Engine is connected to N2K network to shipmodul multiplexer) I switch on engine batteries, started the engine and O crashes, from this moment every time I started O, opened polar and start recording ---> O crashes.

most of the times not able to start O until I uninstall polar plugin.

without polar plugin if engine is started nothing abnormal happens and O continues working.

__________________
Corsair

Roses don't bloom on the sailor's grave
Corsair63 is offline   Reply With Quote
Old 23-05-2023, 01:35   #167
Registered User

Join Date: Jun 2022
Location: Cantabria
Boat: Jeanneau - Merry Fisher 925
Posts: 433
Re: Plugin Polar

I had to explain that the crash happens with polar plugin recording.
__________________
Corsair

Roses don't bloom on the sailor's grave
Corsair63 is offline   Reply With Quote
Old 24-05-2023, 02:45   #168
Registered User

Join Date: May 2023
Posts: 5
Re: Plugin Polar

I updated the polar plugin and once I open it and upload my .pol file if I close the plugin and try to open it again OpenCPN crashes.

On Debian 11 64 bits for raspberry (openplotter last version) OpenCPN 5.8.2

Regards
hrios is offline   Reply With Quote
Old 17-12-2023, 17:58   #169
Registered User

Join Date: Dec 2017
Location: Circumnavigating
Boat: Feltz, One Off, 40 ft
Posts: 25
Averages over time versus Max over time

Hi

Just used the plugin for the first time. Very well done! Impressive looks as well with the lines and the diagram.

I used to do this manually, but that was undoable. Later I started recording the relevant NMEA-string read it and calculate the values. Worked, though I never finished. This plugin does the job very well!

I have one remark / question / suggestion though.

The plugin seems to overwrite existing values in the table with any registered higher value. Do I see that correctly? This does make sense. A polar is about what a boat is able to do, right?

In my case, however, I notice sometimes irrealistically high values. And due to the above mechanism, this happens more and more over time.

The high values might have to do with the following:
1. Waves (there are some here in the Southern Ocean)
2. Deviations / inaccuracies in the measured values (windmeter, angle meter, compass, water speed)
3. Coincidences. Mili seconds between some values might cause different outcomes.
And obviously other reasons.

To deal with this, it would be very valuable for me if the plugin not just copies the highest value, but offers the option to use an average value of a range of values.

By that, I might not get the max polar of what the boat is able to, but I will eliminate the irrealistic high values and I will get a polar that will be very useful for weather routing (in OpenCpn or in qtVLM for example) since it describes the actual behaviour of my ship, not some theoretical max.

Now, I haven't read all the comments over the last ten years in this thread. The topic might have been discussed already. But if it hasn't I'd like to see / find out if more people are interested.

(Without having had a look at the sources, I have the following thoughts. The plugin now seems to do the following per received relevant NMEA value. Determine:
a. the correct cell (55 degrees, 14 kts)
b. get the saved value for that cell (x)
c. calculate the new value (y) for that cell based on the NMEA data.
d. if y > x, then store y as the new value

Per received relevant NMEA value, determine:
a. the correct cell (55 degrees, 14 kts)
b. get the saved value for that cell (x)
get the amount of values that have already been calculated for this cell (integer) (n)
b. calculate the new value y for that cell based on the NMEA data
and calculate the new average (z) as (n * x + y) / n + 1
c. then store z as the new value.

Technically that seems do-able without too much effort, all depending on the setup of the code of course. Can be implemented with a simple switch as well: AVG / MAX. Though it all starts by seeing if there are more people with this desire). Therefore this post here.
wernertoonk is offline   Reply With Quote
Old 18-12-2023, 10:14   #170
Registered User
 
rgleason's Avatar

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

Werner, Hope you are progressing well to Patagonia! Nice to see you and Michael in Whangarei, NS on Karma. How is the new Electromax and LFP performing?
Yes a selection for creating polars with Average/Max wind is much needed and most appropriate.
I believe that polar will take a file (maybe it should be averaged over many recorded files, so you could select a group of files and it would process) and create a polar, but it should be the average I think.
Weather-routing, in order to provide realistic routings has a feature to set the winds used to some user defined fraction of the polar. Fixing polar_pi to provide average wind speeds would be most appropriate and I think that should be default,
Just to discuss further, perhaps it should be Min/Avg/Max?
I have not looked at the underlying code for this and if you should want to make some changes I suggest you use this github repo as a start https://github.com/rgleason/polar_pi Also, Dave and I may be committing new version to this repo soon, so be aware of that. Thanks.



Quote:
To deal with this, it would be very valuable for me if the plugin not just copies the highest value, but offers the option to use an average value of a range of values.

By that, I might not get the max polar of what the boat is able to, but I will eliminate the irrealistic high values and I will get a polar that will be very useful for weather routing (in OpenCpn or in qtVLM for example) since it describes the actual behaviour of my ship, not some theoretical max.
rgleason is online now   Reply With Quote
Old 18-12-2023, 10:32   #171
Registered User
 
rgleason's Avatar

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

https://github.com/rgleason/polar_pi/issues/28
rgleason is online now   Reply With Quote
Old 23-12-2023, 08:29   #172
Registered User

Join Date: Aug 2017
Posts: 4
Re: Averages over time versus Max over time

[QUOTE=wernertoonk;3851772]Hi

Just used the plugin for the first time. Very well done! Impressive looks as well with the lines and the diagram.

.....




I have been thinking about this for the last fifteen years and also made my own software in several versions.
The program is written in the Pascal language and with the Delphi tool. First I read NMEA0183 live while sailing, but then had to have the computer standing on the nav table connected with RS232 interface and charging.

Nowadays I use Yachtdevices Voyage Recorder YDVR-03 which is always running. Then I post-process the data in their software, Excel and finally run it as a CSV file through my own software Polar4.exe

There are a number of issues and pitfalls that must be taken into account
1. Do not bring logged data when the engine is running
2. Do not bring logged data during tack or jibe
3. Do not include data with TWA < 35°

The first I have to sift through in the Voyage Recorder by finding out the time I started sailing and when I stopped.
The other two points filter my program out. Everything for TWA < 35° is easy.
My other criteria are the following adjustable filters.
• Average calculation of TWA, TWS, STW/SOG for a certain number of seconds. Optional.
• Constant value of TWA for a certain number of seconds. Selectable, for example 5 values ​​in a row. (I have one value/second)
• Constant value for TWS in the same way as for TWA

TWA is converted into a group: 43, 44, 45, 46, 47 => group 45
For example, you can group TWA: 35, 40, 45, 50....175, 180

I myself have begun to question this and will probably change it to the following
40, 41, 42, 43, 44, 45, 46, 47, 50, 55 ...175, 180 as when close hull may need the higher resolution.

TWS is grouped into m/s 2, 3, 4, 5, 6, 7, 8, 9, 10, 12 Here you can imagine other wishes.

The program reads data from the CSV file and records SOG/STW, TWA and TWS. If the buffer/filter should contain 5 equal values ​​and the TWA is: 45, 45, 50, 45, 45 then it is invalid. When the buffer for TWA reaches 45,45,45,45,45 and the TWS group reaches, for example, 3,3,3,3,3, you take the average value from the SOG buffer, which may just be 4.55 kn, and compare it with the existing value. If the new value of SOG is higher, substitute the value in the table in the column for 3 m/s and the row for TWA-45.

This means that we must have stable values ​​of TWA and TWS AND a value of SOG that is higher than before.

Now one can also ask whether one should constantly strive for the highest value of SOG. One can also imagine using ALL values ​​for SOG during ALL sailings and using mean (as wernertoonk suggested), typical value or median value.

The last one is what I'm thinking about the most right now. If you want to know maximum performance or more typical performance. Which method is right for you?
Amerona is offline   Reply With Quote
Old 26-12-2023, 18:27   #173
Registered User
 
rgleason's Avatar

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

werner, most of the math is in polar.cpp

https://github.com/rgleason/polar_pi
https://github.com/rgleason/polar_pi.../src/Polar.cpp


Perhaps you can identify the salient lines?

We will be updating this plugin soon and it would be good to make it useful.
rgleason is online now   Reply With Quote
Old 23-01-2024, 12:51   #174
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,639
Images: 2
Re: Averages over time versus Max over time

[QUOTE=Amerona;3853552]
Quote:
Originally Posted by wernertoonk View Post
Hi
I have been thinking about this for the last fifteen years and also made my own software in several versions.


The program is written in the Pascal language and with the Delphi tool. First I read NMEA0183 live while sailing, but then had to have the computer standing on the nav table connected with RS232 interface and charging.

Nowadays I use Yachtdevices Voyage Recorder YDVR-03 which is always running. Then I post-process the data in their software, Excel and finally run it as a CSV file through my own software Polar4.exe

There are a number of issues and pitfalls that must be taken into account
1. Do not bring logged data when the engine is running
2. Do not bring logged data during tack or jibe
3. Do not include data with TWA < 35°

The first I have to sift through in the Voyage Recorder by finding out the time I started sailing and when I stopped.
The other two points filter my program out. Everything for TWA < 35° is easy.
My other criteria are the following adjustable filters.
• Average calculation of TWA, TWS, STW/SOG for a certain number of seconds. Optional.
• Constant value of TWA for a certain number of seconds. Selectable, for example 5 values ​​in a row. (I have one value/second)
• Constant value for TWS in the same way as for TWA

TWA is converted into a group: 43, 44, 45, 46, 47 => group 45
For example, you can group TWA: 35, 40, 45, 50....175, 180

I myself have begun to question this and will probably change it to the following
40, 41, 42, 43, 44, 45, 46, 47, 50, 55 ...175, 180 as when close hull may need the higher resolution.

TWS is grouped into m/s 2, 3, 4, 5, 6, 7, 8, 9, 10, 12 Here you can imagine other wishes.

The program reads data from the CSV file and records SOG/STW, TWA and TWS. If the buffer/filter should contain 5 equal values ​​and the TWA is: 45, 45, 50, 45, 45 then it is invalid. When the buffer for TWA reaches 45,45,45,45,45 and the TWS group reaches, for example, 3,3,3,3,3, you take the average value from the SOG buffer, which may just be 4.55 kn, and compare it with the existing value. If the new value of SOG is higher, substitute the value in the table in the column for 3 m/s and the row for TWA-45.

This means that we must have stable values ​​of TWA and TWS AND a value of SOG that is higher than before.

Now one can also ask whether one should constantly strive for the highest value of SOG. One can also imagine using ALL values ​​for SOG during ALL sailings and using mean (as wernertoonk suggested), typical value or median value.

The last one is what I'm thinking about the most right now. If you want to know maximum performance or more typical performance. Which method is right for you?

Your approach could be added to Polar_pi. Can you make a Pull Request with that ?


It could be an option amoung several.
rgleason is online now   Reply With Quote
Old 23-01-2024, 12:59   #175
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,639
Images: 2
Re: Averages over time versus Max over time

Quote:
Originally Posted by wernertoonk View Post
Hi

Just used the plugin for the first time. Very well done! Impressive looks as well with the lines and the diagram.

I used to do this manually, but that was undoable. Later I started recording the relevant NMEA-string read it and calculate the values. Worked, though I never finished. This plugin does the job very well!

I have one remark / question / suggestion though.

The plugin seems to overwrite existing values in the table with any registered higher value. Do I see that correctly? This does make sense. A polar is about what a boat is able to do, right?

In my case, however, I notice sometimes irrealistically high values. And due to the above mechanism, this happens more and more over time.

The high values might have to do with the following:
1. Waves (there are some here in the Southern Ocean)
2. Deviations / inaccuracies in the measured values (windmeter, angle meter, compass, water speed)
3. Coincidences. Mili seconds between some values might cause different outcomes.
And obviously other reasons.

To deal with this, it would be very valuable for me if the plugin not just copies the highest value, but offers the option to use an average value of a range of values.

By that, I might not get the max polar of what the boat is able to, but I will eliminate the irrealistic high values and I will get a polar that will be very useful for weather routing (in OpenCpn or in qtVLM for example) since it describes the actual behaviour of my ship, not some theoretical max.

Now, I haven't read all the comments over the last ten years in this thread. The topic might have been discussed already. But if it hasn't I'd like to see / find out if more people are interested.

(Without having had a look at the sources, I have the following thoughts. The plugin now seems to do the following per received relevant NMEA value. Determine:
a. the correct cell (55 degrees, 14 kts)
b. get the saved value for that cell (x)
c. calculate the new value (y) for that cell based on the NMEA data.
d. if y > x, then store y as the new value

Per received relevant NMEA value, determine:
a. the correct cell (55 degrees, 14 kts)
b. get the saved value for that cell (x)
get the amount of values that have already been calculated for this cell (integer) (n)
b. calculate the new value y for that cell based on the NMEA data
and calculate the new average (z) as (n * x + y) / n + 1
c. then store z as the new value.

Technically that seems do-able without too much effort, all depending on the setup of the code of course. Can be implemented with a simple switch as well: AVG / MAX. Though it all starts by seeing if there are more people with this desire). Therefore this post here.

Werner, I have not gotten into polar.cpp yet where I think all the calcs are done, but I think your approach has great merit and would like to be sure to get that added, if it is not already there.


In using the plugin more, I found this feature under FILTERS:


Use Range, Use Average, and Sail Selection


Also see https://github.com/rgleason/polar_pi/issues/28


I can accept pull requests for additional calculation options.

See https://github.com/rgleason/polar_pi...ent-1906915345
Attached Thumbnails
Click image for larger version

Name:	Use-range.png
Views:	14
Size:	126.9 KB
ID:	285609   Click image for larger version

Name:	Use-average.jpg
Views:	18
Size:	399.5 KB
ID:	285610  

Click image for larger version

Name:	sail-selection.png
Views:	12
Size:	123.4 KB
ID:	285611  
rgleason is online now   Reply With Quote
Reply


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


Advertise Here


All times are GMT -7. The time now is 03:45.


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.