From 34b957e63b21f9a70cfdbc0b5011c9b5aa252ca1 Mon Sep 17 00:00:00 2001 From: Gijs de Rooy Date: Mon, 30 Nov 2015 13:29:44 +0100 Subject: [PATCH] Navdisplay: add position trend vector to MAP --- Nasal/canvas/map/Images/boeingND.svg | 268 +++++++++++++-------------- Nasal/canvas/map/navdisplay.styles | 36 ++++ 2 files changed, 161 insertions(+), 143 deletions(-) diff --git a/Nasal/canvas/map/Images/boeingND.svg b/Nasal/canvas/map/Images/boeingND.svg index 27fade721..54db88280 100644 --- a/Nasal/canvas/map/Images/boeingND.svg +++ b/Nasal/canvas/map/Images/boeingND.svg @@ -9,8 +9,8 @@ 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="boeingND_tcn.svg" - inkscape:version="0.48.4 r9939" + sodipodi:docname="boeingND.svg" + inkscape:version="0.91 r13725" xml:space="preserve" id="svg5180" height="1024" @@ -24,15 +24,15 @@ guidetolerance="10" inkscape:pageopacity="1" inkscape:pageshadow="2" - inkscape:window-width="1280" - inkscape:window-height="948" + inkscape:window-width="1366" + inkscape:window-height="716" id="namedview102" showgrid="false" - inkscape:zoom="0.35355313" - inkscape:cx="10.267885" - inkscape:cy="105.47714" - inkscape:window-x="0" - inkscape:window-y="24" + inkscape:zoom="2" + inkscape:cx="438.933" + inkscape:cy="254.802" + inkscape:window-x="-8" + inkscape:window-y="-8" inkscape:window-maximized="1" inkscape:current-layer="layer3" inkscape:object-nodes="true" @@ -1031,13 +1031,19 @@ id="tspan4072" sodipodi:role="line" style="font-size:32px;fill:#ff7f00;fill-opacity:1">ABC -3 CRS 999 99 E S 99 0.2) { + var radius = abs(nd.aircraft_source.get_gnd_spd()*nd.aircraft_source.get_gnd_spd()/(68578.83369*math.tan(rollDeg*D2R))); + var sec = 90; + if (nd.rangeNm() == 10) sec = 30; + elsif (nd.rangeNm() == 20) sec = 60; + var L = nd.aircraft_source.get_gnd_spd()*0.0002778*sec; + var angle = L/radius; + var factor = 346/(0.5*nd.rangeNm()); + radius = radius*factor; + var y = radius*math.sin(angle); + var x = (1-math.cos(angle))*radius; + if (rollDeg < 0) { + x = -x; + var cmd = 21; + } else var cmd = 19; + var y1 = 824; + if (nd.get_switch('toggle_centered')) y1 = 562; + nd.symbols.trendVector.setData([2,cmd],[512,y1,radius,radius,0,x,-y]); + var dash = L*factor; + var dashArray = [dash/3-3, 5]; + if (nd.rangeNm() == 10) dashArray = [dash]; + elsif (nd.rangeNm() == 20) dashArray = [dash/2-2, 5]; + nd.symbols.trendVector.setStrokeDashArray(dashArray); + } + }, + is_false: func(nd) nd.symbols.trendVector.hide(), + }, + }, { id:'vorL', impl: {