Fix Nordex mirroring logic by default v1.0.3
Deploy Bürgerwind / deploy (push) Successful in 16s Details

This commit is contained in:
Johannes Baumeister 2026-05-12 13:20:09 +02:00
parent 3ef8e1d017
commit 636286024c
2 changed files with 8 additions and 7 deletions

13
app.js
View File

@ -160,7 +160,8 @@ document.addEventListener('DOMContentLoaded', async () => {
const foundation = turf.circle(point, (fr) / 1000, { units: 'kilometers', steps: steps });
// Helper for KSF Geometries
const spg = ksfMirrored ? -1 : 1;
const isNordex = hersteller && hersteller.toLowerCase() === 'nordex';
const spg = (ksfMirrored !== isNordex) ? -1 : 1;
// Turf uses CCW for positive angles. Most tools use CW.
// We'll use negative angle for CCW to achieve CW rotation if expected.
const angle = -ksfAngle;
@ -196,20 +197,20 @@ document.addEventListener('DOMContentLoaded', async () => {
// Nordex Geometries (Based on new QGIS schema provided by user)
// KSF (Red): Complex polygon
ksfCoords = [
[-18, -44.72], [-18, 14.91], [6.31, 14.91], [18.38, 0],
[18.38, -33.19], [7, -44.72], [-18, -44.72]
[18, -44.72], [18, 14.91], [-6.31, 14.91], [-18.38, 0],
[-18.38, -33.19], [-7, -44.72], [18, -44.72]
];
// AMF (Green Area): 180m long starting at KSF edge, 15m wide
const amf = [
[-18, -44.72], [-18, -224.72], [-3, -224.72], [-3, -44.72], [-18, -44.72]
[18, -44.72], [18, -224.72], [3, -224.72], [3, -44.72], [18, -44.72]
];
mfParts = [amf];
// BLF/Road (Blue Area): Complex unified shape
blfCoords = [
[-18, -224.72], [-18, 40], [-49.5, 40], [-49.5, -100],
[-24, -100], [-24, -224.72], [-18, -224.72]
[18, -224.72], [18, 40], [49.5, 40], [49.5, -100],
[24, -100], [24, -224.72], [18, -224.72]
];
} else {
// Enercon / Vestas / GE (Standard)

View File

@ -142,7 +142,7 @@
<div id="statusInfo"
style="margin-top: auto; padding-top: 20px; font-size: 0.8rem; color: var(--text-dim);">
Bereit. (v1.0.2 - Mirrored Nordex)
Bereit. (v1.0.3 - Mirrored Nordex Default)
</div>
</div>
</aside>