Skip to content

Commit

Permalink
Subsystem set Depth to negative value:
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Yuksel-Rudy committed Oct 3, 2024
1 parent 9881074 commit 9f84471
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion moorpy/subsystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 9f84471

Please sign in to comment.