1
0
Fork 0

fix update hz - display HI/LO on ND

This commit is contained in:
Inuyaksa 2021-02-14 21:02:32 +01:00
parent d08be1e613
commit 3f16a74537
11 changed files with 187 additions and 551 deletions

View file

@ -69,7 +69,7 @@ canvas.NavDisplay.newMFD = func(canvas_group, parent=nil, nd_options=nil, update
# because things are much better configurable that way
# now look up all required SVG elements and initialize member fields using the same name to have a convenient handle
foreach(var element; ["dmeLDist","dmeRDist","dmeL","dmeR","vorL","vorR","vorLId","vorRId",
"status.wxr","status.wpt","status.sta","status.arpt"])
"status.wxr","status.wpt","status.sta","status.arpt","terrHI","terrLO"])
me.symbols[element] = me.nd.getElementById(element);
# load elements from vector image, and create instance variables using identical names, and call updateCenter() on each

View file

@ -14,8 +14,6 @@ canvas.SymbolLayer.add(name, {
}
});
var terrain_tree = "/instrumentation/terrain";
var new = func(layer) {
var m = {
parents: [__self__],
@ -36,14 +34,10 @@ var del = func() {
var searchCmd = func {
if(me.map.getRange() == nil) return [];
#var lat = getprop(terrain_tree~"/center/latitude-deg");
#var lon = getprop(terrain_tree~"/center/longitude-deg");
#if(lat == nil or lon == nil) {
var pos = geo.aircraft_position();
lat = pos.lat();
lon = pos.lon();
#}
var pos = geo.aircraft_position();
lat = pos.lat();
lon = pos.lon();
var result = geo.Coord.new();
result.set_latlon(lat, lon);

View file

@ -7,20 +7,19 @@ DotSym.makeinstance( name, __self__ );
var element_type = "group";
var terrain_visible = props.globals.initNode("/custom/terrain/visible", 0,"INT");
var terrain_minalt = props.globals.initNode("/custom/terrain/min-altitude", 0,"INT");
var terrain_maxalt = props.globals.initNode("/custom/terrain/max-altitude", -9999,"INT");
var tile_list = ["*black*","tile_01.png","tile_02.png","tile_03.png","tile_04.png","tile_06.png","tile_09.png"];
var radar_beacon = 0;
var radar_cycle = 0;
var rader_cleared = 0;
var get_elevation = func (lat, lon) {
var info = geodinfo(lat, lon);
var elevation = 0;
if (info != nil) { elevation = int(info[0] * 3.2808399); }
else { elevation = nil; }
return elevation;
}
var updateTerrain = func(r_scaled){
@ -28,7 +27,11 @@ var updateTerrain = func(r_scaled){
if(me.fetching) return;
me.fetching = 1;
me.rader_cleared = 0;
if (me.request_clear == 1) {
me.request_clear = 0;
me.clear();
}
var RAD2DEG = 57.2957795;
var DEG2RAD = 0.016774532925;
@ -54,80 +57,85 @@ var updateTerrain = func(r_scaled){
col = -1 + (-1 * a);
}
#var col = me.radar_beacon - me.tileradius;
var trn = me.terrlayer[side ~ a];
#for (var a=0; a < me.tileradius; a+=1) {
var len = size(trn);
var range = me.range;
#var trnL = me.terrlayer["L" ~ a];
#var trnR = me.terrlayer["R" ~ a];
var trn = me.terrlayer[side ~ a];
var tiles = me.tile_list;
var len = size(trn);
var range = me.range;
var proj_lon = pos_lon + ((col * (range/30) * math.sin(DEG2RAD * (heading - 90))) / 40);
var proj_lat = pos_lat + ((col * (range/30) * math.cos(DEG2RAD * (heading - 90))) / 40);
var tiles = me.tile_list;
var elevft = [];
var proj_lon = pos_lon + ((col * (range/30) * math.sin(DEG2RAD * (heading - 90))) / 40);
var proj_lat = pos_lat + ((col * (range/30) * math.cos(DEG2RAD * (heading - 90))) / 40);
for (var row = 0; row < len; row += 1) {
var elevft = [];
if (trn[row] == nil) {
append(elevft,-1);
continue;
}
for (var row = 0; row < len; row += 1) {
var point_lon = proj_lon + ((row * (range/30) / 40) * math.sin(DEG2RAD * heading));
var point_lat = proj_lat + ((row * (range/30) / 40) * math.cos(DEG2RAD * heading));
if (trn[row] == nil) {
append(elevft,-1);
continue;
}
var point_lon = proj_lon + ((row * (range/30) / 40) * math.sin(DEG2RAD * heading));
var point_lat = proj_lat + ((row * (range/30) / 40) * math.cos(DEG2RAD * heading));
var elev = me.get_elevation(point_lat, point_lon);
var grad = 0; #black
if (elev != nil) {
if (elev < me.basealtitudeft) grad = 0; # < 400 (at airport) use blank - trivial
else {
var diff = elev - altitudeft;
if (diff>=0) {
grad = int(diff/1000) + 3;
if (grad>5) grad = 5;
} else {
if (diff>-500) grad = 3; # lite yellow
else {
grad = 2 + int(diff/1000);
if (grad<0) grad = 0;
}
var elev = me.get_elevation(point_lat, point_lon);
var grad = 0; #black
if (elev != nil) {
if (elev<me.min_altitude) me.min_altitude = elev;
else if (elev>me.max_altitude) me.max_altitude = elev;
if (elev < me.basealtitudeft) grad = 0; # < 400 (at airport) use blank - trivial
else {
var diff = elev - altitudeft;
if (diff>=0) {
grad = int(diff/1000) + 3;
if (grad>5) grad = 5;
} else {
if (diff>-500) grad = 3; # lite yellow
else {
grad = 2 + int(diff/1000);
if (grad<0) grad = 0;
}
}
append(elevft,grad); # 0-5
} else {
append(elevft,6); # magenta
}
append(elevft,grad); # 0-5
} else {
append(elevft,6); # magenta
}
}
for (var r=0; r < len; r+=1) {
me.radar_cleared = 0;
var imgx = elevft[r];
if (imgx == -1) continue;
if (imgx < 1) trn[r].hide();
else trn[r].setFile(me.imgpath ~ me.tile_list[imgx]).show();
#trnR[r].setFile(me.imgpath ~ me.tile_list[2-imgx]).show();
}
#}
for (var r=0; r < len; r+=1) {
var imgx = elevft[r];
if (imgx == -1) continue;
if (imgx < 1) trn[r].hide();
else trn[r].setFile(me.imgpath ~ me.tile_list[imgx]).show();
}
me.radar_beacon += 1;
if (me.radar_beacon >= (me.tileradius*2)) {
me.radar_beacon = 0;
me.radar_cycle += 1;
if (me.radar_beacon >= (me.tileradiusw*2)) {
me.update_altitudes();
me.restart_beacon();
}
#me.last_request = getprop("sim/time/elapsed-sec");
me.fetching = 0;
};
var update_altitudes = func {
me.terrain_minalt.setValue(me.min_altitude);
me.terrain_maxalt.setValue(me.max_altitude);
}
var restart_beacon = func {
me.radar_beacon = 0;
me.radar_cycle += 1;
me.min_altitude = 9999;
me.max_altitude = -9999;
};
var init = func {
#print('TERRAIN init');
me.tile = 33; # preferred 34
@ -137,24 +145,31 @@ var init = func {
me.range = me.model.rangeNm; # Range of Navigation Display
me.viewport_radius = me.getOption('viewport_radius', 670);
me.imgpath = get_local_path('res/terrain/');
me.rader_cleared = 1;
me.radar_beacon = 0;
me.radar_cycle = 0;
me.radar_cleared = 1;
me.request_clear = 0;
me.basealtitudeft = nil;
me.visible = 0;
me.min_altitude = 9999;
me.max_altitude = -9999;
var tile = me.tile;
var gx = int(me.viewport_radius / tile);
me.tileradius = gx;
me.terrlayer = {}; #me.element.createChild("image").set("z-index", -100).hide();
var limx = int((512/tile)+0.5); # horiz space is smaller
me.tileradiusw = limx;
var centx = 0; #me.viewport_radius * -0.5;
me.terrlayer = {};
var centx = 0;
var centy = -me.viewport_radius;
var group = me.group.createChild("group").set("z-index", -100); #me.element
for (var c=0; c<gx; c+=1) {
for (var c=0; c<limx; c+=1) {
var hh = c * tile;
var mx = (c == 0) ? gx : int(math.sqrt(gx*gx-c*c) + 0.5);
var my = int(c*4/gx);
@ -177,9 +192,9 @@ var init = func {
me.terrlayer["R" ~ c] = grprx;
}
me.update_interval = 300;
me.last_request = 0;
#me.update_interval = 300;
#me.last_request = 0;
#var r_scaled = (me.fetchRad*me.viewport_radius)/me.range;
#me.fetchWXRMap(r_scaled);
@ -189,9 +204,10 @@ var init = func {
var clear = func {
if (me.rader_cleared == 0) {
for (var c=0; c<me.tileradius; c+=1 ) {
var rowL = me.terrlayer["L" ~ c];
if (me.radar_cleared == 0) {
me.radar_cleared = 1;
for (var c=0; c<me.tileradiusw; c+=1 ) {
var rowL = me.terrlayer["L" ~ c];
var rowR = me.terrlayer["R" ~ c];
var len = size(rowL);
for (var r=0; r<len; r+=1) {
@ -199,9 +215,8 @@ var clear = func {
rowL[r].hide();
rowR[r].hide();
}
}
}
me.rader_cleared = 1;
}
}
}
}
@ -214,18 +229,15 @@ var draw = func {
me.fetchRad = me.model.fetchRad; # Radius of radar layer to fetch
var r_scaled = (me.fetchRad*me.viewport_radius)/me.range;
var update_visible = (me.group.getVisible() != me.visible);
if(update_size or update_visible){
me.clear();
me.visible = me.group.getVisible();
if(update_size){
me.request_clear = 1;
}
#var rot = getprop("orientation/heading-deg");
#rot -= me.layer.map.getHdg();
#me.element.setRotation(rot*D2R);
if(me.terrain_visible.getValue() == 0){
me.request_clear = 1;
me.terrain_visible.setValue(1);
}
me.updateTerrain(r_scaled);
};

View file

@ -26,9 +26,9 @@
inkscape:window-height="1017"
id="namedview102"
showgrid="false"
inkscape:zoom="1.2732019"
inkscape:cx="406.21664"
inkscape:cy="201.87587"
inkscape:zoom="0.77702762"
inkscape:cx="373.9808"
inkscape:cy="476.40075"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
@ -242,7 +242,53 @@
inkscape:connector-curvature="0"
inkscape:transform-center-y="-340.574"
inkscape:label="#path3843"
sodipodi:nodetypes="cc" /><path
sodipodi:nodetypes="cc" /><g
id="terrGroup"
transform="translate(-7.356522,-6.2275037)"><text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;display:inline;fill:#179ab7;fill-opacity:1;stroke:none"
x="954.74292"
y="828.34009"
id="text1996"
inkscape:label="#text7243"><tspan
style="font-size:24px;line-height:1.25"
sodipodi:role="line"
id="tspan1994"
x="954.74292"
y="828.34009">TERR</tspan></text><text
inkscape:label="#text7243"
id="terrHI"
y="858.63959"
x="967.73273"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;display:inline;fill:#0dc04b;fill-opacity:1;stroke:none"
xml:space="preserve"><tspan
y="858.63959"
x="967.73273"
id="tspan2002"
sodipodi:role="line"
style="font-size:32px;line-height:1.25;fill:#0dc04b">000</tspan></text><text
inkscape:label="#text7243"
id="terrLO"
y="888.00446"
x="967.73273"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;display:inline;fill:#0dc04b;fill-opacity:1;stroke:none"
xml:space="preserve"><tspan
y="888.00446"
x="967.73273"
id="tspan2006"
sodipodi:role="line"
style="font-size:32px;line-height:1.25;fill:#0dc04b">000</tspan></text><rect
style="fill:none;stroke:#f2f235;stroke-width:3.15591;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.9941"
id="rect2018"
width="63.76524"
height="58.673904"
x="961.99512"
y="833.17212"
ry="0" /><path
style="font-variation-settings:normal;opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#f2f235;stroke-width:3.15591;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.9941;stop-color:#000000;stop-opacity:1"
d="m 962.24879,861.87476 63.60531,0.61588"
id="path2033"
sodipodi:nodetypes="cc" /></g><path
sodipodi:nodetypes="cc"
inkscape:label="#path3843"
inkscape:transform-center-y="-340.574"
@ -289,18 +335,19 @@
inkscape:label="#path7253" /><g
id="windArrow"
transform="matrix(0.81,0,0,0.81,-8.3843096,20.546412)"><path
inkscape:label="#path3017"
sodipodi:nodetypes="ccccc"
inkscape:connector-curvature="0"
id="path3017"
d="m 63.260317,138.7628 9.917949,-18.75435 -9.917949,18.75529 -9.969447,-18.75529 9.969447,18.75529"
style="display:inline;fill:#0dc04b;stroke:#0dc04b;stroke-width:4.44444;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /><path
inkscape:label="#path3017l"
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path3107l"
d="M 63.260505,77.514285 63.260317,138.7628"
style="display:inline;fill:#0dc04b;stroke:#0dc04b;stroke-width:4.44444;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /></g><g
style="display:inline;fill:#0dc04b;stroke:#0dc04b;stroke-width:4.44444;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /><path
style="font-variation-settings:normal;opacity:1;vector-effect:none;fill:#0dc04b;fill-opacity:1;stroke:#0dc04b;stroke-width:4.44444;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
d="m 53.29087,120.00845 9.969447,18.75435"
id="path1242" /><path
style="font-variation-settings:normal;opacity:1;vector-effect:none;fill:#0dc04b;fill-opacity:1;stroke:#0dc04b;stroke-width:4.44444;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
d="M 73.229764,120.00845 63.260317,138.7628"
id="path1244"
sodipodi:nodetypes="cc" /></g><g
inkscape:label="#g3124"
id="compass"
transform="rotate(0.34999975,516.49696,825.81379)"><path
@ -1243,7 +1290,7 @@
inkscape:transform-center-y="-498.20098"
inkscape:transform-center-x="-0.080644898" /><path
style="fill:none;stroke:#cecdce;stroke-width:2.38918;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 997.8036,974.07643 V 919.81909 H 987.5 l 17.7357,-42.20198 m 7.1787,96.45932 v -54.25734 h 10.557 l -17.7357,-42.20198"
d="M 997.8036,988.07643 V 933.81909 H 987.5 l 17.7357,-42.20198 m 7.1787,96.45932 v -54.25734 h 10.557 l -17.7357,-42.20198"
id="vorRSym"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccccc"
@ -2056,7 +2103,7 @@
id="layer9"
inkscape:label="ND_BOTTOM_MEMO"
style="display:inline"><rect
style="opacity:0.99;fill:none;stroke:#ffffff;stroke-width:3.15553"
style="opacity:0.99;fill:none;stroke:#ffffff;stroke-width:3.15591;stroke-miterlimit:4;stroke-dasharray:none"
id="nd_warn_msgbox"
width="563.05048"
height="46.844471"

Before

Width:  |  Height:  |  Size: 137 KiB

After

Width:  |  Height:  |  Size: 140 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 175 B

After

Width:  |  Height:  |  Size: 182 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 175 B

After

Width:  |  Height:  |  Size: 181 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 175 B

After

Width:  |  Height:  |  Size: 182 B

View file

@ -1,439 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
sodipodi:docname="terrainND.svg"
inkscape:version="1.0.2 (e86c870879, 2021-01-15, custom)"
xml:space="preserve"
id="svg5180"
height="1024"
width="1024"
version="1.1"><sodipodi:namedview
pagecolor="#000000"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="1"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1017"
id="namedview102"
showgrid="false"
inkscape:zoom="0.9002897"
inkscape:cx="545.90803"
inkscape:cy="663.88974"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="layer1"
inkscape:object-nodes="true"
inkscape:snap-smooth-nodes="true"
inkscape:snap-object-midpoints="true"
inkscape:snap-grids="false"
inkscape:snap-to-guides="false"
showguides="true"
inkscape:guide-bbox="true"
inkscape:document-rotation="0"
inkscape:snap-text-baseline="true"><sodipodi:guide
id="guide3167"
orientation="1,0"
position="512,811.5" /><sodipodi:guide
id="guide3177"
orientation="-0.5,-0.86602541"
position="512,200" /><sodipodi:guide
id="guide3179"
orientation="-0.866025,-0.5"
position="512,200" /><sodipodi:guide
position="512,465"
orientation="0,1"
id="guide4003" /><sodipodi:guide
orientation="-0.5,0.8660254"
position="512,200"
id="guide3537" /><sodipodi:guide
orientation="-0.8660254,0.5"
position="512,200"
id="guide3545" /><sodipodi:guide
position="-3.9271069,171.8178"
orientation="1,0"
id="guide742" /><sodipodi:guide
position="63.243533,882.27478"
orientation="1,0"
id="guide3109" /><sodipodi:guide
position="59.703006,906.39896"
orientation="0,-1"
id="guide3111" /><sodipodi:guide
position="70.197038,990.32506"
orientation="0,-1"
id="guide3113" /><sodipodi:guide
position="211.67107,1010.2551"
orientation="0,-1"
id="guide3115" /><sodipodi:guide
position="14.137585,913.25558"
orientation="1,0"
id="guide3498" /><sodipodi:guide
position="512.0574,200.9316"
orientation="0,-1"
id="guide1833" /></sodipodi:namedview><metadata
id="metadata5186"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title><dc:creator><cc:Agent><dc:title>Gijs de Rooy</dc:title></cc:Agent></dc:creator><cc:license
rdf:resource="" /></cc:Work></rdf:RDF></metadata><defs
id="defs5184"><rect
x="-4.4430143"
y="615.35748"
width="516.43165"
height="208.64161"
id="rect1845" /><rect
x="27.768839"
y="751.98017"
width="468.73801"
height="215.48619"
id="rect1839" /><rect
x="-4.4430143"
y="615.35748"
width="516.43165"
height="208.64161"
id="rect1853" /><rect
x="-4.4430143"
y="615.35748"
width="516.43165"
height="208.64161"
id="rect1865" /><rect
x="-4.4430143"
y="615.35748"
width="516.43165"
height="208.64161"
id="rect1871" /><rect
x="-4.4430143"
y="615.35748"
width="516.43165"
height="208.64161"
id="rect1877" /><rect
x="-4.4430143"
y="615.35748"
width="516.43165"
height="208.64161"
id="rect1883" /><rect
x="-4.4430143"
y="615.35748"
width="516.43165"
height="208.64161"
id="rect1889" /><rect
x="-4.4430143"
y="615.35748"
width="516.43165"
height="208.64161"
id="rect1895" /><rect
x="-4.4430143"
y="615.35748"
width="516.43165"
height="208.64161"
id="rect1901" /><rect
x="-4.4430143"
y="615.35748"
width="516.43165"
height="208.64161"
id="rect1907" /><rect
x="-4.4430143"
y="615.35748"
width="516.43165"
height="208.64161"
id="rect1913" /><rect
x="-4.4430143"
y="615.35748"
width="516.43165"
height="208.64161"
id="rect1919" /><rect
x="-4.4430143"
y="615.35748"
width="516.43165"
height="208.64161"
id="rect1925" /><rect
x="-4.4430143"
y="615.35748"
width="516.43165"
height="208.64161"
id="rect1931" /><rect
x="-4.4430143"
y="615.35748"
width="516.43165"
height="208.64161"
id="rect1937" /><rect
x="-4.4430143"
y="615.35748"
width="516.43165"
height="208.64161"
id="rect1943" /><rect
x="-4.4430143"
y="615.35748"
width="516.43165"
height="208.64161"
id="rect1949" /><rect
x="-4.4430143"
y="615.35748"
width="516.43165"
height="208.64161"
id="rect1955" /><rect
x="-4.4430143"
y="615.35748"
width="516.43165"
height="208.64161"
id="rect1961" /><rect
x="-4.4430143"
y="615.35748"
width="516.43165"
height="208.64161"
id="rect1967" /><rect
x="-4.4430143"
y="615.35748"
width="516.43165"
height="208.64161"
id="rect1973" /><rect
x="-4.4430143"
y="615.35748"
width="516.43165"
height="208.64161"
id="rect1979" /><rect
x="-4.4430143"
y="615.35748"
width="516.43165"
height="208.64161"
id="rect1985" /></defs><g
inkscape:groupmode="layer"
id="layer4"
inkscape:label="ARC LAYOUT"
style="display:inline"
sodipodi:insensitive="true"><text
inkscape:label="#text7243"
id="text3549-7"
y="-258.81296"
x="-364.83682"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:36px;line-height:125%;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ededed;fill-opacity:1;stroke:none"
xml:space="preserve"
transform="rotate(0.34999975)" /><g
id="unavailARC"><g
id="rangeArcs-3"
inkscape:label="#g3890"
style="display:inline;stroke:#ff0000"
transform="translate(0.16248,0.757949)"><path
sodipodi:nodetypes="cscc"
inkscape:connector-curvature="0"
id="path3103-6"
d="m 168.665,820.476 c 0,-189.321 153.474,-342.796 342.795,-342.796 189.319,0 342.794,153.473 342.794,342.796 0,0 0,0 0,0"
style="fill:none;stroke:#ff0000;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:32, 16;stroke-dashoffset:0;stroke-opacity:1" /><path
style="fill:none;stroke:#ff0000;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:32, 16;stroke-dashoffset:0;stroke-opacity:1"
d="m -4.01174,820.476 c 0,-284.688 230.78374,-515.473 515.47174,-515.473 284.685,0 515.47,230.782 515.47,515.473 0,0 0,0 0,0"
id="path3886-7"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cscc" /><path
sodipodi:nodetypes="cscc"
inkscape:connector-curvature="0"
id="path3888-5"
d="m 340.958,820.476 c 0,-94.166 76.335,-170.502 170.501,-170.502 94.166,0 170.501,76.335 170.501,170.502 0,0 0,0 0,0"
style="fill:none;stroke:#ff0000;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:32, 16;stroke-dashoffset:0;stroke-opacity:1" /></g><circle
style="fill:none;stroke:#ff0000;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="path4079-1"
transform="rotate(35.485921)"
cx="895.22479"
cy="373.73712"
r="15" /></g></g><g
inkscape:groupmode="layer"
id="layer1"
inkscape:label="Layer 1"><text
xml:space="preserve"
id="text1837"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:85.3333px;line-height:1.25;font-family:'Oswald Regular';-inkscape-font-specification:'Oswald Regular, ';letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect1839);fill:#000000;fill-opacity:1;stroke:none;" /><text
xml:space="preserve"
id="text1843"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'B612 Mono';-inkscape-font-specification:'B612 Mono';letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect1845);fill:#ffffff;fill-opacity:1;stroke:none;"
transform="translate(0,180)"><tspan
x="-4.4433594"
y="644.77306"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;font-family:'B612 Mono';-inkscape-font-specification:'B612 Mono';fill:#ffffff">▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓</tspan></tspan></text><text
xml:space="preserve"
id="text1851"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'C64 Pro Mono';-inkscape-font-specification:'C64 Pro Mono';letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect1853);fill:#ffffff;fill-opacity:1;stroke:none;"
transform="rotate(4.5780582,-1727.6127,709.22434)"
inkscape:transform-center-x="255.69445"
inkscape:transform-center-y="-24.446331"><tspan
x="-4.4433594"
y="647.35742"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;font-family:'C64 Pro Mono';-inkscape-font-specification:'C64 Pro Mono';fill:#ffffff">▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓</tspan></tspan></text><text
xml:space="preserve"
id="text1869"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'C64 Pro Mono';-inkscape-font-specification:'C64 Pro Mono';letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect1871);fill:#ffffff;fill-opacity:1;stroke:none;"
transform="rotate(9.100266,-614.83686,720.0767)"
inkscape:transform-center-x="252.97095"
inkscape:transform-center-y="-44.53058"><tspan
x="-4.4433594"
y="647.35742"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;font-family:'C64 Pro Mono';-inkscape-font-specification:'C64 Pro Mono';fill:#ffffff">▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓</tspan></tspan></text><text
xml:space="preserve"
id="text1875"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'C64 Pro Mono';-inkscape-font-specification:'C64 Pro Mono';letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect1877);fill:#ffffff;fill-opacity:1;stroke:none;"
transform="rotate(13.593526,-241.69592,723.71576)"
inkscape:transform-center-x="248.70485"
inkscape:transform-center-y="-64.21193"><tspan
x="-4.4433594"
y="647.35742"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;font-family:'C64 Pro Mono';-inkscape-font-specification:'C64 Pro Mono';fill:#ffffff">▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓</tspan></tspan></text><text
xml:space="preserve"
id="text1881"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'C64 Pro Mono';-inkscape-font-specification:'C64 Pro Mono';letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect1883);fill:#ffffff;fill-opacity:1;stroke:none;"
transform="rotate(18.071597,-53.848319,725.54775)"
inkscape:transform-center-x="242.93212"
inkscape:transform-center-y="-83.434167"><tspan
x="-4.4433594"
y="647.35742"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;font-family:'C64 Pro Mono';-inkscape-font-specification:'C64 Pro Mono';fill:#ffffff">▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓</tspan></tspan></text><text
xml:space="preserve"
id="text1887"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'C64 Pro Mono';-inkscape-font-specification:'C64 Pro Mono';letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect1889);fill:#ffffff;fill-opacity:1;stroke:none;"
transform="rotate(22.553626,59.938876,726.65746)"
inkscape:transform-center-x="235.66913"
inkscape:transform-center-y="-102.16329"><tspan
x="-4.4433594"
y="647.35742"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;font-family:'C64 Pro Mono';-inkscape-font-specification:'C64 Pro Mono';fill:#ffffff">▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓</tspan></tspan></text><text
xml:space="preserve"
id="text1893"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'C64 Pro Mono';-inkscape-font-specification:'C64 Pro Mono';letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect1895);fill:#ffffff;fill-opacity:1;stroke:none;"
transform="rotate(26.935245,134.95226,727.38903)"
inkscape:transform-center-x="227.17515"
inkscape:transform-center-y="-119.86962"><tspan
x="-4.4433594"
y="647.35742"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;font-family:'C64 Pro Mono';-inkscape-font-specification:'C64 Pro Mono';fill:#ffffff">▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓</tspan></tspan></text><text
xml:space="preserve"
id="text1899"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'C64 Pro Mono';-inkscape-font-specification:'C64 Pro Mono';letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect1901);fill:#ffffff;fill-opacity:1;stroke:none;"
transform="rotate(31.359525,189.75704,727.92351)"
inkscape:transform-center-x="217.25128"
inkscape:transform-center-y="-137.03707"><tspan
x="-4.4433594"
y="647.35742"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;font-family:'C64 Pro Mono';-inkscape-font-specification:'C64 Pro Mono';fill:#ffffff">▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓</tspan></tspan></text><text
xml:space="preserve"
id="text1905"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'C64 Pro Mono';-inkscape-font-specification:'C64 Pro Mono';letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect1907);fill:#ffffff;fill-opacity:1;stroke:none;"
transform="rotate(35.750388,231.02653,728.32599)"
inkscape:transform-center-x="206.12208"
inkscape:transform-center-y="-153.26763"><tspan
x="-4.4433594"
y="647.35742"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;font-family:'C64 Pro Mono';-inkscape-font-specification:'C64 Pro Mono';fill:#ffffff">▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓</tspan></tspan></text><text
xml:space="preserve"
id="text1911"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'C64 Pro Mono';-inkscape-font-specification:'C64 Pro Mono';letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect1913);fill:#ffffff;fill-opacity:1;stroke:none;"
transform="rotate(40.226281,264.08909,728.64843)"
inkscape:transform-center-x="193.53251"
inkscape:transform-center-y="-168.8859"><tspan
x="-4.4433594"
y="647.35742"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;font-family:'C64 Pro Mono';-inkscape-font-specification:'C64 Pro Mono';fill:#ffffff">▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓</tspan></tspan></text><text
xml:space="preserve"
id="text1917"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'C64 Pro Mono';-inkscape-font-specification:'C64 Pro Mono';letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect1919);fill:#ffffff;fill-opacity:1;stroke:none;"
transform="rotate(44.545706,289.92899,728.90043)"
inkscape:transform-center-x="180.26287"
inkscape:transform-center-y="-182.98246"><tspan
x="-4.4433594"
y="647.35742"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;font-family:'C64 Pro Mono';-inkscape-font-specification:'C64 Pro Mono';fill:#ffffff">▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓</tspan></tspan></text><text
xml:space="preserve"
id="text1923"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'C64 Pro Mono';-inkscape-font-specification:'C64 Pro Mono';letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect1925);fill:#ffffff;fill-opacity:1;stroke:none;"
transform="rotate(48.954184,311.81689,729.11389)"
inkscape:transform-center-x="165.66431"
inkscape:transform-center-y="-196.29727"><tspan
x="-4.4433594"
y="647.35742"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;font-family:'C64 Pro Mono';-inkscape-font-specification:'C64 Pro Mono';fill:#ffffff">▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓</tspan></tspan></text><text
xml:space="preserve"
id="text1929"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'C64 Pro Mono';-inkscape-font-specification:'C64 Pro Mono';letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect1931);fill:#ffffff;fill-opacity:1;stroke:none;"
transform="rotate(53.416115,330.49871,729.29609)"
inkscape:transform-center-x="149.89094"
inkscape:transform-center-y="-208.59048"><tspan
x="-4.4433594"
y="647.35742"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;font-family:'C64 Pro Mono';-inkscape-font-specification:'C64 Pro Mono';fill:#ffffff">▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓</tspan></tspan></text><text
xml:space="preserve"
id="text1935"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'C64 Pro Mono';-inkscape-font-specification:'C64 Pro Mono';letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect1937);fill:#ffffff;fill-opacity:1;stroke:none;"
transform="rotate(57.808384,346.26305,729.44983)"
inkscape:transform-center-x="133.47593"
inkscape:transform-center-y="-219.45719"><tspan
x="-4.4433594"
y="647.35742"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;font-family:'C64 Pro Mono';-inkscape-font-specification:'C64 Pro Mono';fill:#ffffff">▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓</tspan></tspan></text><text
xml:space="preserve"
id="text1941"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'C64 Pro Mono';-inkscape-font-specification:'C64 Pro Mono';letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect1943);fill:#ffffff;fill-opacity:1;stroke:none;"
transform="rotate(62.213088,360.01609,729.58396)"
inkscape:transform-center-x="116.22719"
inkscape:transform-center-y="-229.06008"><tspan
x="-4.4433594"
y="647.35742"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;font-family:'C64 Pro Mono';-inkscape-font-specification:'C64 Pro Mono';fill:#ffffff">▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓</tspan></tspan></text><text
xml:space="preserve"
id="text1947"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'C64 Pro Mono';-inkscape-font-specification:'C64 Pro Mono';letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect1949);fill:#ffffff;fill-opacity:1;stroke:none;"
transform="rotate(66.669261,372.25408,729.70331)"
inkscape:transform-center-x="98.078678"
inkscape:transform-center-y="-237.39809"><tspan
x="-4.4433594"
y="647.35742"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;font-family:'C64 Pro Mono';-inkscape-font-specification:'C64 Pro Mono';fill:#ffffff">▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓</tspan></tspan></text><text
xml:space="preserve"
id="text1953"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'C64 Pro Mono';-inkscape-font-specification:'C64 Pro Mono';letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect1955);fill:#ffffff;fill-opacity:1;stroke:none;"
transform="rotate(71.031839,382.90908,729.80722)"
inkscape:transform-center-x="79.73616"
inkscape:transform-center-y="-244.1709"><tspan
x="-4.4433594"
y="647.35742"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;font-family:'C64 Pro Mono';-inkscape-font-specification:'C64 Pro Mono';fill:#ffffff">▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓</tspan></tspan></text><text
xml:space="preserve"
id="text1959"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'C64 Pro Mono';-inkscape-font-specification:'C64 Pro Mono';letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect1961);fill:#ffffff;fill-opacity:1;stroke:none;"
transform="rotate(75.498211,392.70066,729.90271)"
inkscape:transform-center-x="60.479465"
inkscape:transform-center-y="-249.63878"><tspan
x="-4.4433594"
y="647.35742"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;font-family:'C64 Pro Mono';-inkscape-font-specification:'C64 Pro Mono';fill:#ffffff">▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓</tspan></tspan></text><text
xml:space="preserve"
id="text1965"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'C64 Pro Mono';-inkscape-font-specification:'C64 Pro Mono';letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect1967);fill:#ffffff;fill-opacity:1;stroke:none;"
transform="rotate(80.03533,401.68675,729.99035)"
inkscape:transform-center-x="40.54228"
inkscape:transform-center-y="-253.64071"><tspan
x="-4.4433594"
y="647.35742"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;font-family:'C64 Pro Mono';-inkscape-font-specification:'C64 Pro Mono';fill:#ffffff">▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓</tspan></tspan></text><text
xml:space="preserve"
id="text1971"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'C64 Pro Mono';-inkscape-font-specification:'C64 Pro Mono';letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect1973);fill:#ffffff;fill-opacity:1;stroke:none;"
transform="rotate(84.654565,410.00445,730.07147)"
inkscape:transform-center-x="19.984003"
inkscape:transform-center-y="-256.08188"><tspan
x="-4.4433594"
y="647.35742"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;font-family:'C64 Pro Mono';-inkscape-font-specification:'C64 Pro Mono';fill:#ffffff">▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓</tspan></tspan></text><text
xml:space="preserve"
id="text1977"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'C64 Pro Mono';-inkscape-font-specification:'C64 Pro Mono';letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect1979);fill:#ffffff;fill-opacity:1;stroke:none;"
transform="rotate(89.818036,418.4724,730.15406)"
inkscape:transform-center-x="-3.1438634"
inkscape:transform-center-y="-256.84121"><tspan
x="-4.4433594"
y="647.35742"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;font-family:'C64 Pro Mono';-inkscape-font-specification:'C64 Pro Mono';fill:#ffffff">▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓</tspan></tspan></text></g></svg>

Before

Width:  |  Height:  |  Size: 27 KiB

View file

@ -12,6 +12,9 @@ var adirs_3 = props.globals.getNode("/instrumentation/efis[0]/nd/ir-3", 1);
var vhdg_bug = props.globals.getNode("/it-autoflight/input/hdg",0); # ND compass position deg
var terrain_visible = props.globals.getNode("/custom/terrain/visible", 0);
var terrain_minalt = props.globals.getNode("/custom/terrain/min-altitude", 0);
var terrain_maxalt = props.globals.getNode("/custom/terrain/max-altitude", -9999);
canvas.NDStyles["Airbus"] = {
font_mapper: func(family, weight) {
@ -86,23 +89,22 @@ canvas.NDStyles["Airbus"] = {
layers: [
{
name:"TERRAIN",
isMapStructure:1,
always_update: 1,
update_on:[ {rate_hz: 0.4}, "toggle_range","toggle_display_mode","toggle_terrain"],
isMapStructure: 1,
update_on:[ {rate_hz: 18}, "toggle_range","toggle_display_mode","toggle_terrain"],
predicate: func(nd, layer) {
#print("TERRAIN TOGGLE: " ~ nd.get_switch("toggle_terrain"));
var visible = nd.get_switch("toggle_terrain") and
nd.get_switch("toggle_display_mode") != "PLAN" and (nd.rangeNm() <= 40) and !nd.get_switch("toggle_centered") and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting));
layer.group.setVisible(visible);
nd.get_switch("toggle_display_mode") != "PLAN" and (nd.rangeNm() <= 40) and !nd.get_switch("toggle_centered") and
(nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting));
layer.group.setVisible(visible);
if (visible) {
layer.update();
} else {
#terrain_visible.setValue(0);
}
}, # end of layer update predicate
options: {
viewport_radius: 670, #512, #706,
#position_callback: func(nd, pos){
# pos = me.startpos;
#}
},
"z-index": -100,
},
@ -1980,6 +1982,26 @@ canvas.NDStyles["Airbus"] = {
nd.symbols.offsetLbl.hide();
}
}
},
{
id: "terrGroup",
impl: {
init: func(nd,symbol),
predicate: func(nd) ( nd.get_switch("toggle_terrain") and
nd.get_switch("toggle_display_mode") != "PLAN" and (nd.rangeNm() <= 40) and !nd.get_switch("toggle_centered") and
(nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting)) ),
is_true: func(nd){
if (terrain_maxalt.getValue() != -9999) {
nd.symbols.terrLO.setText(sprintf("%03d",int(terrain_minalt.getValue()/100)));
nd.symbols.terrHI.setText(sprintf("%03d",int(terrain_maxalt.getValue()/100)));
nd.symbols.terrGroup.show();
terrain_maxalt.setValue(-9999); #update visual once at radar cycle
}
},
is_false: func(nd){
nd.symbols.terrGroup.hide();
}
}
}
], # end of vector with features