Post by iconPost by GeGaX | 2017-09-04 | 18:36:37

Hi Cvetan
Some time ago I submitted an improvement to you, namely a 'Route button'.
There was no answer, no problem I know you have other things to manage ;)
With help I started to create a Google Chrome extension and now it is available on the Google Chrome Store at this address :

https://chrome.google.com/webstore/detail/route-zezoorg/hfmdbddgjlicmflejkkoafbkdgnfggbg?hl=fr

;)

commenticon 57 Comments
Post by iconPost by jpherrenknecht | 2017-09-05 | 10:48:54
Very good job !

Thank you
Post by iconPost by Griffondort | 2017-09-10 | 10:06:31
Merci pour tous ceux qui ont travaillé sur cette extension, je m'en sers tout le temps maintenant et mes résultats sur la dernière course montre que cela m'a permis d'etre plus precis pendant le course (si je le souhaiais)
Post by iconPost by GeGaX | 2017-09-11 | 23:02:44
Update in v1.1
New values , TWAm and BTWm ;)
Post by iconPost by Seche | 2017-09-22 | 19:58:16
How does it work ?
I've been getting it in, logo is at right of the adress bar.
Clic on the logo give me one line:
DATE TIME TTW … and so on, but nothing else.
What's rong ?
Post by iconPost by JohnT | 2017-09-22 | 22:38:11
try clicking 'Go' on the Zezo chart so that the data is current before using this extension: before clicking 'Go' I had the same symptom.
Post by iconPost by GeGaX | 2017-09-23 | 11:15:05
Hi,
If you have only 1 line with DATE TIME TTW ... refresh your page and click on the extension
Post by iconPost by lemulot79 | 2017-09-28 | 22:32:38
Hello. On the "extention route" table I do not always understand the difference between "TWAm" and "BTWm" ....?
"TWAm" OK for TWA max or mini for not changing sails, but "BTWm" (heading) to sometimes more deviation. .... ?
thank you for your help.
Post by iconPost by GeGaX | 2017-09-28 | 23:37:28
Hi,

TWAm = mean true wind angle
From the boat (line T +0: 00) it is the angle you must follow to reach the WPT of this line.
The calculation is valid all tack (starboard or port).
This is the green line on zezo.

BTWm = same principle, red line on zezo.
Post by iconPost by GeGaX | 2017-11-01 | 00:14:21
Hi,

Update v1.3
- correction of the regex concerning the timezone (which does not appear)
CEST -> CET
[A-Z] {4} -> [A-Z] {3,4}
Now the 2 will work

Thanks Cvetan for the info ;)
Post by iconPost by Ziggy_FIN | 2017-11-01 | 16:02:06
Could you explain all the shortened words? What they mean and from which words they are?Thank you.
Post by iconPost by GeGaX | 2017-11-01 | 16:38:20
Hi,
Yes i can ;)



TTW : Time To Waypoint.

DTW : Distance To Waypoint.

DTG : Distance To Go (Finish Line).

TWD : True Wind Direction.

TWS : True Wind Speed.

TWA : True Wind Angle.

BTW : Bearing To Waypoint (HDG in zezo).

STW : Speed Through Water (Boat speed in zezo).

TWAm : mean True Wind Angle.
From the boat (line T +0: 00) it is the angle you must follow to reach the WPT of this line.
The calculation is valid all tack (starboard or port).
This is the green line on zezo.

BTWm : same principle, red line on zezo.
Post by iconPost by mcmgj | 2017-11-01 | 17:16:01
very usefull for programmation
TWAm et BTWm is value to reach this point (from boat to this place)
TWAm is angle if routing in TWA, BTW is angle if routing with cap
Post by iconPost by WretchedExcess | 2017-11-02 | 04:11:34
Nice. Looking forward to trying this out
Post by iconPost by GeGaX | 2017-11-02 | 08:10:22
Post by iconPost by GeGaX | 2017-11-19 | 13:35:30
Hi

Update v1.4.

In the TWS column, if the values are on a black background, white writing is that the use of foils is possible.

Useful for the preparation of the boat by looking at the routing it is possible to see if the purchase of the foils is judicious or not.

Post by iconPost by Ursus Maritimus | 2017-11-19 | 14:36:52
how do you decide wether foils are usefull/possible?
Post by iconPost by zezo | 2017-11-19 | 15:06:42
Foils work between 11 and 40 knots boat speed with 100% between 16 and 35 and gradual decline outside of the range (same for direction)

So if you have upwind and/or weak wind leg the foils are useless. In normal running conditions above 15 knots they are the single most useful option.
Post by iconPost by marcusbelgicus | 2017-11-19 | 21:24:36
Interesting Cvetan, I would have intuitively thought that the foils kick in at 16 knott up to 35 knott and and the gradual increase/decrease would be between those limits.
Post by iconPost by zezo | 2017-11-19 | 21:28:38
I expected the same thing on a first sight, but it happenes to be the other way around.
Post by iconPost by GeGaX | 2017-11-19 | 15:18:53


TWS between 16 and 35 kts and TWA between 80 and 160°

[#]if (foil >= 16 && foil <= 35 && Math.abs(twa_bd) >= 80 && Math.abs(twa_bd) <= 160)[/#]
Post by iconPost by Ursus Maritimus | 2017-11-19 | 15:46:13
does the boat speed increase by 4% in the range for 100% working foils?

so 20kts becomes 20,8 kts, wow!
Post by iconPost by GeGaX | 2017-11-19 | 15:30:14
"Foils work between 11 and 40 knots boat speed"
Where are you see that cvetan ?
Post by iconPost by zezo | 2017-11-19 | 15:59:46
twaMerge and twsMerge. There is (bi)linear interpolation in the merge ranges, outside of the min/max limits (confirmed by calculating and comparing boat speed vs. the game)
Post by iconPost by GeGaX | 2017-11-19 | 16:45:46
I do not understand everything ...
Mini Transat Leg 2
if TWS 16 kts and twa 80 ° boat speed is 8.91 (Jib), normally the foil must be activated and the speed of the boat increase no?
But you tell me that the foils are active at least 11 kts boat speed ...
: /

If you have the time, I want more details to understand
Regarding twsMerge and twaMerge, obviously I did not understand either
Post by iconPost by mak08 | 2017-11-19 | 23:15:18
The foils work at 100% capacity (factor 1.04) if the TWA is between twaMin and twaMax and TWS (= wind speed, not boat speed) is between twsMin and twsMax.

If TWA and TWS are not in this area but still within twaMin-twaMerge and twaMax+twaMerge (TWS between twsMin-twsMerge and twsMax+twsMerge), the speed increase is gradually reduced to factor 1.0 (per bilinear interpolation).
Post by iconPost by ZeMarsu | 2017-11-20 | 22:43:40
Hi Cvetan,

I take this opportunity to raise a question about the polars you provided us with. I had a look at the code as I wanted to check my theory and found what I think is an issue in your formula. This is the function to calculate the factor (I've removed the TWA part which is correct):

function foil_c(twa, ws) {
var ct = 0;
var cv = 0;

if (ws <= 11) {
return 1;
} else if (ws < 16) {
cv = (ws - 11) / 10;
} else if (ws < 35) {
cv = 1;
} else if (ws < 40) {
cv = (40 - ws) / 10;
} else {
return 1;
}

return 1 + 0.04 * ct * cv;
}
When doing the interpolation between 11 and 16 (as well as between 35 and 40). You divide by 10 when it should be 5. Am I missing something somewhere?
Post by iconPost by zezo | 2017-11-20 | 22:50:42
Yep. In which race you did you find this? Was it in the polar.js?

Someone reported that the green and blue lines are a bit off, so I found it and fixed it about two weeks ago, but probably forgot to propagate the changes everywhere. It's hard to keep everything in sync with 4 simultaneous races (and 2 additional beta versions)

The router itself uses slightly different formula that is correct.
Post by iconPost by ZeMarsu | 2017-11-20 | 22:56:46
That was from the link at the top when in the VOR-Testing (hope that makes sense) and yes that was in polar.js
Post by iconPost by zezo | 2017-11-20 | 23:07:05
Thanks for the reminder. I'll have to fix it, but waiting for current races to finish and the dust to settle down ;-) And yes, polars.js uses a copy of the code, not a library file. And the beta needs fixing other thins too - passing of the correct options by default and remembering them.
Post by iconPost by ZeMarsu | 2017-11-20 | 23:12:28
Main thing is that your routeur is using the proper formula. The polars are usefull but more to find when to change the sails so the forumla is of less importance, I guess.
Thanks for the good work with the routeur.
Post by iconPost by toxcct | 2017-11-21 | 14:43:36
Hi guys,

So I'm seeing this topic, and understand now why I was observing wrong values few days ago :)
BTW Cvetan, I see that the "dividing merge factor" is still not fixed in the 'vorb' race inside the polars.js?8 file.

Anyway, I just wanted to have a gentle peer-review from you guys because I'm not quite sur I implemented it right.

Here is my code that is calculating the applicable ratio below. The "foil" object is basically the same as we can get from VR, and shown in a ScreenShot by GeGaX a few posts above :

app.fn.getFoilSpeedFactor = function(twa, tws) {
var foil = app.data.boat.foils;

tws /= app.bin.wind_fact_term;

if ((twa <= (foil.twaMin - foil.twaMerge)) || (twa >= (foil.twaMax + foil.twaMerge)) ||
(tws <= (foil.twsMin - foil.twsMerge)) || (tws >= (foil.twsMax + foil.twsMerge))) {
return 1;
}

var ct = 0;
if (twa < foil.twaMin)
ct = (twa - foil.twaMin - foil.twaMerge) / foil.twaMerge;
else if (twa < foil.twaMax)
ct = 1;
else if (twa < foil.twaMax + foil.twaMax)
ct = (foil.twaMax + foil.twaMerge - twa) / foil.twaMerge;

var cv = 0;
if (tws < foil.twsMin)
cv = (tws - foil.twsMin - foil.twsMerge) / foil.twsMerge;
else if (tws < foil.twsMax)
cv = 1;
else if (tws < foil.twsMax + foil.twsMerge)
cv = (foil.twsMax + foil.twsMerge - tws) / foil.twsMerge;

return 1 + ((foil.speedRatio - 1) * ct * cv);
};


Thanks.
Post by iconPost by toxcct | 2017-11-21 | 14:47:14
There is probably a mistake there because with this implementation, the polar graph looks odd.
But I can't figure out what I'm doing wrong right now, and I have to get back to work :/
Post by iconPost by zezo | 2017-11-21 | 15:12:01
Check the values for boundary conditions - e.g. 11 and 16

cv = (tws - foil.twsMin - foil.twsMerge) / foil.twsMerge;

11 would give you -10

it's more like (tws - (foil.twsMin - foil.twsMerge)) which expands to

(tws - foil.twsMin + foil.twsMerge) =

and now tws 11 gives 0 and 16 gives 5

I also got weird-looking polars on the first attempt ;-)
Post by iconPost by toxcct | 2017-11-21 | 15:37:28
GAHHH, yes, of course... Thanks, I'm getting tired :D

I'll publish that later.
At least, I managed to have the same code, parameterized on boat setups...
Post by iconPost by toxcct | 2017-11-21 | 14:57:43
Oh, and as I am on it, why don't you have the "hull polish" option on the beta version ? :)
Post by iconPost by zezo | 2017-11-21 | 15:15:16
I don't think it's actually implemented by VR in the current version. The polars match server-reported boat speed for a polished boat without it.

Edit: Just saw that Michael actually handles it in the polar calculation, so it may be implemented after all.

But 0.3% is too small difference to affect the routing. As for decision what to buy - if you have the credits go get it. 0.3% is 3 miles after 1000 miles sailed.
Post by iconPost by toxcct | 2017-11-21 | 15:40:00
Well, my concern is not for a routing purpose, but to actually observe and confirm that we are on the right values.

If someone sailing with the hull polished does not see the same boat speed (even though we're talking about small values below the knot), they will keep doubting about our (my ?) polar chart...
Post by iconPost by zezo | 2017-11-21 | 16:54:37
You can't spot the difference without looking at the raw data. The rounding to one decimal place masks it.

If you use the extension to look at the data, then Michael has done a great job with the boat polars - foils, options and everything. We just have to publish the next version.
Post by iconPost by toxcct | 2017-11-21 | 17:37:10
link ?
Post by iconPost by zezo | 2017-11-21 | 17:56:43
Coming soon to a web store near you ;-)

https://chrome.google.com/webstore/detail/vr-dashboard/amknkhejaogpekncjekiaolgldbejjan in case you missed it
Post by iconPost by GeGaX | 2017-12-02 | 13:18:08
Update v1.5:

Changing the activation ranges of the foils.

It turns out that the foils are 100% functional between TWS 16 to 35 kt and TWA 80 to 160.

But they are also functional (not 100%) between TWS 12 to 15 and 36 to 39, TWA 70 to 79 and 161 to 170 which correspond to the parameters TWS / TWA Merge.

The update will be available on the Chrome Web Store 'Route zezo.org' within 1 hour max.
Post by iconPost by nsp | 2017-12-02 | 13:35:58
We have a development dream team :))))
Things happen without people even notice.
thanks for your work GeGax :)
Post by iconPost by zezo | 2017-12-02 | 13:41:34
Things get a lot easier when you share code, information and ideas.
Post by iconPost by GeGaX | 2017-12-02 | 13:56:40
I do not do much, but zezo (cvetan), mak08, toxcct and mcmgj them it's a big team ;)
It is obvious that to many they greatly improve our pleasure to play.
Concerning the modification, mcmgj 'to do validate' with cvetan his calculations for the activation of the foils, mcmgj told me about it and I just modified the values. ;)
Post by iconPost by nsp | 2017-12-02 | 14:27:21
Communication is key, yes! And we know that you are now a little bunch of stars.
A little bit more and we will feel the feet wet and wind in our faces...lol
Amazing Job all :)
Hats off
Post by iconPost by GeGaX | 2017-12-02 | 14:49:23
Update v1.6
At the request of someone on the VR forum, the version of the extension is available at the end of the table at the bottom right
The update will be available within 1 hour max.
Post by iconPost by GeGaX | 2017-12-19 | 15:56:00
Updated in v1.7
- Correction of the activation range of the foils.
- Correction BTWm (bug in the calculation when passage to 0 ° - thanks mcmgj ;) ).
The update will be available within 1 hour max

Small personal request:
I would like the extension to be active only on zezo.org and the rest of the time it is grayed out
I know that cvetan and mak08 you get to code that ... I could take 5 min of your time?
Post by iconPost by mak08 | 2017-12-19 | 16:31:58
Check out our manifest.json and background.js - you need to make the extension a pluginAction and register a URL filter using chrome.tabs.onUpdated.addListener.
Then use chrome.pageAction.show to show the action on matching tabs.
Cvetan wrote this, I hope I didn't miss anything.


Post by iconPost by zezo | 2017-12-19 | 16:36:28
That's easy. Take the dashboard background page and replace virtualregatta with zezo (you may want to use a regex zezo.org/.*/chart.pl)

But it should be combined with a per-tab data storage because now it looks like you parse the last open chart (the onActivated handler can take care of that)

I'll try to find few minutes to take a look and see exactly how to do it. I also have my old extension to steal the multi-tab code from ;-)

There are few distinct cases that should be handled - when you open a new tab / switch between tabs / reload existing tab.
Post by iconPost by toxcct | 2017-12-19 | 17:09:06
Hey, don't do that. I find it pretty useful to be able to re-open the table of data gathered from zezo, but once I navigated away, on VR or on my polars for instance...

Post by iconPost by zezo | 2017-12-19 | 17:20:38
But it's still confusing if you have more than one chart open. It can be combined of course - show table for the current tab if it happens to be chart, last table otherwise.
Post by iconPost by toxcct | 2017-12-19 | 17:28:40
I don't. One race at a time :D
Post by iconPost by GeGaX | 2017-12-19 | 19:33:11
Update v1.8
Now the extension is only active on a zezo charts, the rest of the time it will be grayed out (inactive)
Thanks Cvetan for this modification of code ;)
Post by iconPost by zezo | 2017-12-19 | 21:42:02
It's all about teamwork, isn't it?
Post by iconPost by Pen Glops I | 2017-12-20 | 09:51:32
Pourquoi ? Il est bien pratique d'avoir cette table sur la page de VR. Pas besoin de changer d'onglet pour voir la liste des points.

Why ? It's convenient to have this on the VR page… No need to switch between tabs for see the list
Post by iconPost by GeGaX | 2017-12-20 | 13:43:38
EN:
Because now there are often 2 races at the same time so to avoid any confusion, it is preferable that the extension works only on the tab all errors will be eliminated

FR:
Car maintenant il y a souvent 2 courses en même temps alors pour éviter toutes confusions, il est préférable que l'extension fonctionne que sur l'onglet toutes erreurs seront donc éliminées
Post by iconPost by GeGaX | 2017-12-19 | 21:56:34
I confirm ;)

border
Topics list
Posts
border
5
border
border
Copyright 2009 by ZEZO.ORG. All Rights Reserved.