Navdisplay: issue #1822, display altitude range arc on centered mode
This commit is contained in:
parent
77abdbe7e8
commit
48fe7a838e
2 changed files with 8 additions and 15 deletions
|
@ -29,12 +29,12 @@
|
|||
id="namedview102"
|
||||
showgrid="false"
|
||||
inkscape:zoom="2"
|
||||
inkscape:cx="438.933"
|
||||
inkscape:cy="254.802"
|
||||
inkscape:cx="412.842"
|
||||
inkscape:cy="400.044"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="layer3"
|
||||
inkscape:current-layer="layer4"
|
||||
inkscape:object-nodes="true"
|
||||
inkscape:snap-smooth-nodes="true"
|
||||
inkscape:snap-object-midpoints="true"
|
||||
|
@ -1452,14 +1452,7 @@
|
|||
inkscape:connector-curvature="0"
|
||||
d="m 497,824.388 30,0 M 512.176,909.33 511.823,764.837 M 497,295.193 l 30,0 m -14.824,-84.942 -0.353,144.493"
|
||||
style="display:inline;fill:#ff0000;fill-opacity:1;stroke:#ededed;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="path3998" /><path
|
||||
inkscape:transform-center-y="19.8725"
|
||||
inkscape:label="#path3888-1"
|
||||
style="display:inline;fill:none;stroke:#00ff00;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
||||
d="m 350.959,598.552 c 0,0 72.1,-39.455 161.041,-39.455 88.942,0 161.041,39.455 161.041,39.455 l 0,0"
|
||||
id="altArcCtr"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cscc" /></g><g
|
||||
id="path3998" /></g><g
|
||||
inkscape:transform-center-x="-0.198874"
|
||||
inkscape:transform-center-y="3.80786"
|
||||
inkscape:label="#g4072"
|
||||
|
@ -1702,7 +1695,7 @@
|
|||
<path
|
||||
sodipodi:nodetypes="cscc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path3442"
|
||||
id="altArcCtr"
|
||||
d="m 350.959,598.552 c 0,0 72.1,-39.455 161.041,-39.455 88.942,0 161.041,39.455 161.041,39.455 l 0,0"
|
||||
style="display:inline;fill:none;stroke:#00ff00;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
||||
inkscape:label="#path3888-1"
|
||||
|
|
Before Width: | Height: | Size: 125 KiB After Width: | Height: | Size: 124 KiB |
|
@ -643,7 +643,7 @@ var NDStyles = {
|
|||
predicate: func(nd) (!nd.get_switch('toggle_centered') and nd.in_mode('toggle_display_mode', ['MAP'])),
|
||||
is_true: func(nd) {
|
||||
var altDiff = (getprop("autopilot/settings/target-altitude-ft") or 0)-(getprop("instrumentation/altimeter/indicated-altitude-ft") or 0);
|
||||
if (abs(altDiff) > 50 and altDiff/nd.aircraft_source.get_vspd() > 0) {
|
||||
if (abs(nd.aircraft_source.get_vspd()) > 1 and altDiff/nd.aircraft_source.get_vspd() > 0) {
|
||||
var altRangeNm = altDiff/nd.aircraft_source.get_vspd()*nd.aircraft_source.get_gnd_spd()*KT2MPS*M2NM;
|
||||
if(altRangeNm > 1) {
|
||||
var altRangePx = (350/nd.rangeNm())*altRangeNm;
|
||||
|
@ -665,10 +665,10 @@ var NDStyles = {
|
|||
predicate: func(nd) (nd.get_switch('toggle_centered') and nd.in_mode('toggle_display_mode', ['MAP'])),
|
||||
is_true: func(nd) {
|
||||
var altDiff = (getprop("autopilot/settings/target-altitude-ft") or 0)-(getprop("instrumentation/altimeter/indicated-altitude-ft") or 0);
|
||||
if (abs(altDiff) > 50 and altDiff/nd.aircraft_source.get_vspd() > 0) {
|
||||
if (abs(nd.aircraft_source.get_vspd()) > 1 and altDiff/nd.aircraft_source.get_vspd() > 0) {
|
||||
var altRangeNm = altDiff/nd.aircraft_source.get_vspd()*nd.aircraft_source.get_gnd_spd()*KT2MPS*M2NM;
|
||||
if(altRangeNm > 1) {
|
||||
var altRangePx = (175/nd.rangeNm())*altRangeNm;
|
||||
var altRangePx = (350/nd.rangeNm())*altRangeNm;
|
||||
if (altRangePx > 350)
|
||||
altRangePx = 350;
|
||||
nd.symbols.altArcCtr.setTranslation(0,-altRangePx);
|
||||
|
|
Loading…
Add table
Reference in a new issue