|
From: <fli...@li...> - 2017-10-17 21:35:11
|
Revision: 3053
http://sourceforge.net/p/flightgear/fgaddon/3053
Author: lbrenta
Date: 2017-10-17 21:35:09 +0000 (Tue, 17 Oct 2017)
Log Message:
-----------
CitationX: add weight and speed limits. The speed limits change with altitude.
Modified Paths:
--------------
trunk/Aircraft/CitationX/CitationX-set.xml
trunk/Aircraft/CitationX/Nasal/CitationX.nas
Modified: trunk/Aircraft/CitationX/CitationX-set.xml
===================================================================
--- trunk/Aircraft/CitationX/CitationX-set.xml 2017-10-16 00:29:41 UTC (rev 3052)
+++ trunk/Aircraft/CitationX/CitationX-set.xml 2017-10-17 21:35:09 UTC (rev 3053)
@@ -738,6 +738,7 @@
<file>Aircraft/CitationX/Nasal/CitationX.nas</file>
<file>Aircraft/CitationX/Nasal/Electrical.nas</file>
<file>Aircraft/CitationX/Nasal/flightdirector.nas</file>
+ <file>Aircraft/Generic/limits.nas</file>
</citation>
<dialogs>
<file>Aircraft/CitationX/Nasal/dialogs.nas</file>
@@ -744,4 +745,30 @@
</dialogs>
</nasal>
+ <limits>
+ <!-- http://www.smartcockpit.com/docs/CESSNA_Citation_X-Limitations.pdf -->
+ <mass-and-balance>
+ <maximum-takeoff-mass-lbs type="double">36100</maximum-takeoff-mass-lbs>
+ <maximum-landing-mass-lbs type="double">31800</maximum-landing-mass-lbs>
+ </mass-and-balance>
+ <max-flap-extension-speed>
+ <flaps type="double">0.142</flaps> <!-- 0, slats, flaps 5 -->
+ <speed type="double">250</speed>
+ </max-flap-extension-speed>
+ <max-flap-extension-speed>
+ <flaps type="double">0.428</flaps> <!-- flaps 15 -->
+ <speed type="double">210</speed>
+ </max-flap-extension-speed>
+ <max-flap-extension-speed>
+ <flaps type="double">1.0</flaps> <!-- flaps 35 -->
+ <speed type="double">180</speed>
+ </max-flap-extension-speed>
+ <max-gear-extension-speed type="double">250</max-gear-extension-speed>
+ <max-negative-g type="double">-1.00</max-negative-g> <!-- -0.0 if flaps or slats down -->
+ <max-positive-g type="double">2.7</max-positive-g> <!-- 2.0 if flaps or slats down -->
+ <vne type="double">270</vne> <!-- indicated airspeed in knots; 350 above 8000 ft -->
+ <message-inhibited type="bool">0</message-inhibited>
+ <mmo type="double">0.92</mmo>
+ </limits>
+
</PropertyList>
Modified: trunk/Aircraft/CitationX/Nasal/CitationX.nas
===================================================================
--- trunk/Aircraft/CitationX/Nasal/CitationX.nas 2017-10-16 00:29:41 UTC (rev 3052)
+++ trunk/Aircraft/CitationX/Nasal/CitationX.nas 2017-10-17 21:35:09 UTC (rev 3053)
@@ -286,6 +286,10 @@
########## MAIN ##############
+var message_inhibited_node = props.globals.getNode ("limits/message-inhibited");
+var indicated_alt_node = props.globals.getNode ("instrumentation/altimeter/indicated-altitude-ft");
+var vne_node = props.globals.getNode ("limits/vne");
+
var update_systems = func{
LHeng.update();
RHeng.update();
@@ -302,5 +306,13 @@
var str=-(rudder_pos*wspd);
setprop("/controls/gear/steering",str);
+
+ vne_node.setValue (indicated_alt_node.getValue () > 8000 ? 350 : 270);
+ if (getprop ("velocities/mach") > getprop ("limits/mmo")
+ and ! message_inhibited_node.getBoolValue()) {
+ screen.log.write ("Mach number exceeds Mmo!");
+ message_inhibited_node.setBoolValue (1);
+ settimer (func () { message_inhibited_node.setBoolValue (0); }, 10);
+ }
settimer(update_systems,0);
}
|