Addons GC/FF/Opéra 'Route zezo.org'
Post by iconPost by GeGaX | 2017-12-22 | 00:21:45

Following on the new evolution of the 'Route zezo.org' native extension on Google Chrome, I start this new post.

They are now 2! ;)

- The current v1.8 is powered in v2.7 with a new
It is MultiRaces and active only on zezo.
Route zezo.org v2

- Her little sister was born, a practice that I did not use *, powered directly in v1.7 and which keeps the original icon
She is MonoRace and active on zezo of course but also on VR
Route v1


*: It keeps the content of the page cached and allows you to display it when you are on the page of your course on VR.
/!\ If you participate in several courses at the same time, think about updating the page of the race you want, otherwise you will see the cache of the race consulted before /!\



The 2 will be maintained, during possible changes, their use is different.

Those who do not like the new version, v1.8 become v2.7, (Application grayed (GC) or Invisible (FF / Opera) when you are not on the page zezo) must download the v1.7 link above )

the extensions are FireFox (FF) compatible with the add-on 'Chrome Store Foxified' / Opera with the addon 'Download Chrome Extension'.

Here, I hope I can please everyone according to its use ;)

commenticon 22 Comments
Post by iconPost by zezo | 2017-12-22 | 00:37:12
You can have both at the same time with 2-3 lines of code. Just take the pageAction.show() outside of the url check. Or return to browser action but leave the tabId logic.
Post by iconPost by GeGaX | 2017-12-22 | 00:48:03
Personally I prefer the new use (with the gray icon) when not on the zezo page and avoids errors on several races.
But some use the extension directly under VR via VR Dasboard which automatically open the zezo page without going through it. What was the v1.7

Keep the 2 is not a problem but everyone has their habits and they let me know so I'm just trying to please everyone
Post by iconPost by GeGaX | 2017-12-24 | 16:59:01
Update in v1.8 for the monorace and in v2.8 for the multiraces

Changelog:
- Added the Timezone column.
Previously, zezo gave hours in CET / CEST format (Central European Time / Central European Summer Time = UTC + 1 / UTC + 2)
It changes, eventually I hope that we can have a checkbox to have the local timezone as in VR Dashboard which will be I think in the format UTC + 1 / UTC + 2 for the FR, but it turns out that the code on the server is a little more complex so for now it will be UTC.
 
To avoid mistakes I prefer to appear so there will be a small gymnastics to do, only the Jules Verne Trophy is in UTC at the moment

Route zezo.org is already able to read the future format of the local time zone if Cvetan implements it (I am ready to help if necessary;))

Here we go, have a good holiday season;)
Post by iconPost by Ursus Maritimus | 2017-12-24 | 19:26:58
naais! could you give them different names in chrome webstore?

e.g. single race and multiple race ?
Post by iconPost by GeGaX | 2017-12-24 | 19:41:48
First post on the topic you have the details and yes I would try to differentiate them better
Post by iconPost by Ursus Maritimus | 2017-12-24 | 19:58:01
no big deal, but easier to select on the Chrome webstore. now they have the same name. first bear and turkey
Post by iconPost by GeGaX | 2017-12-25 | 04:29:39

Post by iconPost by Pen Glops I | 2018-01-02 | 10:25:01
Bonne année à tous,

La version monocourse ne marche plus ? Il y a quelques jours c'était impec sur la Clipper, mais là sur la VOR j'ai plus rien, même pas le numéro de version…
La version Multi est ok, mais je préfère avoir ces infos disponibles sur la page de VR…

Happy new year all,

Is the monorace version don't work anymore ?

Claude
Post by iconPost by GeGaX | 2018-01-02 | 11:07:20
Hi,
I found the error I correct and I update.
Available in less than an hour on Chrome web store.
Post by iconPost by Pen Glops I | 2018-01-02 | 11:27:52
Yea, cool, tx
Post by iconPost by GeGaX | 2018-04-04 | 20:12:08
Hi,

The v3 (Multiraces) and v2 (MonoRace) will be available in 1 hour max (I just upload them).

The changelog is common to both versions namely:

- a new icon.

- a checkbox named Local Time in the bottom right which when the times are in UTC on zezo (ex Jules Verne) they will be converted to the local time (time zone of the pc) with an indication UTC ± XX: XX
If the zezo times are CET or CEST they will not be converted instead, CET and CEST will become UTC + 1 and UTC + 2 respectively.

- TWAm / BTWm we have a complete overhaul now the calculation is no longer linear but trigonometric so no more difference of 1 or 2 ° for TWAm and more far-fetched values for BTWm when it went through 0 ° . In passing TWAm and BTWm become respectively ATWA and ABTW - A for Average.

Route zezo.org is dedicated to further evolution ...

Kenavo and good use
Post by iconPost by toxcct | 2018-04-04 | 20:18:27
Good Job mate.

One question though.
What is the difference between the 2 extensions ? I cannot find out by myself :/
Post by iconPost by GeGaX | 2018-04-04 | 20:34:02
Hi Toxcct;),
The v3 allows you to switch on several races because they are only active on current page of zezo
The v2 is active all the time and therefore allows you to display the table when you are on the page of your race VR (cache) - the problem is that in case of several races, it is necessary to be careful that the display board corresponds well to the race page on which you are.

Post by iconPost by woffer | 2018-04-04 | 23:00:10
Another fine revision, and thanks. Can you please explain how the ATWA and ABTW are calculated?

Post by iconPost by GeGaX | 2018-04-05 | 11:15:34
function atwaCalc(twaList) {
const
twaData = twaList;
Math.radians = function(degrees) {
return degrees * Math.PI / 180.0;
},
Math.degrees = function(radians) {
return radians * 180.0 / Math.PI;
};
let
arX = [],
arY = [],
somX = 0.0,
somY = 0.0,
avgX = 0.0,
avgY = 0.0,
atwa = 0.0;
for (const [i, angle] of twaData.entries()) {
arX = Math.cos(Math.radians(angle));
arY = Math.sin(Math.radians(angle));
}
for (const value of arX) {
somX += value;
}
avgX = somX / arX.length;
for (const value of arY) {
somY += value;
}
avgY = somY / arY.length;
atwa = Math.round(Math.degrees(Math.atan2(avgY, avgX)));
if (isNaN(atwa)) {
atwa = "-";
}
return atwa;
}
function abtwCalc(btwList) {
const
btwData = btwList;
Math.radians = function(degrees) {
return degrees * Math.PI / 180.0;
},
Math.degrees = function(radians) {
return radians * 180.0 / Math.PI;
};
let
arX = [],
arY = [],
somX = 0.0,
somY = 0.0,
avgX = 0.0,
avgY = 0.0,
abtw = 0.0;
for (const [i, angle] of btwData.entries()) {
arX = Math.cos(Math.radians(angle));
arY = Math.sin(Math.radians(angle));
}
for (const value of arX) {
somX += value;
}
avgX = somX / arX.length;
for (const value of arY) {
somY += value;
}
avgY = somY / arY.length;
abtw = Math.round(Math.degrees(Math.atan2(avgY, avgX)));
if (isNaN(abtw)) {
abtw = "-";
} else if (abtw < 0) {
abtw += 360;
}
return abtw;
}


For twaList and btwList:
function space(value) {
if (value < 10) {
value = " " + value;
}
return value;
}
function zero(value) {
if (value < 10) {
value = "0" + value;
}
return value;
}
function genIteNext(ttwCurr) {
var ttwCurr = ttwCurr.match(/.*?([0-9]{1,3}):([0-9]{2})/);
var ttwHours = parseInt(ttwCurr[1], 10);
var ttwMinutes = parseInt(ttwCurr[2], 10);
var ttwNext = [];
if (ttwMinutes + 10 < 60) {
ttwNext = "T+" + space(ttwHours) + ":" + zero(ttwMinutes + 10);
} else {
ttwNext = "T+" + space(ttwHours + 1) + ":" + zero(ttwMinutes - 50);
}
return ttwNext;
}
for (var i = 0; i < points.length; i++) {
points.atwa = atwaCalc(twaList);
points.abtw = abtwCalc(btwList);
while (points.ttw !== ttwLast) {
twaList.push(parseInt(twaLast, 10));
btwList.push(parseInt(btwLast, 10));
ttwLast = genIteNext(ttwLast);
}
twaLast = parseInt(points.twa, 10);
btwLast = parseInt(points.btw, 10);
if (twaList.length === 0) {
twaList.push(twaLast);
btwList.push(btwLast);
} else if (twaList[0] * twaLast < 0) {
twaList = [twaLast];
btwList = [btwLast];
} else {
twaList.push(twaLast);
btwList.push(btwLast);
}
ttwLast = genIteNext(ttwLast);
}




Post by iconPost by woffer | 2018-04-05 | 17:20:49
Thanks GeGaX. LOL. Way above my pay grade in your coding explanation. My question was much more simple in its intent: How many waypoint and 10 minute increments are being used to derive predicted averages?
But thanks for taking the time
Post by iconPost by GeGaX | 2018-04-05 | 20:27:30
OK sorry ;)
This calculation takes into account iterations of 10 minutes ...
twaList create the missing iterations (and unnecessary to display) original cvetan instruction lines for the calculation of ATWA and ABTW (these are the green (ATWA) and red / blue (ABTW) lines as a BUT limit limited number ( Portside starboard )
I do not know if google translation translated correctly ..
Post by iconPost by feriber | 2018-04-05 | 06:06:11
Once again, thank you all for your jobs.

Kindest regards,

Fernando
Post by iconPost by mak08 | 2018-04-05 | 11:30:31

Post by iconPost by zezo | 2018-04-06 | 08:57:38



Post by iconPost by GeGaX | 2018-04-06 | 15:07:41
@mak08 et @zezo
I see nothing, it’s normal ? :/
Post by iconPost by zezo | 2018-04-06 | 16:47:55
A ton of closing tags for the array index variable ;-) It gets interpretted like <i> tag and the whole page becomes italic ;-)

The "forum" code was written in one afternoon so it's a bit naive.

border
Topics list
Posts
border
6
border
border
8
border
border
48
border
border
17
border
border
4
border
border
48
border
border
12
border
border
52
border
border
27
border
border
60
border
border
Copyright 2009 by ZEZO.ORG. All Rights Reserved.