See the clone at https://gitorious.org/fg/canvas-hackers-fgdata/source/topics/canvas-radar:
16 lines
661 B
Text
16 lines
661 B
Text
# See: http://wiki.flightgear.org/MapStructure
|
|
# 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, symbol) ; # this controller doesn't need an instance
|
|
var get_alt_diff = func(model) {
|
|
# debug.dump( keys(me) );
|
|
var model_alt = model.get_alt();
|
|
var alt = getprop("/position/altitude-ft"); # FIXME: hardcoded - right, we should probably generalize the "NDSourceDriver logic found in navdisplay.mfd and make it part of MapStructure
|
|
if (alt == nil or model_alt == nil) return 0;
|
|
return alt-model_alt;
|
|
};
|
|
|