FG1000 - PFD Flightplan and improved GroupElement
This commit is contained in:
parent
82417eb962
commit
60352375d0
8 changed files with 757 additions and 158 deletions
|
@ -23,9 +23,9 @@
|
||||||
borderopacity="0"
|
borderopacity="0"
|
||||||
inkscape:pageopacity="0.0"
|
inkscape:pageopacity="0.0"
|
||||||
inkscape:pageshadow="2"
|
inkscape:pageshadow="2"
|
||||||
inkscape:zoom="3.2473958"
|
inkscape:zoom="2.2962556"
|
||||||
inkscape:cx="817.98224"
|
inkscape:cx="913.04869"
|
||||||
inkscape:cy="351.10971"
|
inkscape:cy="547.52243"
|
||||||
inkscape:document-units="px"
|
inkscape:document-units="px"
|
||||||
inkscape:current-layer="DirectToGroup"
|
inkscape:current-layer="DirectToGroup"
|
||||||
showgrid="true"
|
showgrid="true"
|
||||||
|
@ -89,7 +89,7 @@
|
||||||
style="opacity:1;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
|
style="opacity:1;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
|
||||||
</g>
|
</g>
|
||||||
<path
|
<path
|
||||||
style="opacity:1;fill:#4b4b4b;fill-opacity:1;fill-rule:nonzero;stroke:#ffffff;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
style="opacity:1;fill:#181818;fill-opacity:1;fill-rule:nonzero;stroke:#ffffff;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
||||||
d="m 698.99609,58.498047 0,684.503903 325.00391,0 0,-684.503903 -325.00391,0 z M 705.5,279.93359 l 314.4277,0 0,322.2793 -314.4277,0 0,-322.2793 z"
|
d="m 698.99609,58.498047 0,684.503903 325.00391,0 0,-684.503903 -325.00391,0 z M 705.5,279.93359 l 314.4277,0 0,322.2793 -314.4277,0 0,-322.2793 z"
|
||||||
id="rect4230"
|
id="rect4230"
|
||||||
inkscape:connector-curvature="0" />
|
inkscape:connector-curvature="0" />
|
||||||
|
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 42 KiB |
443
Aircraft/Instruments-3d/FG1000/MFDPages/FlightPlanPFD.svg
Normal file
443
Aircraft/Instruments-3d/FG1000/MFDPages/FlightPlanPFD.svg
Normal file
|
@ -0,0 +1,443 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<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"
|
||||||
|
width="1024px"
|
||||||
|
height="768px"
|
||||||
|
viewBox="0 0 1024 768"
|
||||||
|
version="1.1"
|
||||||
|
id="SVGRoot"
|
||||||
|
inkscape:version="0.91 r13725"
|
||||||
|
sodipodi:docname="FlightPlanPFD.svg">
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#ffffff"
|
||||||
|
borderopacity="0"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="6.4947916"
|
||||||
|
inkscape:cx="924.63427"
|
||||||
|
inkscape:cy="149.93595"
|
||||||
|
inkscape:document-units="px"
|
||||||
|
inkscape:current-layer="PFDInstrumentsFlightPlanGroup"
|
||||||
|
showgrid="true"
|
||||||
|
inkscape:window-width="2495"
|
||||||
|
inkscape:window-height="1416"
|
||||||
|
inkscape:window-x="65"
|
||||||
|
inkscape:window-y="24"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:snap-global="true"
|
||||||
|
inkscape:snap-grids="true"
|
||||||
|
inkscape:snap-bbox="true"
|
||||||
|
inkscape:snap-others="true"
|
||||||
|
inkscape:snap-to-guides="true"
|
||||||
|
inkscape:bbox-paths="false"
|
||||||
|
inkscape:snap-nodes="true"
|
||||||
|
inkscape:snap-page="true"
|
||||||
|
inkscape:bbox-nodes="true">
|
||||||
|
<inkscape:grid
|
||||||
|
type="xygrid"
|
||||||
|
id="grid4269" />
|
||||||
|
</sodipodi:namedview>
|
||||||
|
<defs
|
||||||
|
id="defs7962" />
|
||||||
|
<metadata
|
||||||
|
id="metadata7965">
|
||||||
|
<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 />
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer3"
|
||||||
|
inkscape:label="DirectToGroup">
|
||||||
|
<flowRoot
|
||||||
|
xml:space="preserve"
|
||||||
|
id="flowRoot4639"
|
||||||
|
style="fill:black;stroke:none;stroke-opacity:1;stroke-width:1px;stroke-linejoin:miter;stroke-linecap:butt;fill-opacity:1;font-family:Sans;font-style:normal;font-weight:normal;font-size:20px;line-height:125%;letter-spacing:0px;word-spacing:0px;-inkscape-font-specification:Sans;font-stretch:normal;font-variant:normal;text-anchor:start;text-align:start;writing-mode:lr"><flowRegion
|
||||||
|
id="flowRegion4641"><rect
|
||||||
|
id="rect4643"
|
||||||
|
width="330"
|
||||||
|
height="50"
|
||||||
|
x="695"
|
||||||
|
y="583" /></flowRegion><flowPara
|
||||||
|
id="flowPara4645" /></flowRoot> <g
|
||||||
|
id="PFDInstrumentsFlightPlanGroup"
|
||||||
|
inkscape:label="#g4725"
|
||||||
|
transform="translate(-7.55824,-21.00195)">
|
||||||
|
<path
|
||||||
|
style="opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#ffffff;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
||||||
|
d="m 728.55824,510.55258 0,218.90005 295.44176,0 0,-218.90005 z"
|
||||||
|
id="rect4230"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="ccccc" />
|
||||||
|
<text
|
||||||
|
sodipodi:linespacing="125%"
|
||||||
|
id="PFDInstrumentsFlightPlanName"
|
||||||
|
y="552.80469"
|
||||||
|
x="771.37695"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20px;line-height:125%;font-family:Sans;-inkscape-font-specification:'Sans, Normal';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#80ffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
xml:space="preserve"
|
||||||
|
inkscape:label="#text4170"><tspan
|
||||||
|
sodipodi:role="line"
|
||||||
|
id="tspan4394"
|
||||||
|
x="771.37695"
|
||||||
|
y="552.80469">FLIGHT PLAN NAME</tspan></text>
|
||||||
|
<text
|
||||||
|
xml:space="preserve"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:15px;line-height:125%;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans, Normal';text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke:#fffcfa;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
x="876.27911"
|
||||||
|
y="527.35352"
|
||||||
|
id="text3449"
|
||||||
|
sodipodi:linespacing="125%"><tspan
|
||||||
|
sodipodi:role="line"
|
||||||
|
id="tspan4392"
|
||||||
|
x="876.27911"
|
||||||
|
y="527.35352">FLIGHT PLAN</tspan></text>
|
||||||
|
<text
|
||||||
|
inkscape:label="#text4166"
|
||||||
|
sodipodi:linespacing="125%"
|
||||||
|
id="text3565"
|
||||||
|
y="578.64453"
|
||||||
|
x="963.65234"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:condensed;font-size:20px;line-height:125%;font-family:'Liberation Sans Narrow';-inkscape-font-specification:'Liberation Sans Narrow Condensed';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
xml:space="preserve"><tspan
|
||||||
|
y="578.64453"
|
||||||
|
x="963.65234"
|
||||||
|
id="tspan3567"
|
||||||
|
sodipodi:role="line">DIS</tspan></text>
|
||||||
|
<text
|
||||||
|
inkscape:label="#text4166"
|
||||||
|
sodipodi:linespacing="125%"
|
||||||
|
id="text58395"
|
||||||
|
y="578.83984"
|
||||||
|
x="886.40588"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20px;line-height:125%;font-family:Sans;-inkscape-font-specification:'Sans, Normal';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
xml:space="preserve"><tspan
|
||||||
|
sodipodi:role="line"
|
||||||
|
id="tspan4424"
|
||||||
|
x="886.40588"
|
||||||
|
y="578.83984">DTK</tspan></text>
|
||||||
|
<path
|
||||||
|
style="fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m 735,533 280,0"
|
||||||
|
id="path58399"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<path
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path58401"
|
||||||
|
d="m 735,558.5 280,0"
|
||||||
|
style="fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
|
||||||
|
<rect
|
||||||
|
style="opacity:1;fill:#c0c0c0;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
||||||
|
id="PFDInstrumentsFlightPlanScrollTrough"
|
||||||
|
width="4.718811"
|
||||||
|
height="150"
|
||||||
|
x="1012.5582"
|
||||||
|
y="569.00195"
|
||||||
|
inkscape:label="#rect4267" />
|
||||||
|
<rect
|
||||||
|
y="569.00195"
|
||||||
|
x="1012.5582"
|
||||||
|
height="30"
|
||||||
|
width="5"
|
||||||
|
id="PFDInstrumentsFlightPlanScrollThumb"
|
||||||
|
style="opacity:1;fill:#808080;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
||||||
|
inkscape:label="#rect4269" />
|
||||||
|
<text
|
||||||
|
sodipodi:linespacing="125%"
|
||||||
|
id="PFDInstrumentsFlightPlanID0"
|
||||||
|
y="602.58008"
|
||||||
|
x="757.28516"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20px;line-height:125%;font-family:Sans;-inkscape-font-specification:'Sans, Normal';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#80ffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
xml:space="preserve"
|
||||||
|
inkscape:label="#text4170"><tspan
|
||||||
|
sodipodi:role="line"
|
||||||
|
id="tspan4444"
|
||||||
|
x="757.28516"
|
||||||
|
y="602.58008">WP1</tspan></text>
|
||||||
|
<text
|
||||||
|
inkscape:label="#text4170"
|
||||||
|
xml:space="preserve"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20px;line-height:125%;font-family:Sans;-inkscape-font-specification:'Sans, Normal';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
x="826.5849"
|
||||||
|
y="602.04297"
|
||||||
|
id="PFDInstrumentsFlightPlanType0"
|
||||||
|
sodipodi:linespacing="125%"><tspan
|
||||||
|
y="602.04297"
|
||||||
|
x="826.5849"
|
||||||
|
id="tspan4485"
|
||||||
|
sodipodi:role="line">type</tspan></text>
|
||||||
|
<text
|
||||||
|
inkscape:label="#text4170"
|
||||||
|
xml:space="preserve"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20px;line-height:125%;font-family:Sans;-inkscape-font-specification:'Sans, Normal';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#80ffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
x="889.84338"
|
||||||
|
y="602.58008"
|
||||||
|
id="PFDInstrumentsFlightPlanDTK0"
|
||||||
|
sodipodi:linespacing="125%"><tspan
|
||||||
|
y="602.58008"
|
||||||
|
x="889.84338"
|
||||||
|
id="tspan4489"
|
||||||
|
sodipodi:role="line">WP1</tspan></text>
|
||||||
|
<text
|
||||||
|
sodipodi:linespacing="125%"
|
||||||
|
id="PFDInstrumentsFlightPlanDIS0"
|
||||||
|
y="602.58008"
|
||||||
|
x="1001.8555"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20px;line-height:125%;font-family:Sans;-inkscape-font-specification:'Sans, Normal';text-align:end;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:end;fill:#80ffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
xml:space="preserve"
|
||||||
|
inkscape:label="#text4170"><tspan
|
||||||
|
sodipodi:role="line"
|
||||||
|
id="tspan4493"
|
||||||
|
x="1001.8555"
|
||||||
|
y="602.58008">WP1</tspan></text>
|
||||||
|
<text
|
||||||
|
inkscape:label="#text4170"
|
||||||
|
xml:space="preserve"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20px;line-height:125%;font-family:Sans;-inkscape-font-specification:'Sans, Normal';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#80ffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
x="759.33594"
|
||||||
|
y="628.93506"
|
||||||
|
id="PFDInstrumentsFlightPlanID1"
|
||||||
|
sodipodi:linespacing="125%"><tspan
|
||||||
|
y="628.93506"
|
||||||
|
x="759.33594"
|
||||||
|
id="tspan4649"
|
||||||
|
sodipodi:role="line">WP1</tspan></text>
|
||||||
|
<text
|
||||||
|
sodipodi:linespacing="125%"
|
||||||
|
id="PFDInstrumentsFlightPlanType1"
|
||||||
|
y="628.39795"
|
||||||
|
x="828.63568"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20px;line-height:125%;font-family:Sans;-inkscape-font-specification:'Sans, Normal';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
xml:space="preserve"
|
||||||
|
inkscape:label="#text4170"><tspan
|
||||||
|
sodipodi:role="line"
|
||||||
|
id="tspan4653"
|
||||||
|
x="828.63568"
|
||||||
|
y="628.39795">type</tspan></text>
|
||||||
|
<text
|
||||||
|
sodipodi:linespacing="125%"
|
||||||
|
id="PFDInstrumentsFlightPlanDTK1"
|
||||||
|
y="628.93506"
|
||||||
|
x="891.89417"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20px;line-height:125%;font-family:Sans;-inkscape-font-specification:'Sans, Normal';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#80ffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
xml:space="preserve"
|
||||||
|
inkscape:label="#text4170"><tspan
|
||||||
|
sodipodi:role="line"
|
||||||
|
id="tspan4657"
|
||||||
|
x="891.89417"
|
||||||
|
y="628.93506">WP1</tspan></text>
|
||||||
|
<text
|
||||||
|
inkscape:label="#text4170"
|
||||||
|
xml:space="preserve"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20px;line-height:125%;font-family:Sans;-inkscape-font-specification:'Sans, Normal';text-align:end;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:end;fill:#80ffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
x="1003.9063"
|
||||||
|
y="628.93506"
|
||||||
|
id="PFDInstrumentsFlightPlanDIS1"
|
||||||
|
sodipodi:linespacing="125%"><tspan
|
||||||
|
y="628.93506"
|
||||||
|
x="1003.9063"
|
||||||
|
id="tspan4661"
|
||||||
|
sodipodi:role="line">WP1</tspan></text>
|
||||||
|
<text
|
||||||
|
sodipodi:linespacing="125%"
|
||||||
|
id="PFDInstrumentsFlightPlanID2"
|
||||||
|
y="655.29004"
|
||||||
|
x="759.33594"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20px;line-height:125%;font-family:Sans;-inkscape-font-specification:'Sans, Normal';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#80ffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
xml:space="preserve"
|
||||||
|
inkscape:label="#text4170"><tspan
|
||||||
|
sodipodi:role="line"
|
||||||
|
id="tspan4665"
|
||||||
|
x="759.33594"
|
||||||
|
y="655.29004">WP1</tspan></text>
|
||||||
|
<text
|
||||||
|
inkscape:label="#text4170"
|
||||||
|
xml:space="preserve"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20px;line-height:125%;font-family:Sans;-inkscape-font-specification:'Sans, Normal';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
x="828.63568"
|
||||||
|
y="654.75293"
|
||||||
|
id="PFDInstrumentsFlightPlanType2"
|
||||||
|
sodipodi:linespacing="125%"><tspan
|
||||||
|
y="654.75293"
|
||||||
|
x="828.63568"
|
||||||
|
id="tspan4669"
|
||||||
|
sodipodi:role="line">type</tspan></text>
|
||||||
|
<text
|
||||||
|
inkscape:label="#text4170"
|
||||||
|
xml:space="preserve"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20px;line-height:125%;font-family:Sans;-inkscape-font-specification:'Sans, Normal';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#80ffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
x="891.89417"
|
||||||
|
y="655.29004"
|
||||||
|
id="PFDInstrumentsFlightPlanDTK2"
|
||||||
|
sodipodi:linespacing="125%"><tspan
|
||||||
|
y="655.29004"
|
||||||
|
x="891.89417"
|
||||||
|
id="tspan4673"
|
||||||
|
sodipodi:role="line">WP1</tspan></text>
|
||||||
|
<text
|
||||||
|
sodipodi:linespacing="125%"
|
||||||
|
id="PFDInstrumentsFlightPlanDIS2"
|
||||||
|
y="655.29004"
|
||||||
|
x="1003.9063"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20px;line-height:125%;font-family:Sans;-inkscape-font-specification:'Sans, Normal';text-align:end;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:end;fill:#80ffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
xml:space="preserve"
|
||||||
|
inkscape:label="#text4170"><tspan
|
||||||
|
sodipodi:role="line"
|
||||||
|
id="tspan4677"
|
||||||
|
x="1003.9063"
|
||||||
|
y="655.29004">WP1</tspan></text>
|
||||||
|
<text
|
||||||
|
inkscape:label="#text4170"
|
||||||
|
xml:space="preserve"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20px;line-height:125%;font-family:Sans;-inkscape-font-specification:'Sans, Normal';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#80ffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
x="759.33594"
|
||||||
|
y="681.64502"
|
||||||
|
id="PFDInstrumentsFlightPlanID3"
|
||||||
|
sodipodi:linespacing="125%"><tspan
|
||||||
|
y="681.64502"
|
||||||
|
x="759.33594"
|
||||||
|
id="tspan4681"
|
||||||
|
sodipodi:role="line">WP1</tspan></text>
|
||||||
|
<text
|
||||||
|
sodipodi:linespacing="125%"
|
||||||
|
id="PFDInstrumentsFlightPlanType3"
|
||||||
|
y="681.10791"
|
||||||
|
x="828.63568"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20px;line-height:125%;font-family:Sans;-inkscape-font-specification:'Sans, Normal';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
xml:space="preserve"
|
||||||
|
inkscape:label="#text4170"><tspan
|
||||||
|
sodipodi:role="line"
|
||||||
|
id="tspan4685"
|
||||||
|
x="828.63568"
|
||||||
|
y="681.10791">type</tspan></text>
|
||||||
|
<text
|
||||||
|
sodipodi:linespacing="125%"
|
||||||
|
id="PFDInstrumentsFlightPlanDTK3"
|
||||||
|
y="681.64502"
|
||||||
|
x="891.89417"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20px;line-height:125%;font-family:Sans;-inkscape-font-specification:'Sans, Normal';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#80ffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
xml:space="preserve"
|
||||||
|
inkscape:label="#text4170"><tspan
|
||||||
|
sodipodi:role="line"
|
||||||
|
id="tspan4689"
|
||||||
|
x="891.89417"
|
||||||
|
y="681.64502">WP1</tspan></text>
|
||||||
|
<text
|
||||||
|
inkscape:label="#text4170"
|
||||||
|
xml:space="preserve"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20px;line-height:125%;font-family:Sans;-inkscape-font-specification:'Sans, Normal';text-align:end;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:end;fill:#80ffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
x="1003.9063"
|
||||||
|
y="681.64502"
|
||||||
|
id="PFDInstrumentsFlightPlanDIS3"
|
||||||
|
sodipodi:linespacing="125%"><tspan
|
||||||
|
y="681.64502"
|
||||||
|
x="1003.9063"
|
||||||
|
id="tspan4693"
|
||||||
|
sodipodi:role="line">WP1</tspan></text>
|
||||||
|
<text
|
||||||
|
sodipodi:linespacing="125%"
|
||||||
|
id="PFDInstrumentsFlightPlanID4"
|
||||||
|
y="708"
|
||||||
|
x="759.33594"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20px;line-height:125%;font-family:Sans;-inkscape-font-specification:'Sans, Normal';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#80ffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
xml:space="preserve"
|
||||||
|
inkscape:label="#text4170"><tspan
|
||||||
|
sodipodi:role="line"
|
||||||
|
id="tspan4697"
|
||||||
|
x="759.33594"
|
||||||
|
y="708">WP1</tspan></text>
|
||||||
|
<text
|
||||||
|
inkscape:label="#text4170"
|
||||||
|
xml:space="preserve"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20px;line-height:125%;font-family:Sans;-inkscape-font-specification:'Sans, Normal';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
x="828.63568"
|
||||||
|
y="707.46289"
|
||||||
|
id="PFDInstrumentsFlightPlanType4"
|
||||||
|
sodipodi:linespacing="125%"><tspan
|
||||||
|
y="707.46289"
|
||||||
|
x="828.63568"
|
||||||
|
id="tspan4701"
|
||||||
|
sodipodi:role="line">type</tspan></text>
|
||||||
|
<text
|
||||||
|
inkscape:label="#text4170"
|
||||||
|
xml:space="preserve"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20px;line-height:125%;font-family:Sans;-inkscape-font-specification:'Sans, Normal';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#80ffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
x="891.89417"
|
||||||
|
y="708"
|
||||||
|
id="PFDInstrumentsFlightPlanDTK4"
|
||||||
|
sodipodi:linespacing="125%"><tspan
|
||||||
|
y="708"
|
||||||
|
x="891.89417"
|
||||||
|
id="tspan4705"
|
||||||
|
sodipodi:role="line">WP1</tspan></text>
|
||||||
|
<text
|
||||||
|
sodipodi:linespacing="125%"
|
||||||
|
id="PFDInstrumentsFlightPlanDIS4"
|
||||||
|
y="708"
|
||||||
|
x="1003.9063"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20px;line-height:125%;font-family:Sans;-inkscape-font-specification:'Sans, Normal';text-align:end;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:end;fill:#80ffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
xml:space="preserve"
|
||||||
|
inkscape:label="#text4170"><tspan
|
||||||
|
sodipodi:role="line"
|
||||||
|
id="tspan4709"
|
||||||
|
x="1003.9063"
|
||||||
|
y="708">WP1</tspan></text>
|
||||||
|
<path
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path4713"
|
||||||
|
d="m 755,593 -5,5"
|
||||||
|
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
|
||||||
|
<path
|
||||||
|
inkscape:label="#path4715"
|
||||||
|
sodipodi:nodetypes="cccccccccccccccc"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="PFDInstrumentsFlightPlanArrow1"
|
||||||
|
d="m 753.96071,593 -12.88292,0.0385 -5.07699,5.03849 0.11548,20.88533 L 740,623 l 9.11468,0 0,3 5,-5 -4.84603,-4.72975 -0.077,2.73055 -6.23175,2e-5 -2.99841,-2.9984 0.077,-16.00481 3.07538,-2.9214 10.84684,-3e-5 0,-4.07618"
|
||||||
|
style="fill:#ff00ff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
|
||||||
|
<path
|
||||||
|
style="fill:#ff00ff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m 754.84603,568 -12.88292,0.0385 -5.07699,5.03849 0.11548,20.88533 3.88372,4.03768 9.11468,0 0,3 5,-5 -4.84603,-4.72975 -0.077,2.73055 -6.23175,2e-5 -2.99841,-2.9984 0.077,-16.00481 3.07538,-2.9214 10.84684,-3e-5 0,-4.07618"
|
||||||
|
id="PFDInstrumentsFlightPlanArrow0"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cccccccccccccccc"
|
||||||
|
inkscape:label="#path4715" />
|
||||||
|
<path
|
||||||
|
style="fill:#ff00ff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m 753.96071,620 -12.88292,0.0385 -5.07699,5.03849 0.11548,20.88533 L 740,650 l 9.11468,0 0,3 5,-5 -4.84603,-4.72975 -0.077,2.73055 -6.23175,2e-5 -2.99841,-2.9984 0.077,-16.00481 3.07538,-2.9214 10.84684,-3e-5 0,-4.07618"
|
||||||
|
id="PFDInstrumentsFlightPlanArrow2"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cccccccccccccccc"
|
||||||
|
inkscape:label="#path4715" />
|
||||||
|
<path
|
||||||
|
inkscape:label="#path4715"
|
||||||
|
sodipodi:nodetypes="cccccccccccccccc"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="PFDInstrumentsFlightPlanArrow3"
|
||||||
|
d="m 753.96071,647 -12.88292,0.0385 -5.07699,5.03849 0.11548,20.88533 L 740,677 l 9.11468,0 0,3 5,-5 -4.84603,-4.72975 -0.077,2.73055 -6.23175,2e-5 -2.99841,-2.9984 0.077,-16.00481 3.07538,-2.9214 10.84684,-3e-5 0,-4.07618"
|
||||||
|
style="fill:#ff00ff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
|
||||||
|
<path
|
||||||
|
style="fill:#ff00ff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m 753.96071,674 -12.88292,0.0385 -5.07699,5.03849 0.11548,20.88533 L 740,704 l 9.11468,0 0,3 5,-5 -4.84603,-4.72975 -0.077,2.73055 -6.23175,2e-5 -2.99841,-2.9984 0.077,-16.00481 3.07538,-2.9214 10.84684,-3e-5 0,-4.07618"
|
||||||
|
id="PFDInstrumentsFlightPlanArrow4"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cccccccccccccccc"
|
||||||
|
inkscape:label="#path4715" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 24 KiB |
|
@ -22,84 +22,109 @@ var GenericFMSPublisher =
|
||||||
var obj = {
|
var obj = {
|
||||||
parents : [
|
parents : [
|
||||||
GenericFMSPublisher,
|
GenericFMSPublisher,
|
||||||
PeriodicPropertyPublisher.new(notifications.PFDEventNotification.FMSData, frequency)
|
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
obj.addPropMap("FMSHeadingBug", "/autopilot/settings/heading-bug-deg");
|
# We have two publishers here:
|
||||||
obj.addPropMap("FMSSelectedAlt", "/autopilot/settings/target-alt-ft");
|
#
|
||||||
|
# 1) a triggered publisher for properties that will change ocassionally, but which
|
||||||
|
# we need to update immediately. These are typically settings.
|
||||||
|
#
|
||||||
|
# 2) a periodic publisher which triggers every 0.5s to update data values.
|
||||||
|
obj._triggeredPublisher = TriggeredPropertyPublisher.new(notifications.PFDEventNotification.FMSData);
|
||||||
|
obj._periodicPublisher = PeriodicPropertyPublisher.new(notifications.PFDEventNotification.FMSData, frequency);
|
||||||
|
|
||||||
obj.addPropMap("FMSMode", "/instrumentation/gps/mode");
|
obj._triggeredPublisher.addPropMap("FMSHeadingBug", "/autopilot/settings/heading-bug-deg");
|
||||||
obj.addPropMap("FMSLegValid", "/instrumentation/gps/wp/wp[1]/valid");
|
obj._triggeredPublisher.addPropMap("FMSSelectedAlt", "/autopilot/settings/target-alt-ft");
|
||||||
obj.addPropMap("FMSPreviousLegID", "/instrumentation/gps/wp/wp[0]/ID");
|
obj._triggeredPublisher.addPropMap("FMSFlightPlanActive", "/autopilot/route-manager/active");
|
||||||
obj.addPropMap("FMSLegID", "/instrumentation/gps/wp/wp[1]/ID");
|
obj._triggeredPublisher.addPropMap("FMSFlightPlanCurrentWP", "/autopilot/route-manager/current-wp");
|
||||||
obj.addPropMap("FMSLegBearingMagDeg", "/instrumentation/gps/wp/wp[1]/bearing-mag-deg");
|
obj._triggeredPublisher.addPropMap("FMSFlightPlanSequenced", "/autopilot/route-manager/signals/sequenced");
|
||||||
obj.addPropMap("FMSLegDistanceNM", "/instrumentation/gps/wp/wp[1]/distance-nm");
|
obj._triggeredPublisher.addPropMap("FMSFlightPlanFinished", "/autopilot/route-manager/signals/finished");
|
||||||
obj.addPropMap("FMSLegCourseError", "/instrumentation/gps/wp/wp[1]/course-error-nm");
|
obj._triggeredPublisher.addPropMap("FMSFlightPlanEdited", "/autopilot/route-manager/signals/edited");
|
||||||
obj.addPropMap("FMSLegDesiredTrack", "/instrumentation/gps/wp/wp[1]/desired-course-deg");
|
|
||||||
obj.addPropMap("FMSLegTrackErrorAngle", "/instrumentation/gps/wp/wp[1]/course-deviation-deg");
|
|
||||||
obj.addPropMap("FMSWayPointCourseError", "/instrumentation/gps/wp/wp[1]/course-error-nm");
|
|
||||||
|
|
||||||
obj.addPropMap("FMSGroundspeed", "/instrumentation/gps/indicated-ground-speed-kt");
|
obj._triggeredPublisher.addPropMap("FMSMode", "/instrumentation/gps/mode");
|
||||||
|
|
||||||
obj.addPropMap("FMSNav1From", "/instrumentation/nav/from-flag");
|
obj._periodicPublisher.addPropMap("FMSLegValid", "/instrumentation/gps/wp/wp[1]/valid");
|
||||||
obj.addPropMap("FMSNav2From", "/instrumentation/nav[1]/from-flag");
|
obj._periodicPublisher.addPropMap("FMSPreviousLegID", "/instrumentation/gps/wp/wp[0]/ID");
|
||||||
|
obj._periodicPublisher.addPropMap("FMSLegID", "/instrumentation/gps/wp/wp[1]/ID");
|
||||||
|
obj._periodicPublisher.addPropMap("FMSLegBearingMagDeg", "/instrumentation/gps/wp/wp[1]/bearing-mag-deg");
|
||||||
|
obj._periodicPublisher.addPropMap("FMSLegDistanceNM", "/instrumentation/gps/wp/wp[1]/distance-nm");
|
||||||
|
obj._periodicPublisher.addPropMap("FMSLegCourseError", "/instrumentation/gps/wp/wp[1]/course-error-nm");
|
||||||
|
obj._periodicPublisher.addPropMap("FMSLegDesiredTrack", "/instrumentation/gps/wp/wp[1]/desired-course-deg");
|
||||||
|
obj._periodicPublisher.addPropMap("FMSLegTrackErrorAngle", "/instrumentation/gps/wp/wp[1]/course-deviation-deg");
|
||||||
|
obj._periodicPublisher.addPropMap("FMSWayPointCourseError", "/instrumentation/gps/wp/wp[1]/course-error-nm");
|
||||||
|
|
||||||
|
obj._periodicPublisher.addPropMap("FMSGroundspeed", "/instrumentation/gps/indicated-ground-speed-kt");
|
||||||
|
|
||||||
|
obj._periodicPublisher.addPropMap("FMSNav1From", "/instrumentation/nav/from-flag");
|
||||||
|
obj._periodicPublisher.addPropMap("FMSNav2From", "/instrumentation/nav[1]/from-flag");
|
||||||
|
|
||||||
|
# Custom publish method as we need to calculate some particular values manually.
|
||||||
|
obj._periodicPublisher.publish = func() {
|
||||||
|
var gpsdata = {};
|
||||||
|
|
||||||
|
foreach (var propmap; me._propmaps) {
|
||||||
|
var name = propmap.getName();
|
||||||
|
gpsdata[name] = propmap.getValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
# Some GPS properties have odd values to indicate that nothing is set, so
|
||||||
|
# remove them from the data set.
|
||||||
|
if (gpsdata["FMSLegBearingMagDeg"] == -9999) gpsdata["FMSLegBearingMagDeg"] = nil;
|
||||||
|
if (gpsdata["FMSLegDistanceNM"] == -1) gpsdata["FMSLegDistanceNM"] = nil;
|
||||||
|
|
||||||
|
# A couple of calculated values used by the MFD Header display
|
||||||
|
var total_fuel = getprop("/consumables/fuel/tank[0]/indicated-level-gal_us") or 0.0;
|
||||||
|
total_fuel = total_fuel + (getprop("/consumables/fuel/tank[1]/indicated-level-gal_us") or 0.0);
|
||||||
|
var fuel_flow = getprop("/engines/engine[0]/fuel-flow-gph") or 1.0;
|
||||||
|
gpsdata["FuelOnBoard"] = total_fuel;
|
||||||
|
gpsdata["EnduranceHrs"] = total_fuel / fuel_flow;
|
||||||
|
|
||||||
|
var plan = flightplan();
|
||||||
|
|
||||||
|
var dst = 0.0;
|
||||||
|
if (plan.getPlanSize() > 0) {
|
||||||
|
# Determine the distance to travel, based on
|
||||||
|
# - current distance to the next WP,
|
||||||
|
# - length of each subsequent leg.
|
||||||
|
dst = getprop("/instrumentation/gps/wp/wp[1]/distance-nm") or 0.0;
|
||||||
|
|
||||||
|
if (plan.indexOfWP(plan.currentWP()) < (plan.getPlanSize() -1)) {
|
||||||
|
for(var i=plan.indexOfWP(plan.currentWP()) + 1; i < plan.getPlanSize(); i = i+1) {
|
||||||
|
var leg = plan.getWP(i);
|
||||||
|
if (leg != nil ) dst = dst + leg.leg_distance;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
gpsdata["FMSDistance"] = dst;
|
||||||
|
var spd = getprop("/instrumentation/gps/indicated-ground-speed-kt") or 1.0;
|
||||||
|
var time_hrs = dst / spd;
|
||||||
|
|
||||||
|
gpsdata["FMSEstimatedTimeEnroute"] = time_hrs;
|
||||||
|
gpsdata["FMSFuelOverDestination"] = total_fuel - time_hrs * fuel_flow;
|
||||||
|
|
||||||
|
var notification = notifications.PFDEventNotification.new(
|
||||||
|
"MFD",
|
||||||
|
1,
|
||||||
|
notifications.PFDEventNotification.FMSData,
|
||||||
|
gpsdata);
|
||||||
|
|
||||||
|
me._transmitter.NotifyAll(notification);
|
||||||
|
};
|
||||||
|
|
||||||
return obj;
|
return obj;
|
||||||
},
|
},
|
||||||
|
|
||||||
# Custom publish method as we need to calculate some particular values manually.
|
start : func() {
|
||||||
publish : func() {
|
me._triggeredPublisher.start();
|
||||||
var gpsdata = {};
|
me._periodicPublisher.start();
|
||||||
|
|
||||||
foreach (var propmap; me._propmaps) {
|
|
||||||
var name = propmap.getName();
|
|
||||||
gpsdata[name] = propmap.getValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
# Some GPS properties have odd values to indicate that nothing is set, so
|
|
||||||
# remove them from the data set.
|
|
||||||
if (gpsdata["FMSLegBearingMagDeg"] == -9999) gpsdata["FMSLegBearingMagDeg"] = nil;
|
|
||||||
if (gpsdata["FMSLegDistanceNM"] == -1) gpsdata["FMSLegDistanceNM"] = nil;
|
|
||||||
|
|
||||||
# A couple of calculated values used by the MFD Header display
|
|
||||||
var total_fuel = getprop("/consumables/fuel/tank[0]/indicated-level-gal_us") or 0.0;
|
|
||||||
total_fuel = total_fuel + (getprop("/consumables/fuel/tank[1]/indicated-level-gal_us") or 0.0);
|
|
||||||
var fuel_flow = getprop("/engines/engine[0]/fuel-flow-gph") or 1.0;
|
|
||||||
gpsdata["FuelOnBoard"] = total_fuel;
|
|
||||||
gpsdata["EnduranceHrs"] = total_fuel / fuel_flow;
|
|
||||||
|
|
||||||
var plan = flightplan();
|
|
||||||
|
|
||||||
var dst = 0.0;
|
|
||||||
if (plan.getPlanSize() > 0) {
|
|
||||||
# Determine the distance to travel, based on
|
|
||||||
# - current distance to the next WP,
|
|
||||||
# - length of each subsequent leg.
|
|
||||||
dst = getprop("/instrumentation/gps/wp/wp[1]/distance-nm") or 0.0;
|
|
||||||
|
|
||||||
if (plan.indexOfWP(plan.currentWP()) < (plan.getPlanSize() -1)) {
|
|
||||||
for(var i=plan.indexOfWP(plan.currentWP()) + 1; i < plan.getPlanSize(); i = i+1) {
|
|
||||||
var leg = plan.getWP(i);
|
|
||||||
if (leg != nil ) dst = dst + leg.leg_distance;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
gpsdata["FMSDistance"] = dst;
|
|
||||||
var spd = getprop("/instrumentation/gps/indicated-ground-speed-kt") or 1.0;
|
|
||||||
var time_hrs = dst / spd;
|
|
||||||
|
|
||||||
gpsdata["FMSEstimatedTimeEnroute"] = time_hrs;
|
|
||||||
gpsdata["FMSFuelOverDestination"] = total_fuel - time_hrs * fuel_flow;
|
|
||||||
|
|
||||||
var notification = notifications.PFDEventNotification.new(
|
|
||||||
"MFD",
|
|
||||||
1,
|
|
||||||
notifications.PFDEventNotification.FMSData,
|
|
||||||
gpsdata);
|
|
||||||
|
|
||||||
me._transmitter.NotifyAll(notification);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
stop : func() {
|
||||||
|
me._triggeredPublisher.stop();
|
||||||
|
me._periodicPublisher.stop();
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -131,7 +131,7 @@ var TriggeredPropertyPublisher =
|
||||||
# Set up a listener triggering on create (to ensure all values are set at
|
# Set up a listener triggering on create (to ensure all values are set at
|
||||||
# start of day) and only on changed values. These are the last two
|
# start of day) and only on changed values. These are the last two
|
||||||
# arguments to the setlistener call.
|
# arguments to the setlistener call.
|
||||||
var listener = setlistener(prop, func(p) { me.publish(p); }, 1, 0);
|
var listener = setlistener(prop, func(p) { me.publish(p); }, 1, 1);
|
||||||
append(me._listeners, listener);
|
append(me._listeners, listener);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -81,7 +81,18 @@ var PFDInstruments =
|
||||||
obj._SVGGroup.setInt("z-index", 10);
|
obj._SVGGroup.setInt("z-index", 10);
|
||||||
obj.insetMap = fg1000.NavMap.new(obj, obj.getElement("PFD-Map-Display"), [119,601], "rect(-109px, 109px, 109px, -109px)", 0, 2);
|
obj.insetMap = fg1000.NavMap.new(obj, obj.getElement("PFD-Map-Display"), [119,601], "rect(-109px, 109px, 109px, -109px)", 0, 2);
|
||||||
|
|
||||||
#obj.topMenu(device, obj, nil);
|
# Flight Plan Window group
|
||||||
|
obj.flightplanList = PFD.GroupElement.new(
|
||||||
|
obj.pageName,
|
||||||
|
svg,
|
||||||
|
[ "FlightPlanArrow", "FlightPlanID", "FlightPlanType", "FlightPlanDTK", "FlightPlanDIS"],
|
||||||
|
5,
|
||||||
|
"FlightPlanArrow",
|
||||||
|
1,
|
||||||
|
"FlightPlanScrollTrough",
|
||||||
|
"FlightPlanScrollThumb",
|
||||||
|
120
|
||||||
|
);
|
||||||
|
|
||||||
obj.setController(fg1000.PFDInstrumentsController.new(obj, svg));
|
obj.setController(fg1000.PFDInstrumentsController.new(obj, svg));
|
||||||
obj.setWindDisplay(0);
|
obj.setWindDisplay(0);
|
||||||
|
@ -97,6 +108,7 @@ var PFDInstruments =
|
||||||
obj.updateHDG(0);
|
obj.updateHDG(0);
|
||||||
obj.updateSelectedALT(0);
|
obj.updateSelectedALT(0);
|
||||||
obj.updateCRS(0);
|
obj.updateCRS(0);
|
||||||
|
obj.setFlightPlanVisible(0);
|
||||||
|
|
||||||
return obj;
|
return obj;
|
||||||
},
|
},
|
||||||
|
@ -705,4 +717,64 @@ var PFDInstruments =
|
||||||
me.getElement("PFD-Map-bg").setVisible(enabled);
|
me.getElement("PFD-Map-bg").setVisible(enabled);
|
||||||
me.insetMap.setVisible(enabled);
|
me.insetMap.setVisible(enabled);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
setFlightPlanVisible : func(enabled) {
|
||||||
|
me.getElement("FlightPlanGroup").setVisible(enabled);
|
||||||
|
},
|
||||||
|
|
||||||
|
# Update the FlightPlan display with an updated flightplan.
|
||||||
|
setFlightPlan : func(fp) {
|
||||||
|
var elements = [];
|
||||||
|
|
||||||
|
if (fp == nil) return;
|
||||||
|
|
||||||
|
for (var i = 0; i < fp.getPlanSize(); i = i + 1) {
|
||||||
|
var wp = fp.getWP(i);
|
||||||
|
|
||||||
|
var element = {
|
||||||
|
FlightPlanArrow : 0,
|
||||||
|
FlightPlanID : "",
|
||||||
|
FlightPlanType : "",
|
||||||
|
FlightPlanDTK : 0,
|
||||||
|
FlightPlanDIS : 0
|
||||||
|
};
|
||||||
|
|
||||||
|
if (wp.wp_name != nil) element.FlightPlanID = substr(wp.wp_name, 0, 7);
|
||||||
|
if (wp.wp_role != nil) element.FlightPlanType = substr(wp.wp_role, 0, 4);
|
||||||
|
if (wp.leg_distance != nil) element.FlightPlanDIS = sprintf("%.1fnm", wp.leg_distance);
|
||||||
|
if (wp.leg_bearing != nil) element.FlightPlanDTK = sprintf("%03d°", wp.leg_bearing);
|
||||||
|
append(elements, element);
|
||||||
|
}
|
||||||
|
|
||||||
|
me.flightplanList.setValues(elements);
|
||||||
|
|
||||||
|
# Determine a suitable name to display, using the flightplan name if there is one,
|
||||||
|
# but falling back to the flightplan departure / destination airports, or failing
|
||||||
|
# that the IDs of the first and last waypoints.
|
||||||
|
if (fp.id == nil) {
|
||||||
|
var from = "????";
|
||||||
|
var dest = "????";
|
||||||
|
|
||||||
|
if ((fp.getWP(0) != nil) and (fp.getWP(0).wp_name != nil)) {
|
||||||
|
from = fp.getWP(0).wp_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((fp.getWP(fp.getPlanSize() -1) != nil) and (fp.getWP(fp.getPlanSize() -1).wp_name != nil)) {
|
||||||
|
dest = fp.getWP(fp.getPlanSize() -1).wp_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fp.departure != nil) from = fp.departure.id;
|
||||||
|
if (fp.destination != nil) dest = fp.destination.id;
|
||||||
|
me.getElement("FlightPlanName").setText(from ~ " / " ~ dest);
|
||||||
|
} else {
|
||||||
|
me.getElement("FlightPlanName").setText(fp.id);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
# Update the FlightPlan display to indicate the current waypoint
|
||||||
|
updateFlightPlan : func(current_wp) {
|
||||||
|
if (current_wp == -1) return;
|
||||||
|
me.flightplanList.setCRSR(current_wp);
|
||||||
|
me.flightplanList.displayGroup();
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -37,9 +37,14 @@ var PFDInstrumentsController =
|
||||||
_last_alt_ft : 0,
|
_last_alt_ft : 0,
|
||||||
_last_trend : systime(),
|
_last_trend : systime(),
|
||||||
_selected_alt_ft : 0,
|
_selected_alt_ft : 0,
|
||||||
_heading : 0,
|
_heading_magnetic_deg : 0,
|
||||||
_mag_var : 0,
|
_mag_var : 0,
|
||||||
|
|
||||||
|
_fp_active : 0,
|
||||||
|
_fp_current_wp : 0,
|
||||||
|
_current_flightplan : nil,
|
||||||
|
_fp_visible : 0,
|
||||||
|
|
||||||
_leg_from :0,
|
_leg_from :0,
|
||||||
_leg_id : "",
|
_leg_id : "",
|
||||||
_leg_bearing : 0,
|
_leg_bearing : 0,
|
||||||
|
@ -78,6 +83,12 @@ var PFDInstrumentsController =
|
||||||
_adf_heading_deg : 0.0,
|
_adf_heading_deg : 0.0,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
obj._current_flightplan = obj.getNavData("Flightplan");
|
||||||
|
if (obj._current_flightplan != nil) {
|
||||||
|
obj._fp_current_wp = obj._current_flightplan.current;
|
||||||
|
obj.page.setFlightPlan(obj._current_flightplan);
|
||||||
|
}
|
||||||
|
|
||||||
return obj;
|
return obj;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -239,6 +250,37 @@ var PFDInstrumentsController =
|
||||||
if (data["FMSLegCourseError"] != nil) me._deflection_dots = data["FMSLegCourseError"] /2.0;
|
if (data["FMSLegCourseError"] != nil) me._deflection_dots = data["FMSLegCourseError"] /2.0;
|
||||||
if (data["FMSLegCourseError"] != nil) me._leg_xtrk_nm = data["FMSLegCourseError"];
|
if (data["FMSLegCourseError"] != nil) me._leg_xtrk_nm = data["FMSLegCourseError"];
|
||||||
|
|
||||||
|
var update_fp = 0;
|
||||||
|
|
||||||
|
if (data["FMSFlightPlanEdited"] != nil) {
|
||||||
|
# The flightplan has changed in some way, so reload it.
|
||||||
|
update_fp = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((data["FMSFlightPlanActive"] != nil) and (data["FMSFlightPlanActive"] != me._fp_active)) {
|
||||||
|
me._fp_active = data["FMSFlightPlanActive"];
|
||||||
|
me.page.setFlightPlanVisible(me._fp_active);
|
||||||
|
update_fp = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((data["FMSFlightPlanCurrentWP"] != nil) and (data["FMSFlightPlanCurrentWP"] != me._fp_current_wp)) {
|
||||||
|
me._fp_current_wp = data["FMSFlightPlanCurrentWP"];
|
||||||
|
update_fp = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (update_fp and me._fp_active) {
|
||||||
|
# For some reason the signals to indicate a FP change aren't firing, so reload the
|
||||||
|
# flightplan here
|
||||||
|
me._current_flightplan = me.getNavData("Flightplan");
|
||||||
|
if (me._current_flightplan != nil) {
|
||||||
|
me._fp_current_wp = me._current_flightplan.current;
|
||||||
|
me.page.setFlightPlan(me._current_flightplan);
|
||||||
|
update_fp = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
me.page.updateFlightPlan(me._fp_current_wp);
|
||||||
|
}
|
||||||
|
|
||||||
if (me.getCDISource() == "GPS") {
|
if (me.getCDISource() == "GPS") {
|
||||||
if (me._leg_valid == 0) {
|
if (me._leg_valid == 0) {
|
||||||
# No valid leg data, likely because there's no GPS course set
|
# No valid leg data, likely because there's no GPS course set
|
||||||
|
@ -357,6 +399,24 @@ var PFDInstrumentsController =
|
||||||
return emesary.Transmitter.ReceiptStatus_OK;
|
return emesary.Transmitter.ReceiptStatus_OK;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getNavData : func(type, value=nil) {
|
||||||
|
# Use Emesary to get a piece from the NavData system, using the provided
|
||||||
|
# type and value;
|
||||||
|
var notification = notifications.PFDEventNotification.new(
|
||||||
|
"MFD",
|
||||||
|
me._page.mfd.getDeviceID(),
|
||||||
|
notifications.PFDEventNotification.NavData,
|
||||||
|
{Id: type, Value: value});
|
||||||
|
|
||||||
|
var response = me._transmitter.NotifyAll(notification);
|
||||||
|
|
||||||
|
if (! me._transmitter.IsFailed(response)) {
|
||||||
|
return notification.EventParameter.Value;
|
||||||
|
} else {
|
||||||
|
return nil;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
PFDRegisterWithEmesary : func(transmitter = nil){
|
PFDRegisterWithEmesary : func(transmitter = nil){
|
||||||
if (transmitter == nil)
|
if (transmitter == nil)
|
||||||
transmitter = emesary.GlobalTransmitter;
|
transmitter = emesary.GlobalTransmitter;
|
||||||
|
|
|
@ -61,6 +61,11 @@ var PFDDisplay =
|
||||||
'/Aircraft/Instruments-3d/FG1000/MFDPages/PFDInstruments.svg',
|
'/Aircraft/Instruments-3d/FG1000/MFDPages/PFDInstruments.svg',
|
||||||
{'font-mapper': fontmapper});
|
{'font-mapper': fontmapper});
|
||||||
|
|
||||||
|
canvas.parsesvg(obj._svg,
|
||||||
|
'/Aircraft/Instruments-3d/FG1000/MFDPages/FlightPlanPFD.svg',
|
||||||
|
{'font-mapper': fontmapper});
|
||||||
|
|
||||||
|
|
||||||
canvas.parsesvg(obj._svg,
|
canvas.parsesvg(obj._svg,
|
||||||
'/Aircraft/Instruments-3d/FG1000/MFDPages/DirectToPFD.svg',
|
'/Aircraft/Instruments-3d/FG1000/MFDPages/DirectToPFD.svg',
|
||||||
{'font-mapper': fontmapper});
|
{'font-mapper': fontmapper});
|
||||||
|
|
|
@ -20,9 +20,6 @@ new : func (pageName, svg, elementNames, size, highlightElement, arrow=0, scroll
|
||||||
# must be an SVG Element [pageName][elementName]{0...pageSize}
|
# must be an SVG Element [pageName][elementName]{0...pageSize}
|
||||||
_size : size,
|
_size : size,
|
||||||
|
|
||||||
# Current size of the selectable elements.
|
|
||||||
_currentSize : 0,
|
|
||||||
|
|
||||||
# ElementName to be highlighted. Must be an hash value from ._elementNames
|
# ElementName to be highlighted. Must be an hash value from ._elementNames
|
||||||
_highlightElement : highlightElement,
|
_highlightElement : highlightElement,
|
||||||
|
|
||||||
|
@ -39,13 +36,14 @@ new : func (pageName, svg, elementNames, size, highlightElement, arrow=0, scroll
|
||||||
# List of SVG elements to display the values
|
# List of SVG elements to display the values
|
||||||
_elements : [],
|
_elements : [],
|
||||||
|
|
||||||
# Cursor index into the elements array
|
# Cursor index into the _values array
|
||||||
_crsrIndex : 0,
|
_crsrIndex : 0,
|
||||||
|
|
||||||
# Whether the CRSR is enabled
|
# Whether the CRSR is enabled
|
||||||
_crsrEnabled : 0,
|
_crsrEnabled : 0,
|
||||||
|
|
||||||
# Page index
|
# Page index - which _values index element[0] refers to. The currently
|
||||||
|
# selected _element has index (_crsrIndex - _pageIndex)
|
||||||
_pageIndex : 0,
|
_pageIndex : 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -97,64 +95,64 @@ setValues : func (values_array) {
|
||||||
me._scrollTroughElement.setVisible(0);
|
me._scrollTroughElement.setVisible(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
me.displayPage();
|
me.displayGroup();
|
||||||
},
|
},
|
||||||
|
|
||||||
nextPage : func() {
|
displayGroup : func () {
|
||||||
if (size(me._values) > ((me._pageIndex +1) * me._size)) {
|
|
||||||
me._pageIndex = me._pageIndex + 1;
|
# The _crsrIndex element should be displayed as close to the middle of the
|
||||||
me._crsrIndex = 0;
|
# group as possible. So as the user scrolls the list appears to move around
|
||||||
me.displayPage();
|
# a static cursor position.
|
||||||
} else {
|
#
|
||||||
me._crsrIndex = me._currentSize -1;
|
# The exceptions to this is as the _crsrIndex approaches the ends of the list.
|
||||||
|
# In these cases, we let the cursor move to the top or bottom of the list.
|
||||||
|
|
||||||
|
# Determine the middle element
|
||||||
|
var middle_element_index = int(me._size / 2);
|
||||||
|
me._pageIndex = me._crsrIndex - middle_element_index;
|
||||||
|
|
||||||
|
if (me._crsrIndex < middle_element_index) {
|
||||||
|
# Start of list
|
||||||
|
me._pageIndex = 0;
|
||||||
|
} else if (me._crsrIndex > (size(me._values) - middle_element_index - 1)) {
|
||||||
|
# End of list
|
||||||
|
me._pageIndex = size(me._values) - me._size;
|
||||||
}
|
}
|
||||||
},
|
|
||||||
|
|
||||||
previousPage : func() {
|
for (var i = 0; i < me._size; i = i + 1) {
|
||||||
if (me._pageIndex > 0) {
|
if (me._pageIndex + i < size(me._values)) {
|
||||||
me._pageIndex = me._pageIndex - 1;
|
var value = me._values[me._pageIndex + i];
|
||||||
me._crsrIndex = me._size -1;
|
foreach (var k; keys(value)) {
|
||||||
me.displayPage();
|
if (k == me._highlightElement) {
|
||||||
} else {
|
me._elements[i].unhighlightElement();
|
||||||
me._crsrIndex = 0;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
displayPage : func () {
|
if (me._arrow) {
|
||||||
# Determine how many elements to display in this page
|
# If we're using a HighlightElement, then we only show the element
|
||||||
me._currentSize = math.min(me._size, size(me._values) - me._size * me._pageIndex);
|
# the cursor is on.
|
||||||
|
if (i + me._pageIndex == me._crsrIndex) {
|
||||||
|
me._elements[i].setVisible(1);
|
||||||
|
if (me._crsrEnabled) me._elements[i].highlightElement();
|
||||||
|
} else {
|
||||||
|
me._elements[i].setVisible(0);
|
||||||
|
}
|
||||||
|
|
||||||
for (var i = 0; i < me._currentSize; i = i + 1) {
|
|
||||||
var value = me._values[i + me._size * me._pageIndex];
|
|
||||||
foreach (var k; keys(value)) {
|
|
||||||
if (k == me._highlightElement) {
|
|
||||||
me._elements[i].unhighlightElement();
|
|
||||||
|
|
||||||
if (me._arrow) {
|
|
||||||
# If we're using a HighlightElement, then we only show the element
|
|
||||||
# the cursor is on.
|
|
||||||
if (i == me._crsrIndex) {
|
|
||||||
me._elements[i].setVisible(1);
|
|
||||||
} else {
|
} else {
|
||||||
me._elements[i].setVisible(0);
|
me._elements[i].setVisible(1);
|
||||||
|
if (me._crsrEnabled and (i + me._pageIndex == me._crsrIndex))
|
||||||
|
me._elements[i].highlightElement();
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
me._elements[i].setVisible(1);
|
|
||||||
}
|
|
||||||
me._elements[i].setValue(value[k]);
|
|
||||||
} else {
|
|
||||||
var name = me._pageName ~ k ~ i;
|
|
||||||
var element = me._svg.getElementById(name);
|
|
||||||
assert(element != nil, "Unable to find element " ~ name);
|
|
||||||
element.setVisible(1);
|
|
||||||
element.setText(value[k]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Hide any further elements
|
me._elements[i].setValue(value[k]);
|
||||||
if (me._currentSize < me._size) {
|
} else {
|
||||||
for (var i = me._currentSize; i < me._size; i = i + 1) {
|
var name = me._pageName ~ k ~ i;
|
||||||
|
var element = me._svg.getElementById(name);
|
||||||
|
assert(element != nil, "Unable to find element " ~ name);
|
||||||
|
element.setVisible(1);
|
||||||
|
element.setText(value[k]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
# We've gone off the end of the values list, so hide any further values.
|
||||||
foreach (var k; me._elementNames) {
|
foreach (var k; me._elementNames) {
|
||||||
if (k == me._highlightElement) {
|
if (k == me._highlightElement) {
|
||||||
me._elements[i].setVisible(0);
|
me._elements[i].setVisible(0);
|
||||||
|
@ -172,10 +170,9 @@ displayPage : func () {
|
||||||
|
|
||||||
if ((me._scrollThumbElement != nil) and (me._size < size(me._values))) {
|
if ((me._scrollThumbElement != nil) and (me._size < size(me._values))) {
|
||||||
# Shift the scrollbar if it's relevant
|
# Shift the scrollbar if it's relevant
|
||||||
var numScrollPositions = math.ceil(size(me._values) / me._size) -1;
|
|
||||||
me._scrollThumbElement.setTranslation([
|
me._scrollThumbElement.setTranslation([
|
||||||
me._scrollBaseTransform[0],
|
me._scrollBaseTransform[0],
|
||||||
me._scrollBaseTransform[1] + me._scrollHeight * (me._pageIndex / numScrollPositions)
|
me._scrollBaseTransform[1] + me._scrollHeight * (me._crsrIndex / (size(me._values) -1))
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -190,77 +187,74 @@ addTextElement : func(name, value) {
|
||||||
},
|
},
|
||||||
|
|
||||||
showCRSR : func() {
|
showCRSR : func() {
|
||||||
if (me._currentSize == 0) return;
|
if (size(me._values) == 0) return;
|
||||||
me._crsrEnabled = 1;
|
me._crsrEnabled = 1;
|
||||||
me._elements[me._crsrIndex].highlightElement();
|
me._elements[me._crsrIndex - me._pageIndex].highlightElement();
|
||||||
},
|
},
|
||||||
hideCRSR : func() {
|
hideCRSR : func() {
|
||||||
if (me._crsrEnabled == 0) return;
|
if (me._crsrEnabled == 0) return;
|
||||||
me._elements[me._crsrIndex].unhighlightElement();
|
me._elements[me._crsrIndex - me._pageIndex].unhighlightElement();
|
||||||
|
|
||||||
# If we're using a HighlightElement, then we need to make the cursor position visible
|
# If we're using a HighlightElement, then we need to make the cursor position visible
|
||||||
if (me._arrow) me._elements[me._crsrIndex].setVisible(1);
|
if (me._arrow) me._elements[me._crsrIndex - me._pageIndex].setVisible(1);
|
||||||
me._crsrEnabled = 0;
|
me._crsrEnabled = 0;
|
||||||
},
|
},
|
||||||
setCRSR : func(index) {
|
setCRSR : func(index) {
|
||||||
me._crsrIndex = math.min(index, me._currentSize -1);
|
me._crsrIndex = math.min(index, size(me._values) -1);
|
||||||
|
me._crsrIndex = math.max(0, me._crsrIndex);
|
||||||
},
|
},
|
||||||
getCursorElementName : func() {
|
getCursorElementName : func() {
|
||||||
if (me._crsrEnabled == -1) return nil;
|
if (me._crsrEnabled == -1) return nil;
|
||||||
return me._elements[me._crsrIndex].name;
|
return me._elements[me._crsrIndex - me._pageIndex].name;
|
||||||
},
|
},
|
||||||
isCursorOnDataEntryElement : func() {
|
isCursorOnDataEntryElement : func() {
|
||||||
if (me._crsrEnabled == -1) return 0;
|
if (me._crsrEnabled == -1) return 0;
|
||||||
return isa(me._elements[me._crsrIndex], DataEntryElement);
|
return isa(me._elements[me._crsrIndex - me._pageIndex], DataEntryElement);
|
||||||
},
|
},
|
||||||
enterElement : func() {
|
enterElement : func() {
|
||||||
if (me._crsrEnabled == 0) return;
|
if (me._crsrEnabled == 0) return;
|
||||||
return me._elements[me._crsrIndex].enterElement();
|
return me._elements[me._crsrIndex - me._pageIndex].enterElement();
|
||||||
},
|
},
|
||||||
getValue : func() {
|
getValue : func() {
|
||||||
if (me._crsrEnabled == -1) return nil;
|
if (me._crsrEnabled == -1) return nil;
|
||||||
return me._elements[me._crsrIndex].getValue();
|
return me._elements[me._crsrIndex - me._pageIndex].getValue();
|
||||||
|
},
|
||||||
|
setValue : func(idx, key, value) {
|
||||||
|
me._values[idx][key] = value;
|
||||||
},
|
},
|
||||||
clearElement : func() {
|
clearElement : func() {
|
||||||
if (me._crsrEnabled == 0) return;
|
if (me._crsrEnabled == 0) return;
|
||||||
me._elements[me._crsrIndex].clearElement();
|
me._elements[me._crsrIndex - me._pageIndex].clearElement();
|
||||||
},
|
},
|
||||||
incrSmall : func(value) {
|
incrSmall : func(value) {
|
||||||
if (me._crsrEnabled == 0) return;
|
if (me._crsrEnabled == 0) return;
|
||||||
|
|
||||||
var incr_or_decr = (value > 0) ? 1 : -1;
|
var incr_or_decr = (value > 0) ? 1 : -1;
|
||||||
if (me._elements[me._crsrIndex].isInEdit()) {
|
if (me._elements[me._crsrIndex - me._pageIndex].isInEdit()) {
|
||||||
# We're editing, so pass to the element.
|
# We're editing, so pass to the element.
|
||||||
#print("Moving cursor to next character entry");
|
#print("Moving cursor to next character entry");
|
||||||
me._elements[me._crsrIndex].incrSmall();
|
me._elements[me._crsrIndex - me._pageIndex].incrSmall(val);
|
||||||
} else {
|
} else {
|
||||||
# Move to next selection element
|
# Move to next selection element
|
||||||
me._elements[me._crsrIndex].unhighlightElement();
|
|
||||||
|
|
||||||
me._crsrIndex = me._crsrIndex + incr_or_decr;
|
me._crsrIndex = me._crsrIndex + incr_or_decr;
|
||||||
|
if (me._crsrIndex < 0 ) me._crsrIndex = 0;
|
||||||
if (me._crsrIndex < 0 ) me.previousPage();
|
if (me._crsrIndex == size(me._values)) me._crsrIndex = size(me._values) -1;
|
||||||
if (me._crsrIndex == me._currentSize) me.nextPage();
|
me.displayGroup();
|
||||||
|
|
||||||
me._elements[me._crsrIndex].highlightElement();
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
incrLarge : func(val) {
|
incrLarge : func(val) {
|
||||||
if (me._crsrEnabled == 0) return;
|
if (me._crsrEnabled == 0) return;
|
||||||
var incr_or_decr = (val > 0) ? 1 : -1;
|
var incr_or_decr = (val > 0) ? 1 : -1;
|
||||||
if (me._elements[me._crsrIndex].isInEdit()) {
|
if (me._elements[me._crsrIndex - me._pageIndex].isInEdit()) {
|
||||||
# We're editing, so pass to the element.
|
# We're editing, so pass to the element.
|
||||||
#print("Moving cursor to next character entry");
|
#print("Moving cursor to next character entry");
|
||||||
me._elements[me._crsrIndex].incrLarge();
|
me._elements[me._crsrIndex - me._pageIndex].incrLarge(val);
|
||||||
} else {
|
} else {
|
||||||
# Move to next selection element
|
# Move to next selection element
|
||||||
me._elements[me._crsrIndex].unhighlightElement();
|
|
||||||
me._crsrIndex = me._crsrIndex + incr_or_decr;
|
me._crsrIndex = me._crsrIndex + incr_or_decr;
|
||||||
|
if (me._crsrIndex < 0 ) me._crsrIndex = 0;
|
||||||
if (me._crsrIndex < 0 ) me.previousPage();
|
if (me._crsrIndex == size(me._values)) me._crsrIndex = size(me._values) -1;
|
||||||
if (me._crsrIndex == me._currentSize) me.nextPage();
|
me.displayGroup();
|
||||||
|
|
||||||
me._elements[me._crsrIndex].highlightElement();
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue