# Class things: var name = 'TFC'; var parents = [Symbol.Controller]; var __self__ = caller(0)[0]; Symbol.Controller.add(name, __self__); Symbol.registry[name].df_controller = __self__; var new = func(model) ; # this controller doesn't need an instance # XXX: this is more model-ish than controller-ish var get_threat_lvl = func(model) model.getValue("tcas/threat-level"); var get_vspd = func(model) (model.getValue("velocities/vertical-speed-fps") or 0)*60; var get_alt_diff = func(model) (model.getValue("position/altitude-ft") or 0) - (getprop("/position/altitude-ft") or 0);