Advanced design software for mastering ship geometry
How can I create my own stability criterion ?

Developing a new script generally never starts from scratch. 

As a set of reference scripts is provided in the “/ProgData/StabCriteria” directory, you will usually first have to identify the closest one, duplicate and rename it before opening this new text file with your favorite text editor (Notepad, Wordpad,…). 

At the same time, it may be very helpful to run MAAT Hydro and calculate the stability of a ship corresponding to the target criterion. When the stability results will be displayed, you will then be able to select and reselect the criterion you are working on whenever you want, provided that you resaved it. The incidence of your modification will then be tested almost in real time on the displayed results, warning boxes appearing whenever bugs are encountered, to allow you to correct the script immediately in your text editor. 

Don't forget to save your file with the "STC" extension instead of "TXT", in order to make it usable for stability calculation. 

A Reference guide on scripting statements is downloadable on MAAT Hydro's Resources page for a detailed information.

How to improve STC script edition ?
Basic text editors like Notepad ou Wordpad allow editing STC scripts, but advanced text editors like NotePad++ or ConText can make the task easier !
How to use the new intesection calculation options ?

Till Rev. 7.0g, the equilibrium angle was calculated thanks to the statement:

Heelpoint heq("Ship Balance", INTERSECTION, gz, ox, h0)

 This statement allowed defining  the heq angle as the nearest gz / ox intersection  from angle h0.

In order to allow sorting the intersections more accurately, 2 new mnemonics have been added, allowing to distinguish intersections where the curve is growing from intersections where the curve is decreasing.

These new options therefore make ship's equilibrium calculation easier and more reliable, by allowing to distinguish directly the growing GZ intersections from the decreasing ones:

Heelpoint heq("Ship Balance", INTERSECTION+, ox, gz, h0)

Please, also notice that the curve whose growth is tested must appear in second position (the first one is not tested), the original 'INTERSECTION, gz, ox' having then been modified in 'INTERSECTION+, ox, gz'.

Moreover, the equilibrium calculation being now totally user redefinable by STC script, these scripts now have to inform MAAT Hydro of the calculated equilibrium angle to take into account (initialization of the GZ Areas, MS, etc...) if not identical to the default value, thanks to the 'SetBalanceHeel' command:


Similarly, the "INTERSECTION-' mnemonic allows selecting only the intersections where the slope is negative, which may make capsizing angle calculation easier and more reliable :

Heelpoint cpsz("Capsizing", INTERSECTION-, 0x, gz, h0)

Concretely speaking, it is therfore now advised to replace this initial equilibrium calculation :

Heelpoint heq("Balance Heel", INTERSECTION, gz, ox, h0)

by the 2 following statements:

Heelpoint heq("Balance Heel", INTERSECTION+, ox, gz, h0)


This new approach allows everyone to define his own equilibrium calculation algorithm if necessary.

How to customize a stability criterion ?

MAAT Hydro’s stability criteria are STC files located in the "\ProgData\StabCriteria" directory. Thanks to the STC scripting capabilities, it is very easy to derive as many distinct criteria as needed from the basic scripts installed with the software.

STC criterion scripting usually starts by searching the nearest existing criterion among the available ones in order to modify its backup with any text editor (Notepad, Wordpad, …).

Simultaneously, it may be very helpful to run MAAT Hydro and to calculate the stability of a test model matching with criterion requirements: When the stability data is displayed, selecting and re-selecting the newly saved criterion will allow an almost interactive troubleshooting. Customized criterion modifications will then be tested almost in real time by controlling MAAT Hydro’s displayed results, warning messages allowing to identify scripting bugs and to correct the script immediately.