|
FhSim
3.1.0
Marine systems simulation
|
| ID | 0073 |
| Class | DOCUMENTATION |
| Severity | 1 |
| Status | blocked |
| Models | Seine/Operation |
| Found | 2026-09-26, OpenWiki pass |
| Decision needed | Confirm that the code's leg lengths (L2 = L sin(α/2) / (1 + sin(α/2))) are the intended set path, so that the header, not the code, is corrected. |
src/seine/SeineOperation.h:53-62:
src/seine/SeineOperation.cpp:78-81:
i.e. \(L_2 = L / (1 + 1/\sin(\alpha/2))\). The commented-out line is the header's formula; the live line differs by the factor 2. dL1 and dL2 set the phase start times (SeineOperation.cpp:85-88), so the code's formula is what runs.
Which one the geometry supports, derived from the headings the same constructor sets (SeineOperation.cpp:69-72), with the tow heading \(\psi\) as reference: the first leg runs at \(\psi + \pi - \alpha/2\), the net leg at \(\psi + 3\pi/2\) (square to the tow line), the second leg at \(\psi + \alpha/2\). The lateral components are \(L_1\sin(\alpha/2)\), \(-L_2\) and \(L_1\sin(\alpha/2)\), and the along-tow components of the two legs cancel. The path closes when \(L_2 = 2L_1\sin(\alpha/2)\), i.e. \(\sin(\alpha/2) = (L_2/2)/L_1\): an isosceles triangle with apex angle \(\alpha\) at the start, equilateral only for \(\alpha = 60°\). With \(L = 2L_1 + L_2\) this gives \(L_2 = L/(1 + 1/\sin(\alpha/2))\) and \(L_1 = L_2/(2\sin(\alpha/2))\), which is the code. The header's line 58 has a spurious factor 2 on the left, and lines 61-62 follow from it consistently. With the header's lengths ( \(L_2 = 4L_1\sin(\alpha/2)\)) the path would not close: the lateral sum would be \(-2L_1\sin(\alpha/2)\).
Readers only, if the code is the intent: the documented formulas and "equilateral" do not describe the run. If the owner instead intends the header's lengths, the net leg and the phase start times of every seine run are wrong (severity 3), which is why this is blocked.
If the code is confirmed: correct SeineOperation.h:53,58,61,62 to "isosceles triangle
with apex angle α", \(\sin(\alpha/2) = (L_2/2)/L_1\), \(L_2 = L/(1 + 1/\sin(\alpha/2))\), \(L_1 = L_2/(2\sin(\alpha/2))\), and delete the stale commented-out line at SeineOperation.cpp:79. Check that doc/images/SeineOperation.jpg agrees.
A test that runs the set phases with the vessel's own heading and speed and asserts that the vessel is back at its start point, laterally, at Phase_Towing's start time.
None for the documentation change. Changing the code instead would move every seine regression baseline.