Hi all. There is a bug in msy_hydrostatics!  The GZ-curve is calculated correctly BUT when msy_hydrostatics tries to calculate equilibrium heel as consequence of applied heeling moment things go wrong. I simply forgot a factor 9.81... This makes exercise 2 in homework 2 a little more challenging :-)   Thanks all of you that pointed this out!