From 922158c3878078f6b0d232463b7e3b9e1ac92162 Mon Sep 17 00:00:00 2001 From: Jose Luis Cercos Pita Date: Wed, 25 Jul 2012 19:12:19 +0200 Subject: [PATCH] Fixed BM hydrostatic computation (wrong CoG coordinates) --- src/Mod/Ship/shipHydrostatics/Tools.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Mod/Ship/shipHydrostatics/Tools.py b/src/Mod/Ship/shipHydrostatics/Tools.py index 012996144..d329fc07c 100644 --- a/src/Mod/Ship/shipHydrostatics/Tools.py +++ b/src/Mod/Ship/shipHydrostatics/Tools.py @@ -306,13 +306,13 @@ def BMT(ship, draft, trim=0.0): B1 = displacement(ship,draft,roll,trim,0.0)[1] # * M # / \ - # / \ BM ==|> BM = (BB/2) / tan(alpha/2) + # / \ BM ==|> BM = (BB/2) / sin(alpha/2) # / \ # *-------* # BB - BB = [B1.x - B0.x, B1.y - B0.y] + BB = [B1.y - B0.y, B1.z - B0.z] BB = math.sqrt(BB[0]*BB[0] + BB[1]*BB[1]) - BM = BM + 0.5*BB/math.tan(math.radians(0.5*roll)) / nRoll # nRoll is the weight function + BM = BM + 0.5*BB/math.sin(math.radians(0.5*roll)) / nRoll # nRoll is the weight function return BM def mainFrameCoeff(ship, draft):