Files
Phoenix/www/core/rtw_centers.js
T
2026-06-02 20:56:19 +02:00

44 lines
1.7 KiB
JavaScript

export const RTW_CENTER_MAP = {
'1_3': [
20, 25, 31.5, 40, 50, 63, 80, 100, 125, 160,
200, 250, 315, 400, 500, 630, 800, 1000, 1250, 1600,
2000, 2500, 3150, 4000, 5000, 6300, 8000, 10000, 12500, 16000, 20000,
],
'1_6': [
20, 22.4, 25, 28, 31.5, 35.5, 40, 45, 50, 56,
63, 70.8, 80, 90, 100, 112, 125, 141, 160, 180,
200, 224, 250, 282, 315, 355, 400, 450, 500, 560,
630, 708, 800, 900, 1000, 1120, 1250, 1410, 1600, 1800,
2000, 2240, 2500, 2820, 3150, 3550, 4000, 4500, 5000, 5600,
6300, 7080, 8000, 9000, 10000, 11200, 12500, 14100, 16000, 18000, 20000,
],
'1_12': [
20, 21.2, 22.4, 23.8, 25, 26.5, 28, 29.8, 31.5, 33.4,
35.5, 37.6, 40, 42.4, 45, 47.5, 50, 53, 56, 59.5,
63, 67, 71, 75, 80, 85, 90, 95, 100, 106,
112, 118, 125, 132, 140, 150, 160, 170, 180, 190,
200, 212, 224, 238, 250, 265, 280, 298, 315, 334,
355, 376, 400, 424, 450, 475, 500, 530, 560, 595,
630, 670, 710, 750, 800, 850, 900, 950, 1000, 1060,
1120, 1180, 1250, 1320, 1400, 1500, 1600, 1700, 1800, 1900,
2000, 2120, 2240, 2380, 2500, 2650, 2800, 2980, 3150, 3340,
3550, 3760, 4000, 4240, 4500, 4750, 5000, 5300, 5600, 5950,
6300, 6700, 7100, 7500, 8000, 8500, 9000, 9500, 10000, 10600,
11200, 11800, 12500, 13200, 14000, 15000, 16000, 17000, 18000, 19000, 20000,
],
};
export function getRtwCenters(mode = '1_3') {
const key = String(mode || '1_3').replace('/', '_');
if (RTW_CENTER_MAP[key]) return RTW_CENTER_MAP[key].slice();
return RTW_CENTER_MAP['1_3'].slice();
}
export function resolveRtwBpoValue(mode) {
if (typeof mode === 'number' && Number.isFinite(mode)) return mode;
const key = String(mode || '').replace('/', '_');
if (key === '1_12') return 12;
if (key === '1_6') return 6;
return 3;
}