0d4a86e3d4
Implement traffic in MapStructure and use it. Various other hacks and/or cleanup. Feedback required on whether this is a lot better than before. Also partially revert 9c018d94c4d88dad7476ec250fa3b52024526f4b to add feature to geo.PositionedSearch: it me._equals is overridden then the old mechanism is used instead of the new C++ function, so that the custom equality can be used. (In particular for the Fixes with the TrafficModel class).
12 lines
587 B
Text
12 lines
587 B
Text
# 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);
|
|
|