1
0
Fork 0

Initial work on standardising glideslope needle behaviour in aircraft. C172P works (including KAP140 APPR capture), and Primus-1000 based aircraft display correctly.

This commit is contained in:
jmt 2009-09-09 10:49:36 +00:00
parent 4f0cab99f6
commit 4678f67cb2
22 changed files with 57 additions and 88 deletions

View file

@ -95,7 +95,7 @@ var elevatorControl = propFlightControls.getNode("elevator", 0);
var elevatorTrimControl = propFlightControls.getNode("elevator-trim", 0);
var headingNeedleDeflection = "/instrumentation/nav/heading-needle-deflection";
var gsNeedleDeflection = "/instrumentation/nav/gs-needle-deflection";
var gsNeedleDeflection = "/instrumentation/nav/gs-needle-deflection-norm";
var staticPressure = "systems/static/pressure-inhg";
var pressureUnits = { "inHg" : 0, "hPa" : 1 };
@ -912,19 +912,19 @@ var gsArm = func {
var deviation = getprop(gsNeedleDeflection);
##
# If the deflection is more than 1 degrees wait 5 seconds and check again.
# If the deflection is more than 50% (manual says '2 to 3 dots')
##
if (abs(deviation) > 1.0)
if (abs(deviation) > 0.5)
{
#print("deviation");
settimer(gsArm, 5);
return;
}
##
# If the deviation is less than 1 degrees turn off the GS-ARM annunciator
# If the deviation is less than 50% turn off the GS-ARM annunciator
# and show the GS annunciator. Activate the GS pitch mode.
##
elsif (abs(deviation) < 1.1)
else
{
#print("capture");
annunciatorAlt.setBoolValue(0);

View file

@ -39,7 +39,7 @@ var NAVLOC = "/instrumentation/nav/nav-loc";
var NAVDST = "/instrumentation/nav/nav-dist";
var NAVRNG = "/instrumentation/nav/in-range";
var HDEFL = "/instrumentation/nav/heading-needle-deflection";
var GSDEFL = "/instrumentation/nav/gs-needle-deflection";
var GSDEFL = "/instrumentation/nav/gs-needle-deflection-norm";
var BC = "/instrumentation/nav/back-course-btn";
var HDG = props.globals.getNode("/autopilot/locks/heading",1);
@ -173,7 +173,7 @@ var update_nav = func {
if(getprop("instrumentation/kfc200/gs-arm")){
if(getprop("instrumentation/nav/gs-distance") < 25000){
var GS1 = getprop(GSDEFL);
if( GS1< 1.0 and GS1 > -1.0){vnav = 4;
if( GS1< 0.5 and GS1 > -0.5){vnav = 4;
setprop("/instrumentation/kfc200/vnav",vnav);
}
}

View file

@ -91,13 +91,12 @@ Syd Adams
<animation>
<type>translate</type>
<object-name>GSneedle</object-name>
<property>instrumentation/nav/gs-needle-deflection</property>
<property>instrumentation/nav/gs-needle-deflection-norm</property>
<interpolation>
<entry><ind>-100.0</ind><dep>-0.0085</dep></entry>
<entry><ind>-5.0</ind><dep>-0.0085</dep></entry>
<entry><ind>-1</ind><dep>-0.0085</dep></entry>
<entry><ind>-0.5</ind><dep>-0.0085</dep></entry>
<entry><ind>0.0</ind><dep>0.0</dep></entry>
<entry><ind>10.0</ind><dep>0.0162</dep></entry>
<entry><ind>100.0</ind><dep>0.0162</dep></entry>
<entry><ind>1.0</ind><dep>0.0162</dep></entry>
</interpolation>
<axis>
<x>0.0</x>

View file

@ -111,13 +111,11 @@ Syd Adams
<animation>
<type>translate</type>
<object-name>KI206.gsneedle</object-name>
<property>instrumentation/nav/gs-needle-deflection</property>
<property>instrumentation/nav/gs-needle-deflection-norm</property>
<interpolation>
<entry><ind>-9999.0</ind><dep>-0.0113</dep></entry>
<entry><ind>-10.0</ind><dep>-0.0113</dep></entry>
<entry><ind>-1.0</ind><dep>-0.0113</dep></entry>
<entry><ind>0.0</ind><dep>0.0</dep></entry>
<entry><ind>10.0</ind><dep>0.0113</dep></entry>
<entry><ind>9999.0</ind><dep>0.0113</dep></entry>
<entry><ind>1.0</ind><dep>0.0113</dep></entry>
</interpolation>
<axis>
<x>0.0</x>

View file

@ -343,9 +343,7 @@ var P1000 = {
if(getprop("/instrumentation/nav["~nv~"]/has-gs")){
me.NavType.setValue(2);
if(nm_calc<30)me.GS_inrange.setValue(1);
var df = getprop("/instrumentation/nav["~nv~"]/gs-needle-deflection");
if(df>10)df=10;
if(df<-10)df=-10;
var df = getprop("/instrumentation/nav["~nv~"]/gs-needle-deflection-norm");
me.GS_deflection.setValue(df);
}
id = getprop("instrumentation/nav["~nv~"]/nav-id");

View file

@ -506,28 +506,22 @@ Primus 1000 Primary Flight Display
<animation>
<type>translate</type>
<object-name>GSneedle</object-name>
<property>instrumentation/nav/gs-needle-deflection</property>
<property>instrumentation/nav/gs-needle-deflection-norm</property>
<interpolation>
<entry>
<ind>-10.0</ind><dep>-0.0188</dep>
<ind>-1.0</ind><dep>-0.0188</dep>
</entry>
<entry>
<ind>-5.0</ind><dep>-0.0162</dep>
</entry>
<entry>
<ind>-2.5</ind><dep>-0.0083</dep>
<ind>-0.5</ind><dep>-0.0162</dep>
</entry>
<entry>
<ind>0.0</ind><dep>0.0</dep>
</entry>
<entry>
<ind>2.50</ind><dep>0.0078</dep>
<ind>0.5</ind><dep>0.0158</dep>
</entry>
<entry>
<ind>5.0</ind><dep>0.0158</dep>
</entry>
<entry>
<ind>10.0</ind><dep>0.02</dep>
<ind>1.0</ind><dep>0.02</dep>
</entry>
</interpolation>
<axis>

View file

@ -320,28 +320,22 @@ Primus 1000 Primary Flight Display
<animation>
<type>translate</type>
<object-name>GSneedle</object-name>
<property>instrumentation/nav/gs-needle-deflection</property>
<property>instrumentation/nav/gs-needle-deflection-norm</property>
<interpolation>
<entry>
<ind>-10.0</ind><dep>-0.0188</dep>
<ind>-1.0</ind><dep>-0.0188</dep>
</entry>
<entry>
<ind>-5.0</ind><dep>-0.0162</dep>
</entry>
<entry>
<ind>-2.5</ind><dep>-0.0083</dep>
<ind>-0.5</ind><dep>-0.0162</dep>
</entry>
<entry>
<ind>0.0</ind><dep>0.0</dep>
</entry>
<entry>
<ind>2.50</ind><dep>0.0078</dep>
<ind>0.5</ind><dep>0.0158</dep>
</entry>
<entry>
<ind>5.0</ind><dep>0.0158</dep>
</entry>
<entry>
<ind>10.0</ind><dep>0.02</dep>
<ind>1.0</ind><dep>0.02</dep>
</entry>
</interpolation>
<axis>

View file

@ -6,7 +6,7 @@
<nav-to-flag>/instrumentation/nav[0]/to-flag</nav-to-flag>
<nav-from-flag>/instrumentation/nav[0]/from-flag</nav-from-flag>
<nav-radial-selected>/instrumentation/nav[0]/radials/selected-deg</nav-radial-selected>
<nav-gs-needle-deflection>/instrumentation/nav[0]/gs-needle-deflection</nav-gs-needle-deflection>
<nav-gs-needle-deflection>/instrumentation/nav[0]/gs-needle-deflection-norm</nav-gs-needle-deflection>
<nav-heading-needle-deflection>/instrumentation/nav[0]/heading-needle-deflection</nav-heading-needle-deflection>
<nav-in-range>/instrumentation/nav[0]/in-range</nav-in-range>
</params>
@ -102,7 +102,7 @@
<type>rotate</type>
<object-name>GlidescopeNeedle</object-name>
<property alias="../../params/nav-gs-needle-deflection"/>
<factor>-3.2</factor>
<factor>-32</factor>
<min-deg>-32</min-deg>
<max-deg>32</max-deg>
<center>

View file

@ -6,7 +6,7 @@
<nav-to-flag>/instrumentation/nav[1]/to-flag</nav-to-flag>
<nav-from-flag>/instrumentation/nav[1]/from-flag</nav-from-flag>
<nav-radial-selected>/instrumentation/nav[1]/radials/selected-deg</nav-radial-selected>
<nav-gs-needle-deflection>/instrumentation/nav[1]/gs-needle-deflection</nav-gs-needle-deflection>
<nav-gs-needle-deflection>/instrumentation/nav[1]/gs-needle-deflection-norm</nav-gs-needle-deflection>
<nav-heading-needle-deflection>/instrumentation/nav[1]/heading-needle-deflection</nav-heading-needle-deflection>
<nav-in-range>/instrumentation/nav[1]/in-range</nav-in-range>
</params>
@ -102,7 +102,7 @@
<type>rotate</type>
<object-name>GlidescopeNeedle</object-name>
<property alias="../../params/nav-gs-needle-deflection"/>
<factor>-3.2</factor>
<factor>-32.0</factor>
<min-deg>-32</min-deg>
<max-deg>32</max-deg>
<center>

View file

@ -18,7 +18,7 @@ Mar 18 2003
<h-base>512</h-base>
<params>
<gs-needle>/instrumentation/nav[0]/gs-needle-deflection</gs-needle>
<gs-needle>/instrumentation/nav[0]/gs-needle-deflection-norm</gs-needle>
<vor-needle>/instrumentation/nav[0]/heading-needle-deflection</vor-needle>
<radial-selected-deg>/instrumentation/nav[0]/radials/selected-deg</radial-selected-deg>
<to-flag>/instrumentation/nav[0]/to-flag</to-flag>
@ -424,10 +424,8 @@ Mar 18 2003
<transformation>
<type>y-shift</type>
<property alias="../../../../../params/gs-needle"/>
<min>-3.5</min>
<max>3.5</max>
<scale>24</scale>
<offset>-24</offset>
<scale>84</scale>
<offset>-84</offset>
</transformation>
</transformations>
</layer>

View file

@ -12,7 +12,7 @@ Started 24-7-01 by Timothy Gale
<h-base>128</h-base>
<params>
<nav-gs-needle-deflection>/instrumentation/nav[0]/gs-needle-deflection</nav-gs-needle-deflection>
<nav-gs-needle-deflection>/instrumentation/nav[0]/gs-needle-deflection-norm</nav-gs-needle-deflection>
<hsi-has-gs-needle>/sim/instrument-options/hsi[0]/has-gs-needle</hsi-has-gs-needle>
</params>
@ -132,9 +132,7 @@ Started 24-7-01 by Timothy Gale
<transformation>
<type>y-shift</type>
<property alias="../../../../../params/nav-gs-needle-deflection"/>
<min>-3.5</min>
<max>3.5</max>
<scale>7.0</scale>
<scale>24.5</scale>
</transformation>
<transformation>
<type>rotation</type>

View file

@ -12,7 +12,7 @@ Started 24-7-01 by Timothy Gale
<h-base>128</h-base>
<params>
<nav-gs-needle-deflection>/instrumentation/nav[0]/gs-needle-deflection</nav-gs-needle-deflection>
<nav-gs-needle-deflection>/instrumentation/nav[0]/gs-needle-deflection-norm</nav-gs-needle-deflection>
<hsi-has-gs-needle>/sim/instrument-options/hsi[0]/has-gs-needle</hsi-has-gs-needle>
</params>
@ -132,9 +132,7 @@ Started 24-7-01 by Timothy Gale
<transformation>
<type>y-shift</type>
<property alias="../../../../../params/nav-gs-needle-deflection"/>
<min>-3.5</min>
<max>3.5</max>
<scale>7.0</scale>
<scale>24.5</scale>
</transformation>
<transformation>
<type>rotation</type>

View file

@ -15,7 +15,7 @@ Started 24-7-01 by Timothy Gale
<nav-radial-selected>/instrumentation/nav[0]/radials/selected-deg</nav-radial-selected>
<nav-to-flag>/instrumentation/nav[0]/to-flag</nav-to-flag>
<nav-from-flag>/instrumentation/nav[0]/from-flag</nav-from-flag>
<nav-gs-needle-deflection>/instrumentation/nav[0]/gs-needle-deflection</nav-gs-needle-deflection>
<nav-gs-needle-deflection>/instrumentation/nav[0]/gs-needle-deflection-norm</nav-gs-needle-deflection>
<hsi-has-gs-needle>/sim/instrument-options/hsi[0]/has-gs-needle</hsi-has-gs-needle>
<heading-deg>/orientation/heading-magnetic-deg</heading-deg>
<autopilot-heading-deg>/autopilot/settings/heading-bug-deg</autopilot-heading-deg>
@ -181,9 +181,7 @@ Started 24-7-01 by Timothy Gale
<transformation>
<type>y-shift</type>
<property alias="../../../../../params/nav-gs-needle-deflection"/>
<min>-3.5</min>
<max>3.5</max>
<scale>7.0</scale>
<scale>24.5</scale>
</transformation>
<transformation>
<type>rotation</type>

View file

@ -32,7 +32,7 @@ properties' values.
<nav-to-flag>/instrumentation/nav[0]/to-flag</nav-to-flag>
<nav-from-flag>/instrumentation/nav[0]/from-flag</nav-from-flag>
<nav-radial-selected>/instrumentation/nav[0]/radials/selected-deg</nav-radial-selected>
<nav-gs-needle-deflection>/instrumentation/nav[0]/gs-needle-deflection</nav-gs-needle-deflection>
<nav-gs-needle-deflection>/instrumentation/nav[0]/gs-needle-deflection-norm</nav-gs-needle-deflection>
<nav-heading-needle-deflection>/instrumentation/nav[0]/heading-needle-deflection</nav-heading-needle-deflection>
<nav-has-gs-needle>/sim/instrument-options/nav[0]/has-gs-needle</nav-has-gs-needle>
<nav-needles-pivot>/sim/instrument-options/nav[0]/needles-pivot</nav-needles-pivot>
@ -214,9 +214,9 @@ properties' values.
<transformation>
<type>rotation</type>
<property alias="../../../../../params/nav-gs-needle-deflection"/>
<min>-3.5</min>
<max>3.5</max>
<scale>-7</scale>
<min>-1</min>
<max>1</max>
<scale>-24.5</scale>
</transformation>
<transformation>
<type>x-shift</type>
@ -254,8 +254,6 @@ properties' values.
<transformation>
<type>y-shift</type>
<property alias="../../../../../params/nav-gs-needle-deflection"/>
<min>-1</min>
<max>1</max>
<scale>25.6</scale>
</transformation>
<transformation>

View file

@ -32,7 +32,7 @@ properties' values.
<nav-to-flag>/instrumentation/nav[0]/to-flag</nav-to-flag>
<nav-from-flag>/instrumentation/nav[0]/from-flag</nav-from-flag>
<nav-radial-selected>/instrumentation/nav[0]/radials/selected-deg</nav-radial-selected>
<nav-gs-needle-deflection>/instrumentation/nav[0]/gs-needle-deflection</nav-gs-needle-deflection>
<nav-gs-needle-deflection>/instrumentation/nav[0]/gs-needle-deflection-norm</nav-gs-needle-deflection>
<nav-heading-needle-deflection>/instrumentation/nav[0]/heading-needle-deflection</nav-heading-needle-deflection>
<nav-has-gs-needle>/sim/instrument-options/nav[0]/has-gs-needle</nav-has-gs-needle>
<nav-needles-pivot>/sim/instrument-options/nav[0]/needles-pivot</nav-needles-pivot>
@ -214,9 +214,7 @@ properties' values.
<transformation>
<type>rotation</type>
<property alias="../../../../../params/nav-gs-needle-deflection"/>
<min>-3.5</min>
<max>3.5</max>
<scale>-7</scale>
<scale>-24.5</scale>
</transformation>
<transformation>
<type>x-shift</type>

View file

@ -21,7 +21,7 @@ Jan 26 2003
<nav-to-flag>/instrumentation/nav[0]/to-flag</nav-to-flag>
<nav-from-flag>/instrumentation/nav[0]/from-flag</nav-from-flag>
<nav-radial-selected>/instrumentation/nav[0]/radials/selected-deg</nav-radial-selected>
<nav-gs-needle-deflection>/instrumentation/nav[0]/gs-needle-deflection</nav-gs-needle-deflection>
<nav-gs-needle-deflection>/instrumentation/nav[0]/gs-needle-deflection-norm</nav-gs-needle-deflection>
<nav-heading-needle-deflection>/instrumentation/nav[0]/heading-needle-deflection</nav-heading-needle-deflection>
<!-- when posible change to nav-gs-in-range -->
<nav-in-range>/instrumentation/nav[0]/in-range</nav-in-range>
@ -219,9 +219,9 @@ Jan 26 2003
<type>rotation</type>
<offset>0</offset>
<property alias="../../../../../params/nav-gs-needle-deflection"/>
<min>-3.5</min>
<max>3.5</max>
<scale>-10.0</scale>
<min>-1</min>
<max>1</max>
<scale>-35.0</scale>
</transformation>
</transformations>
</layer>
@ -246,9 +246,7 @@ Jan 26 2003
<type>rotation</type>
<offset>0</offset>
<property alias="../../../../../params/nav-gs-needle-deflection"/>
<min>-3.5</min>
<max>3.5</max>
<scale>-10.0</scale>
<scale>-35.0</scale>
</transformation>
<transformation>
<type>x-shift</type>

View file

@ -6,7 +6,7 @@
<nav-to-flag>/instrumentation/nav[0]/to-flag</nav-to-flag>
<nav-from-flag>/instrumentation/nav[0]/from-flag</nav-from-flag>
<nav-radial-selected>/instrumentation/nav[0]/radials/selected-deg</nav-radial-selected>
<nav-gs-needle-deflection>/instrumentation/nav[0]/gs-needle-deflection</nav-gs-needle-deflection>
<nav-gs-needle-deflection>/instrumentation/nav[0]/gs-needle-deflection-norm</nav-gs-needle-deflection>
<nav-heading-needle-deflection>/instrumentation/nav[0]/heading-needle-deflection</nav-heading-needle-deflection>
<nav-in-range>/instrumentation/nav[0]/in-range</nav-in-range>
</params>
@ -102,7 +102,7 @@
<type>rotate</type>
<object-name>GlidescopeNeedle</object-name>
<property alias="../../params/nav-gs-needle-deflection"/>
<factor>-3.2</factor>
<factor>-32</factor>
<min-deg>-32</min-deg>
<max-deg>32</max-deg>
<center>

View file

@ -6,7 +6,7 @@
<nav-to-flag>/instrumentation/nav[1]/to-flag</nav-to-flag>
<nav-from-flag>/instrumentation/nav[1]/from-flag</nav-from-flag>
<nav-radial-selected>/instrumentation/nav[1]/radials/selected-deg</nav-radial-selected>
<nav-gs-needle-deflection>/instrumentation/nav[1]/gs-needle-deflection</nav-gs-needle-deflection>
<nav-gs-needle-deflection>/instrumentation/nav[1]/gs-needle-deflection-norm</nav-gs-needle-deflection>
<nav-heading-needle-deflection>/instrumentation/nav[1]/heading-needle-deflection</nav-heading-needle-deflection>
<nav-in-range>/instrumentation/nav[1]/in-range</nav-in-range>
</params>
@ -102,7 +102,7 @@
<type>rotate</type>
<object-name>GlidescopeNeedle</object-name>
<property alias="../../params/nav-gs-needle-deflection"/>
<factor>-3.2</factor>
<factor>-32</factor>
<min-deg>-32</min-deg>
<max-deg>32</max-deg>
<center>

View file

@ -198,7 +198,7 @@ Legacy 2D instruments and actions for the 3D C172P cockpit.
<nav-to-flag>/instrumentation/nav[1]/to-flag</nav-to-flag>
<nav-from-flag>/instrumentation/nav[1]/from-flag</nav-from-flag>
<nav-radial-selected>/instrumentation/nav[1]/radials/selected-deg</nav-radial-selected>
<nav-gs-needle-deflection>/instrumentation/nav[1]/gs-needle-deflection</nav-gs-needle-deflection>
<nav-gs-needle-deflection>/instrumentation/nav[1]/gs-needle-deflection-norm</nav-gs-needle-deflection>
<nav-heading-needle-deflection>/instrumentation/nav[1]/heading-needle-deflection</nav-heading-needle-deflection>
<nav-has-gs-needle>/sim/instrument-options/nav[1]/has-gs-needle</nav-has-gs-needle>
<nav-needles-pivot>/sim/instrument-options/nav[1]/needles-pivot</nav-needles-pivot>

View file

@ -240,7 +240,7 @@ override those by providing <w>..</w> and <h>..</h> properties with the
<nav-to-flag>/instrumentation/nav[1]/to-flag</nav-to-flag>
<nav-from-flag>/instrumentation/nav[1]/from-flag</nav-from-flag>
<nav-radial-selected>/instrumentation/nav[1]/radials/selected-deg</nav-radial-selected>
<nav-gs-needle-deflection>/instrumentation/nav[1]/gs-needle-deflection</nav-gs-needle-deflection>
<nav-gs-needle-deflection>/instrumentation/nav[1]/gs-needle-deflection-norm</nav-gs-needle-deflection>
<nav-heading-needle-deflection>/instrumentation/nav[1]/heading-needle-deflection</nav-heading-needle-deflection>
<nav-has-gs-needle>/sim/instrument-options/nav[1]/has-gs-needle</nav-has-gs-needle>
<nav-needles-pivot>/sim/instrument-options/nav[1]/needles-pivot</nav-needles-pivot>

View file

@ -207,7 +207,7 @@
<value type="bool">true</value>
</enable>
<input>
<prop>/instrumentation/nav/gs-needle-deflection</prop>
<prop>/instrumentation/nav/gs-needle-deflection-norm</prop>
</input>
<reference>
<value>0.0</value>

View file

@ -205,7 +205,7 @@ Started October 23 2001 by John Check, fgpanels@rockfish.net
to override the ones that are in the .nas file.-->
<script><![CDATA[
headingNeedleDeflection = "/instrumentation/nav/heading-needle-deflection";
gsNeedleDeflection = "/instrumentation/nav/gs-needle-deflection";
gsNeedleDeflection = "/instrumentation/nav/gs-needle-deflection-norm";
staticPressure = "systems/static/pressure-inhg";
]]>
</script>