From 9f84471e3a584aa0b5775e770a6cdd2d8d211fe1 Mon Sep 17 00:00:00 2001 From: Yuksel-Rudy Date: Thu, 3 Oct 2024 14:40:27 -0600 Subject: [PATCH] Subsystem set Depth to negative value: In setEndPosition method in Subsystem, when sink is True, and when calling getDepthFromBathymetry, the outputed z is positive (when seabedMod==0 and I'm assuming the same is true for other modes. The bathymetry files I've seen have positive depth values) Therefore, it must be multiplied by a negative sign --- moorpy/subsystem.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/moorpy/subsystem.py b/moorpy/subsystem.py index a38f614..113275f 100644 --- a/moorpy/subsystem.py +++ b/moorpy/subsystem.py @@ -265,7 +265,7 @@ def setEndPosition(self, r, endB, sink=False): if sink: # set z coordinate on seabed z, _ = self.getDepthFromBathymetry(r[0], r[1]) - r = np.array([r[0], r[1], z]) # (making a copy of r to not overwrite it) + r = np.array([r[0], r[1], -z]) # (making a copy of r to not overwrite it) # set end coordinates in global frame just like for a Line if endB == 1: