Hi!

According to 
http://www.pprune.org/forums/archive/index.php/t-166572.html
http://www.airweb.faa.gov/Regulatory_and_Guidance_Library/rgMakeModel.nsf/0/4bd70d173cbc5f4586256fb80048f054/$FILE/A24CE.pdf
and others at google's discretion the b1900d is restricted to a
Vmo=248KIAS and a Mmo of 0.48 at an, allegedly, pressure altitude of
13200ft or above. That restriction is "somehow" displayed by the barber
pole in the airspeed indicator. Short of knowing (despite some search)
how the asi works to that effect I suggest something like the patch
attached.

The change in the asi300gauge.ac would reset the barber pole to start
from a position where its lower edge meets the upper one of the airspeed
needle. That allows for it to be driven through the illinear scaling of 
the modelled asi mimicking the airspeed needle animation.

I have cutoff its movement at an arbitrary 178(KIAS), as that would be
way beyond any specified operating limits.

The calculation itself is a bit messy. I think the changeover point is
a made up reference to essentially construe a meaning of
limit=min(Vmo,Mmo). Apparently the equality would be at that pressure 
altitude in ISA standard day conditions, but could shift somewhat as the
speed of sound isn't dependent on the pressure itself alone. I decided
to stick to that published pressure alt restriction until I know 
positively otherwise.

As the indicated-speed-kt property is calculated from the density of
the air (thus including temperature), side-slip, pressure etc. which I
think would also define the mach number to compare against, I avoided the
real calculation steps and just took it as a reference to "somehow"
arrive at a value for representing the Mach 0.48 in the KIAS scale. Any
noise at low speeds/altitudes can be written off following the sticking
to the mentioned changeover criterium. That should also minimize the
computing effort needed every frame.

The same is perhaps true for not overwriting the property with the Vmo
every frame. Yeah I know, don't speculatively optimize without
profiling. I plead guilty on infringing that one; please change as you
see fit.

HTH
K. Hoercher
diff --git a/Instruments/asi300.xml b/Instruments/asi300.xml
index d848d8d..546aa9f 100644
--- a/Instruments/asi300.xml
+++ b/Instruments/asi300.xml
@@ -31,6 +31,23 @@
 
     <animation>
         <type>rotate</type>
+        <object-name>ASI.needle.001</object-name>
+        
<property>/instrumentation/airspeed-indicator/limit-indicated-speed-kt</property>
+        <interpolation>
+           <entry><ind>0.0</ind><dep>178.0</dep></entry>
+            <entry><ind>170.0</ind><dep>178.0</dep></entry>
+            <entry><ind>240.0</ind><dep>268.0</dep></entry>
+            <entry><ind>300.0</ind><dep>333.0</dep></entry>
+        </interpolation>
+        <axis>
+            <x>-1.0</x>
+            <y>0.0</y>
+            <z>0.0</z>
+        </axis>
+    </animation>
+
+    <animation>
+        <type>rotate</type>
         <object-name>ASI.needle</object-name>
         
<property>/instrumentation/airspeed-indicator/indicated-speed-kt</property>
         <interpolation>
diff --git a/Instruments/asi300gauge.ac b/Instruments/asi300gauge.ac
index 3cdca1b..af1287c 100644
--- a/Instruments/asi300gauge.ac
+++ b/Instruments/asi300gauge.ac
@@ -9,18 +9,18 @@ texture "asi300.rgb"
 texrep 1 1
 crease 30
 numvert 12
-0.002238 0.001557 0.003006
-0.002238 0.003459 0.000672
-0.002238 0.002921 -0.001971
-0.002238 0.000672 -0.003459
-0.002238 -0.001971 -0.002921
-0.002238 -0.003459 -0.000672
-0.002238 -0.002921 0.001971
-0.002238 -0.000258 0.003375
-0.002238 -0.000271 -0.011011
-0.002238 -0.004056 -0.010241
-0.002238 0.005449 0.022667
-0.002238 0.005061 0.028952
+0.002238 0.003188 -0.001138
+0.002238 0.001132 -0.003337
+0.002238 -0.001559 -0.00316
+0.002238 -0.003337 -0.001132
+0.002238 -0.00316 0.001559
+0.002238 -0.001132 0.003337
+0.002238 0.001559 0.00316
+0.002238 0.003309 0.00071
+0.002238 -0.010947 -0.001215
+0.002238 -0.010694 0.002639
+0.002238 0.023194 -0.002345
+0.002238 0.02937 -0.001114
 numsurf 5
 SURF 0x10
 mat 0
diff --git a/Nasal/systems.nas b/Nasal/systems.nas
index 6534752..a11ec6b 100644
--- a/Nasal/systems.nas
+++ b/Nasal/systems.nas
@@ -22,6 +22,27 @@ var MB = 
props.globals.getNode("/instrumentation/altimeter/millibars",1);
 var FHmeter = aircraft.timer.new("/instrumentation/clock/flight-meter-sec", 
10);
 FHmeter.stop();
 
+#http://www.pprune.org/forums/archive/index.php/t-166572.html
+#http://www.airweb.faa.gov/Regulatory_and_Guidance_Library/rgMakeModel.nsf/0/4bd70d173cbc5f4586256fb80048f054/$FILE/A24CE.pdf
+var LIMIT_VIAS=248.0;
+var LIMIT_MACH=0.48;
+var LIMIT_CHANGE=13200.0;
+var CURR_HP_NODEP="instrumentation/altimeter/pressure-alt-ft";
+var CURR_KIAS_NODEP="instrumentation/airspeed-indicator/indicated-speed-kt";
+var CURR_MACH_NODEP="velocities/mach";
+var 
CURR_LIMIT_NODEP="instrumentation/airspeed-indicator/limit-indicated-speed-kt";
+props.globals.getNode(CURR_LIMIT_NODEP,1).setValue(LIMIT_VIAS);
+
+var set_barber_pole = func {
+  if (getprop(CURR_HP_NODEP)>LIMIT_CHANGE) {
+    
setprop(CURR_LIMIT_NODEP,getprop(CURR_KIAS_NODEP)/getprop(CURR_MACH_NODEP)*LIMIT_MACH);
+  } else {
+    if (!(getprop(CURR_LIMIT_NODEP)==LIMIT_VIAS))
+      setprop(CURR_LIMIT_NODEP,LIMIT_VIAS);
+  }
+  settimer(set_barber_pole,0);
+}
+
 setlistener("/sim/signals/fdm-initialized", func {
     S_volume.setValue(0.3);
     C_volume.setValue(0.3);
@@ -29,6 +50,7 @@ setlistener("/sim/signals/fdm-initialized", func {
     
fuel_density=props.globals.getNode("consumables/fuel/tank[0]/density-ppg").getValue();
     setprop("/instrumentation/heading-indicator/offset-deg",-1 * 
getprop("/environment/magnetic-variation-deg"));
     setprop("/instrumentation/clock/flight-meter-hour",0);
+    set_barber_pole();
     print("system  ...Check");
     setprop("controls/engines/engine/condition",0);
     setprop("controls/engines/engine[1]/condition",0);
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to