`Demonstrates a technique for finding the angle where the RA is half of max.

macro maxra2 `Finds the first heel angle where the RA is half of max.
lim off
hmmt off
variable maxarm
lim ra at max > 1
ra 0 2 /lim /noprint
set maxarm = {limmarg} div 100 plus 1
`\ Maximum RA = {maxarm:3}
variable maxmmt2
set maxmmt2={maxarm} times {weight} div 2
hmmt {maxmmt2}
solve
hmmt off
lim off
/

proj maxra2
read fv
enter pm
modify hull\hull.c
margin 0
/
quit pm
report
draft 7
vcg 10
solve weight, lcg

.maxra2
variable angmax2 = {HEEL}
\ Angle at half max RA = {angmax2:2}
\\

lim angle from equ to ABS {angmax2:2} >0
lim angle from equ to ABS 15 or DI > 0
hmmt 123.0 /c1

heel 0
ra 0 2 /lim:att
print preview
report off
end