`How to calculate the Canadian standard for sail training vessels (TP 13313E)

Proj TP13313E
read fv.gf

dr 6.5
so we, lcg
vcg 9.5
crtpt(2) "crtpt" -22.3, 8, 12.8 /sym

report

limit RA at abs 15 > 1

variable RA15, dwhl, dwhmmt, WL0, WL0MMT

di(*) status profile, plan, body @0@22.3f
ra /lim `/noprint
Set RA15={limmarg} div 100 plus 1
\Righting Arm at 15 degrees = {RA15}
set dwhl=cos 15 power 1.3
set dwhl={RA15} div {dwhl}
\Derived wind heeling lever = dwhl = {dwhl}
set dwhmmt={dwhl} times {weight}
\Righting arm curve with derived wind heeling moment, {dwhmmt}
hmmt {dwhmmt} /c:1.3
solve
di(*) status profile, plan, body @0@22.3f
limit off
limit angle at equ < 20
limit angle at fld < 40
limit angle from equ0 to ra0 > 90
heel 0
RA /lim:att
set WL0={dwhl} times 2
\Wind heel lever at zero degrees = WL0 = {WL0}
set WL0MMT={WL0} times {weight}
\Wind moment at zero degrees = WL0MMT = {WL0MMT}
hmmt {WL0MMT} /c:1.3

solve
di(*) status profile, plan, body @0@22.3f

limit off
limit title 3.1.6 Withstand twice the HMMT at 15 degrees.
limit angle from equil to abs 60 or fld > 0
limit ra at fld to abs 60 > 0.05
heel 0
ra /lim:att
print prev
report off