Skip to content

Commit

Permalink
Update to 2024 data, add 24 knts wind speed (#38)
Browse files Browse the repository at this point in the history
* changes for 2024
- add 24 knts wind speed

* Data 2024
  • Loading branch information
MennoTammens authored Sep 20, 2024
1 parent be849d7 commit 70285d6
Show file tree
Hide file tree
Showing 5,848 changed files with 627,760 additions and 392,557 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
1 change: 1 addition & 0 deletions ALL2024.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Download orc.org RMS files and convert to json/csv using scoring.py
#

URL = http://data.orc.org/public/WPub.dll?action=DownRMS&ext=json&CountryId=
COUNTRIES = AHO ARG AUS AUT BRA BUL CAN CRO CYP DEN ECU ESP EST FIN FRA GBR \
GER GRE HKG HUN ISR ITA JPN KOR LAT LTU MLT MNE NED NLS NOR PER \
URL = http://data.orc.org/public/WPub.dll?action=DownRMS&ext=json&Family=1&VPPYear=$(YEAR)&CountryId=
COUNTRIES = ARG AUS AUT BRA BUL CAN CRO CYP DEN ECU ESP EST FIN FRA GBR \
GER GRE HKG HUN ISR ITA JPN KOR LAT LTU MLT MNE NED NOR PER \
POL POR ROU RSA RUS SLO SUI SWE TUR UKR USA


YEAR = 2023
YEAR = 2024

JSON_FILES = $(addprefix data/$(YEAR)/, $(addsuffix $(YEAR).json, $(COUNTRIES)))

Expand Down
2 changes: 1 addition & 1 deletion orc-data.json

Large diffs are not rendered by default.

5 changes: 1 addition & 4 deletions parser/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
COUNTRIES = "AHO ARG AUS AUT BRA BUL CAN CRO CYP DEN ECU ESP EST FIN FRA GBR GER GRE HKG HUN ISR ITA JPN KOR LAT LTU MLT MNE NED NLS NOR PER POL POR ROU RSA RUS SLO SUI SWE TUR UKR USA".split()

WIND_SPEEDS = (6, 8, 10, 12, 14, 16, 20)
WIND_ANGLES = (52, 60, 75, 90, 110, 120, 135, 150)
COUNTRIES = "ARG AUS AUT BRA BUL CAN CRO CYP DEN ECU ESP EST FIN FRA GBR GER GRE HKG HUN ISR ITA JPN KOR LAT LTU MLT MNE NED NOR PER POL POR ROU RSA RUS SLO SUI SWE TUR UKR USA".split()
13 changes: 7 additions & 6 deletions parser/json_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import os
from itertools import count

from . import COUNTRIES, WIND_ANGLES, WIND_SPEEDS
from . import COUNTRIES
from .util import time_allowance2speed

# for boats without a sailnumber, give them a unique number
Expand Down Expand Up @@ -62,17 +62,18 @@ def format_data(data):
"crew": float(data["CrewWT"]),
"wetted_surface": float(data["WSS"]),
},
"stability_index": float(data["Stability_Index"]),
"stability_index": float(data["Stability_Index"] if "Stability_Index" in data else -1),
},
}

# velocity prediction
ret["vpp"] = {
"angles": WIND_ANGLES,
"speeds": WIND_SPEEDS,
"angles": data["Allowances"]["WindAngles"],
"speeds": data["Allowances"]["WindSpeeds"],
}
for i, twa in enumerate(WIND_ANGLES):
for i, twa in enumerate(data["Allowances"]["WindAngles"]):
ret["vpp"][twa] = list(
[time_allowance2speed(data["Allowances"]["R%d" % twa][a]) for a, tws in enumerate(WIND_SPEEDS)]
[time_allowance2speed(data["Allowances"]["R%d" % twa][a]) for a, tws in enumerate(data["Allowances"]["WindSpeeds"])]
)

ret["vpp"]["beat_angle"] = data["Allowances"]["BeatAngle"]
Expand Down
2 changes: 1 addition & 1 deletion scoring.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from parser.parser import parse_json_glob
from parser.util import log

YEAR = 2023
YEAR = 2024

if __name__ == "__main__":
# display help:
Expand Down
2 changes: 1 addition & 1 deletion site/build/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion site/build/index.js.map

Large diffs are not rendered by default.

203 changes: 108 additions & 95 deletions site/data/ARG/ARG001.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
"country": "ARG",
"name": "MAC",
"rating": {
"gph": 507.7,
"osn": 496.4,
"gph": 508.7,
"osn": 496.2,
"triple_offshore": [
1.0525,
1.3181,
1.5036
1.0461,
1.3174,
1.5112
],
"triple_inshore": [
0.8169,
1.0576,
1.2278
0.8123,
1.0587,
1.2358
]
},
"boat": {
Expand All @@ -26,14 +26,14 @@
"beam": 3.8,
"draft": 2.61,
"displacement": 4344.0,
"genoa": 43.26,
"main": 64.19,
"genoa": 42.78,
"main": 64.04,
"spinnaker": 0.0,
"spinnaker_asym": 182.47,
"crew": 822.0,
"wetted_surface": 30.51
"spinnaker_asym": 180.59,
"crew": 892.0,
"wetted_surface": 30.82
},
"stability_index": 128.2
"stability_index": -1.0
},
"vpp": {
"angles": [
Expand All @@ -53,115 +53,128 @@
12,
14,
16,
20
20,
24
],
"52": [
6.73,
7.7,
8.05,
8.24,
8.36,
8.44,
8.46
6.67,
7.69,
8.07,
8.28,
8.42,
8.53,
8.65,
8.55
],
"60": [
7.11,
8.02,
7.04,
7.99,
8.37,
8.59,
8.75,
8.87,
8.97
8.61,
8.8,
8.95,
9.13,
9.09
],
"75": [
7.39,
8.28,
8.83,
9.17,
9.42,
9.61,
9.87
7.32,
8.23,
8.8,
9.15,
9.43,
9.66,
9.98,
10.09
],
"90": [
7.29,
8.25,
8.99,
9.62,
10.03,
7.21,
8.19,
8.91,
9.56,
10.0,
10.37,
10.84
10.95,
11.35
],
"110": [
7.07,
8.24,
8.87,
9.41,
10.02,
10.89,
12.21
7.02,
8.22,
8.86,
9.4,
9.9,
10.76,
12.15,
13.13
],
"120": [
6.9,
8.23,
9.14,
9.8,
10.43,
11.05,
12.26
6.86,
8.2,
9.1,
9.78,
10.4,
11.02,
12.22,
13.66
],
"135": [
6.18,
7.8,
8.8,
9.88,
11.03,
12.07,
13.77
6.14,
7.75,
8.73,
9.78,
10.94,
12.02,
13.71,
15.38
],
"150": [
5.18,
6.59,
7.77,
8.74,
9.72,
10.92,
13.77
5.14,
6.54,
7.72,
8.66,
9.6,
10.76,
13.54,
17.1
],
"beat_angle": [
43,
40.2,
39.3,
42.9,
40.5,
39.1,
38.5,
38.6,
38.4,
38.8,
38.7,
39,
39.4
40.3
],
"beat_vmg": [
4.42,
5.21,
5.55,
5.72,
5.82,
5.86,
5.88
4.38,
5.22,
5.58,
5.78,
5.89,
5.98,
6.02,
5.85
],
"run_angle": [
142.1,
144.2,
147.8,
150.5,
147.8,
146.4,
146.7
144.3,
147.6,
150.6,
147.7,
146.3,
146.1,
149.5
],
"run_vmg": [
4.48,
5.71,
6.73,
7.57,
8.42,
9.45,
11.92
4.45,
5.66,
6.69,
7.51,
8.32,
9.31,
11.73,
14.81
]
}
}
Loading

0 comments on commit 70285d6

Please sign in to comment.