|
FhSim
3.1.0
Marine systems simulation
|
| ID | 0084 |
| Class | ARCHITECTURE |
| Severity | 1 |
| Status | ready |
Models: —
Found: 2026-10-20 architecture review (dfe6709); owner ruled "default ok" on the whole plan 2026-10-20
Source plan: plans/arch-2026-10-20/not-implemented/f2-segment-chain-base.md (workspace fhsim_workspace)
Kind: Bit for bit refactor. Take when passing; rides with: the next base feature (same as the Cable.cpp item).
src/kalman/HydroCable.cpp:215-306 (Drag, Spring, StructuralForce) and src/adaptive/CablePendulum.cpp:504-596 (same three functions) each repeat the same lookup of node position and velocity for segment ends. The shape is the same; end B differs (an input port in HydroCable, the ball's own state in CablePendulum). The rest of the segment physics is already shared (CableSegmentStructuralJacobian.h, CableSegmentDrag.h).
None for users. About 90 lines per class are copy-paste lookups; a change to the node layout must be made twice per function.
One per-class private helper (not a shared chain module, which F2 rejected) that returns the position and velocity of node k, and use it in the three functions.
Existing HydroCable and CablePendulum regressions, byte compared before and after.
Very low. Keep the end-B difference inside each class's helper.