Hi, Attached: .diff file made from $FGROOT/Aircraft/A-10 .tgz with new tutorial made from $FGROOT/Aircraft/A-10 too.
Description: New engines start tutorial, changes on engines gauges. Thanks for commiting, Alexis
A-10-new-tuto-20070515.tgz
Description: application/compressed-tar
Index: A-10-set.xml
===================================================================
RCS file: /var/cvs/FlightGear-0.9/data/Aircraft/A-10/A-10-set.xml,v
retrieving revision 1.13
diff -u -p -p -r1.13 A-10-set.xml
--- A-10-set.xml 13 May 2007 17:29:51 -0000 1.13
+++ A-10-set.xml 15 May 2007 15:00:30 -0000
@@ -31,6 +31,10 @@ Fairchild A-10 simulation config.
<virtual-cockpit archive="y">false</virtual-cockpit>
<chase-distance-m type="double"
archive="y">-30.0</chase-distance-m>
+ <tutorials>
+ <tutorial include="Tutorials/startup_tutorial.xml"/>
+ </tutorials>
+
<view n="0">
<name>Cockpit View</name>
<type>lookfrom</type>
@@ -208,6 +212,9 @@ Fairchild A-10 simulation config.
</fuel>
</consumables>
<controls>
+ <APU>
+ <off-start-switch
type="int">0</off-start-switch>
+ </APU>
<canopy>
<canopy-switch
type="int">2</canopy-switch>
</canopy>
@@ -241,13 +248,16 @@ Fairchild A-10 simulation config.
</lighting>
</controls>
<engines>
- <initial-start-state
type="bool">false</initial-start-state> <!-- sim value -->
<eng-start-cycle
type="bool">false</eng-start-cycle> <!-- warn-panel model value -->
<engine n="0">
<running type="bool">0</running>
+ <n1 type="float">0.0</n1>
+ <start-state
type="float">0.0</start-state>
</engine>
<engine n="1">
<running type="bool">0</running>
+ <n1 type="float">0.0</n1>
+ <start-state
type="float">0.0</start-state>
</engine>
</engines>
<A-10-nav>
@@ -295,6 +305,13 @@ Fairchild A-10 simulation config.
<master-caution
type="bool">false</master-caution>
</warnings>
</instrumentation>
+ <systems>
+ <apu>
+ <start-state
type="float">0</start-state>
+ <rpm type="float">0</rpm>
+ <temp type="float">0</temp>
+ </apu>
+ </systems>
</A-10>
</model>
@@ -542,12 +559,6 @@ Fairchild A-10 simulation config.
</canopy>
<systems>
- <!-- APU -->
- <apu>
- <start-state type="float">0</start-state>
- <rpm type="float">0</rpm>
- <temp type="float">0</temp>
- </apu>
<!-- hydraulic system -->
<A-10-hydraulics>
<l-hyd-res type="float">1</l-hyd-res>
@@ -680,9 +691,6 @@ Fairchild A-10 simulation config.
<engines>
<file>Aircraft/A-10/Nasal/engines.nas</file>
</engines>
- <radar>
- <file>Aircraft/A-10/Nasal/radar.nas</file>
- </radar>
<pilot-g>
<file>Aircraft/A-10/Nasal/pilot-g.nas</file>
</pilot-g>
Index: Models/A-10-engines-gauges.xml
===================================================================
RCS file:
/var/cvs/FlightGear-0.9/data/Aircraft/A-10/Models/A-10-engines-gauges.xml,v
retrieving revision 1.3
diff -u -p -p -r1.3 A-10-engines-gauges.xml
--- Models/A-10-engines-gauges.xml 5 Dec 2006 20:55:41 -0000 1.3
+++ Models/A-10-engines-gauges.xml 15 May 2007 15:01:18 -0000
@@ -55,11 +55,11 @@
<name>fan-percent-l</name>
<type>rotate</type>
<object-name>needle-fan-l</object-name>
- <property>engines/engine[0]/n1</property>
+ <property>sim/model/A-10/engines/engine[0]/n1</property>
<interpolation>
<entry><ind>0</ind><dep>28</dep></entry><!--0%-->
<entry><ind>73.6</ind><dep>76</dep></entry><!--iddle-->
- <entry><ind>102</ind><dep>340</dep></entry>
+ <entry><ind>102</ind><dep>345</dep></entry>
</interpolation>
<center>
<x-m>0.0047</x-m>
@@ -76,11 +76,11 @@
<name>fan-percent-r</name>
<type>rotate</type>
<object-name>needle-fan-r</object-name>
- <property>engines/engine[1]/n1</property>
+ <property>sim/model/A-10/engines/engine[1]/n1</property>
<interpolation>
<entry><ind>0</ind><dep>28</dep></entry><!--0%-->
<entry><ind>73.6</ind><dep>76</dep></entry><!--iddle-->
- <entry><ind>102</ind><dep>340</dep></entry>
+ <entry><ind>102</ind><dep>345</dep></entry>
</interpolation>
<center>
<x-m>0.0047</x-m>
@@ -100,7 +100,7 @@
<name>core-rpm-l</name>
<type>rotate</type>
<object-name>needle-core-l</object-name>
- <property>engines/engine[0]/n1</property>
+ <property>sim/model/A-10/engines/engine[0]/n1</property>
<interpolation>
<entry><ind>0.0000</ind><dep>0</dep></entry><!--0-->
<entry><ind>56.000</ind><dep>133</dep></entry><!--iddle-->
@@ -122,7 +122,7 @@
<name>core-rpm-r</name>
<type>rotate</type>
<object-name>needle-core-r</object-name>
- <property>engines/engine[1]/n1</property>
+ <property>sim/model/A-10/engines/engine[1]/n1</property>
<interpolation>
<entry><ind>0.0000</ind><dep>0</dep></entry><!--0-->
<entry><ind>56.000</ind><dep>133</dep></entry><!--iddle-->
@@ -245,7 +245,7 @@
<name>apu-temp</name>
<type>rotate</type>
<object-name>needle-apu-egt</object-name>
- <property>systems/apu/temp</property>
+ <property>sim/model/A-10/systems/apu/temp</property>
<interpolation>
<entry><ind>0.0000</ind><dep>93</dep></entry><!--0-->
<entry><ind>1000</ind><dep>347</dep></entry><!--1000-->
@@ -268,7 +268,7 @@
<name>apu-rpm</name>
<type>rotate</type>
<object-name>needle-apu-rpm</object-name>
- <property>systems/apu/rpm</property>
+ <property>sim/model/A-10/systems/apu/rpm</property>
<interpolation>
<entry><ind>0.0000</ind><dep>91</dep></entry><!--0-->
<entry><ind>120</ind><dep>345</dep></entry><!--max thrust-->
Index: Models/A-10-model.xml
===================================================================
RCS file: /var/cvs/FlightGear-0.9/data/Aircraft/A-10/Models/A-10-model.xml,v
retrieving revision 1.14
diff -u -p -p -r1.14 A-10-model.xml
--- Models/A-10-model.xml 13 May 2007 17:29:51 -0000 1.14
+++ Models/A-10-model.xml 15 May 2007 15:01:41 -0000
@@ -83,7 +83,12 @@
<pitch-deg>-3</pitch-deg>
<roll-deg>7</roll-deg>
</offsets>
- </model>
+ </model>
+
+ <!-- tutorial marker -->
+ <model>
+ <path>Models/Aircraft/marker.xml</path>
+ </model>
<!-- Cockpit -->
<!-- 3D panels for hot-spots -->
Index: Models/A-10-throttle.xml
===================================================================
RCS file: /var/cvs/FlightGear-0.9/data/Aircraft/A-10/Models/A-10-throttle.xml,v
retrieving revision 1.2
diff -u -p -p -r1.2 A-10-throttle.xml
--- Models/A-10-throttle.xml 5 Dec 2006 20:55:42 -0000 1.2
+++ Models/A-10-throttle.xml 15 May 2007 15:01:49 -0000
@@ -9,7 +9,7 @@
<animation>
<object-name>apu-start-switch</object-name>
<type>rotate</type>
- <property>controls/APU/off-start-switch</property>
+ <property>sim/model/A-10/controls/APU/off-start-switch</property>
<interpolation>
<entry><ind>0</ind><dep>-30</dep></entry>
<entry><ind>1</ind><dep>30</dep></entry>
Index: Models/panel-up.rgb
===================================================================
RCS file: /var/cvs/FlightGear-0.9/data/Aircraft/A-10/Models/panel-up.rgb,v
retrieving revision 1.3
diff -u -p -p -r1.3 panel-up.rgb
Binary files /tmp/cvsl2tX6V and panel-up.rgb differ
Index: Nasal/apu.nas
===================================================================
RCS file: /var/cvs/FlightGear-0.9/data/Aircraft/A-10/Nasal/apu.nas,v
retrieving revision 1.1
diff -u -p -p -r1.1 apu.nas
--- Nasal/apu.nas 26 Jun 2006 18:15:41 -0000 1.1
+++ Nasal/apu.nas 15 May 2007 15:02:38 -0000
@@ -1,80 +1,80 @@
# controls:
-# - controls/APU/off-start-switch
+# - sim/model/A-10/controls/APU/off-start-switch
# - apu's start/stop animation
-# - systems/apu/start-state
-# - system/apu/rpm
-# - system/apu/tmp
+# - sim/model/A-10/systems/apu/start-state
+# - sim/model/A-10/system/apu/rpm
+# - sim/model/A-10/system/apu/tmp
off_start_switch = func {
- input = arg[0];
+ var input = arg[0];
if (input == 1) {
- setprop("controls/APU/off-start-switch", 1);
+ setprop("sim/model/A-10/controls/APU/off-start-switch", 1);
settimer( test_start, 0.5);
}
elsif (input == -1) { test_stop() }
}
test_start = func {
- setprop("controls/APU/off-start-switch", 1);
- volts = getprop("systems/electrical/outputs/apu-starter[0]");
+ setprop("sim/model/A-10/controls/APU/off-start-switch", 1);
+ var volts = getprop("systems/electrical/outputs/apu-starter[0]");
# we need electric power
# we need fuel: L main (aft) tank plus DC pump
# we shouldn't be allready running
if ( volts > 23.0 ) {
- left_main = getprop("consumables/fuel/tank[1]/level-lbs");
- start_state = getprop("systems/apu/start-state");
+ var left_main = getprop("consumables/fuel/tank[1]/level-lbs");
+ var start_state = getprop("sim/model/A-10/systems/apu/start-state");
if (( left_main > 10.0 ) and ( start_state < 1 )) {
- transient_start_seq(0.05, start_state);
+ transient_start_seq(0.08, start_state);
# rpm increase during around 60 sec up to 100%
- rpm = (math.sin( ( start_state * 3 ) + 4.7 )+1) * 48;
- setprop( "systems/apu/rpm", rpm );
- temp = getprop("systems/apu/temp");
+ var rpm = (math.sin( ( start_state * 3 ) + 4.7 )+1) * 48;
+ setprop( "sim/model/A-10/systems/apu/rpm", rpm );
+ temp = getprop("sim/model/A-10/systems/apu/temp");
# temp stabilize after 30 sec around 600°C
if (start_state < 0.52 ) {
- new_temp =
(((atan((start_state*85.5)-9)+(math.sin(start_state*9)*0.39))/4.2)+0.35) * 950;
- setprop("systems/apu/temp", new_temp);
+ var new_temp =
(((atan((start_state*85.5)-9)+(math.sin(start_state*9)*0.39))/4.2)+0.35) * 950;
+ setprop("sim/model/A-10/systems/apu/temp", new_temp);
}
}
}
}
test_stop = func {
- rpm_stop = 1;
- temp_stop = 1;
- setprop("controls/APU/off-start-switch", 0);
- start_state = getprop("systems/apu/start-state");
- temp = getprop("systems/apu/temp");
- rpm = getprop( "systems/apu/rpm");
+ var rpm_stop = 1;
+ var temp_stop = 1;
+ setprop("sim/model/A-10/controls/APU/off-start-switch", 0);
+ start_state = getprop("sim/model/A-10/systems/apu/start-state");
+ var temp = getprop("sim/model/A-10/systems/apu/temp");
+ var rpm = getprop( "sim/model/A-10/systems/apu/rpm");
if ( rpm > 0.3 ) {
- new_rpm = rpm - 0.3;
- setprop( "systems/apu/rpm", new_rpm );
+ var new_rpm = rpm - 0.3;
+ setprop( "sim/model/A-10/systems/apu/rpm", new_rpm );
} else {
rpm_stop = 0;
}
if ( temp > 10 ) {
- new_temp = temp - 0.5;
+ var new_temp = temp - 0.5;
#print("temp = ", temp);
- setprop("systems/apu/temp", new_temp);
+ setprop("sim/model/A-10/systems/apu/temp", new_temp);
} else {
temp_stop = 0;
}
if (temp_stop or rpm_stop) {
transient_stop_seq(0.04);
} else {
- setprop( "systems/apu/start-state", 0 );
+ setprop( "sim/model/A-10/systems/apu/start-state", 0 );
}
}
transient_start_seq = func {
- speed = arg[0];
- start_state = arg[1];
- new_start_state = start_state + 0.004;
- setprop( "systems/apu/start-state", new_start_state );
+ var speed = arg[0];
+ var start_state = arg[1];
+ var new_start_state = start_state + 0.004;
+ setprop( "sim/model/A-10/systems/apu/start-state", new_start_state );
settimer( test_start, speed);
}
transient_stop_seq = func {
- speed = arg[0];
+ var speed = arg[0];
settimer( test_stop, speed);
}
Index: Nasal/electrical.nas
===================================================================
RCS file: /var/cvs/FlightGear-0.9/data/Aircraft/A-10/Nasal/electrical.nas,v
retrieving revision 1.3
diff -u -p -p -r1.3 electrical.nas
--- Nasal/electrical.nas 13 May 2007 09:54:08 -0000 1.3
+++ Nasal/electrical.nas 15 May 2007 15:02:38 -0000
@@ -146,7 +146,7 @@ update_virtual_bus = func( dt ) {
R_gen_volts = alternator.get_output_volts("engines/engine[1]/n1");
} else { R_gen_volts = 0.0; }
if (master_apu) {
- APU_gen_volts = alternator.get_output_volts("systems/apu/rpm");
+ APU_gen_volts =
alternator.get_output_volts("sim/model/A-10/systems/apu/rpm");
} else { APU_gen_volts = 0.0; }
INV_volts = getprop("systems/electrical/inverter-volts");
L_AC_bus_volts = 0.0;
@@ -316,7 +316,7 @@ BATT_bus = func() {
} else {
setprop("systems/electrical/outputs/cabin-lights", 0.0);
}
- if ( getprop("controls/APU/off-start-switch") and
(getprop("systems/apu/start-state") < 1 )) {
+ if ( getprop("sim/model/A-10/controls/APU/off-start-switch") and
(getprop("sim/model/A-10/systems/apu/start-state") < 1 )) {
setprop("systems/electrical/outputs/apu-starter", battery_bus_volts);
} else {
setprop("systems/electrical/outputs/apu-starter", 0.0);
Index: Nasal/engines.nas
===================================================================
RCS file: /var/cvs/FlightGear-0.9/data/Aircraft/A-10/Nasal/engines.nas,v
retrieving revision 1.1
diff -u -p -p -r1.1 engines.nas
--- Nasal/engines.nas 5 Dec 2006 20:55:43 -0000 1.1
+++ Nasal/engines.nas 15 May 2007 15:02:38 -0000
@@ -1,33 +1,85 @@
# starter: 3 positions switch
starter_switch = func {
- input = arg[0];
- position =
"sim/model/A-10/controls/engines/engine["~arg[1]~"]/starter-switch-position";
- starter = "sim/model/A-10/controls/engines/engine["~arg[1]~"]/starter";
- running = "sim/model/A-10/engines/engine["~arg[1]~ "]/running";
- motor = "sim/model/A-10/controls/engines/engine["~arg[1]~"]/motor";
+ var input = arg[0];
+ var eng_num = arg[1];
+ var position =
"sim/model/A-10/controls/engines/engine["~eng_num~"]/starter-switch-position";
+ var starter =
"sim/model/A-10/controls/engines/engine["~eng_num~"]/starter";
+ var running = "sim/model/A-10/engines/engine["~eng_num~ "]/running";
+ var motor = "sim/model/A-10/controls/engines/engine["~eng_num~"]/motor";
if (input == 1) {
if (getprop(position) == 0) {
+ # up to ignition
setprop(position, 1);
setprop(starter, 0);
setprop(running, 0);
setprop(motor, 0)
} elsif (getprop(position) == 1) {
+ # up to ignition
setprop(position, 2);
setprop(starter, 1);
- setprop(running,1);
+ settimer(func {test_start(eng_num)}, 0.5);
setprop(motor, 0);
}
} elsif (input == -1) {
if (getprop(position) == 1) {
+ # down to motor
setprop(position, 0);
setprop(starter, 0);
- setprop(running, 0);
setprop(motor, 1)
} elsif (getprop(position) == 2) {
+ # down to norm
setprop(position, 1);
setprop(starter, 0);
- setprop(running, 0);
setprop(motor, 0);
}
+ test_stop(eng_num);
+ }
+}
+
+test_start = func {
+ var eng_num = arg[0];
+ var speed = 0.03;
+ var volts = getprop("systems/electrical/APU-gen-volts");
+ var left_main = getprop("consumables/fuel/tank[1]/level-lbs");
+ var start_state =
getprop("sim/model/A-10/engines/engine["~eng_num~"]/start-state");
+
+ if (( left_main > 10.0 ) and ( volts > 23.0 )) {
+ if ( start_state < 1 ) {
+ var new_start_state = start_state + 0.004;
+
setprop("sim/model/A-10/engines/engine["~eng_num~"]/start-state",
new_start_state );
+ # rpm increase during around 60 sec up to 100%
+ var rpm = (math.sin( ( start_state * 3 ) + 4.7 )+1) *
30;
+
setprop("sim/model/A-10/engines/engine["~eng_num~"]/n1", rpm);
+ if (( left_main > 10.0 ) and ( start_state > 0.3 )) {
+
setprop("sim/model/A-10/engines/engine["~eng_num~"]/running", 1);
+ }
+ settimer(func {test_start(eng_num)}, speed);
+ } else {
+
setprop("sim/model/A-10/engines/engine["~eng_num~"]/running", 1);
+ }
+ } else {
+
setprop("sim/model/A-10/controls/engines/engine["~eng_num~"]/starter-switch-position",
1);
+ }
+}
+
+test_stop = func {
+ var eng_num = arg[0];
+ var rpm_stop = 1;
+ var speed = 0.1;
+ var start_state =
getprop("sim/model/A-10/engines/engine["~eng_num~"]/start-state");
+ var rpm = getprop("sim/model/A-10/engines/engine["~eng_num~"]/n1");
+ if ( rpm > 0.3 ) {
+ var new_rpm = rpm - 0.3;
+
setprop("sim/model/A-10/engines/engine["~eng_num~"]/n1", new_rpm);
+
setprop("sim/model/A-10/engines/engine["~eng_num~"]/running", 0);
+ } else {
+ rpm_stop = 0;
+ }
+ if (rpm_stop) {
+ settimer(func {test_stop(eng_num)}, speed);
+ } else {
+
setprop("sim/model/A-10/engines/engine["~eng_num~"]/start-state", 0 );
}
}
+
+
Index: Sounds/A-10-sound.xml
===================================================================
RCS file: /var/cvs/FlightGear-0.9/data/Aircraft/A-10/Sounds/A-10-sound.xml,v
retrieving revision 1.6
diff -u -p -p -r1.6 A-10-sound.xml
--- Sounds/A-10-sound.xml 13 May 2007 09:54:08 -0000 1.6
+++ Sounds/A-10-sound.xml 15 May 2007 15:02:38 -0000
@@ -31,7 +31,7 @@
<factor type="double">0.0001</factor>
</volume>
<pitch>
- <property>engines/engine[0]/n1</property>
+ <property>sim/model/A-10/engines/engine[0]/n1</property>
<factor>0.2</factor>
</pitch>
</engine-outside-0>
@@ -58,11 +58,11 @@
</not>
</condition>
<volume>
- <property>engines/engine[0]/n2</property>
+ <property>sim/model/A-10/engines/engine[0]/n1</property>
<factor>0.0005</factor>
</volume>
<pitch>
- <property>engines/engine[0]/n2</property>
+ <property>sim/model/A-10/engines/engine[0]/n1</property>
<factor>0.01</factor>
<offset>0.15</offset>
</pitch>
@@ -94,7 +94,7 @@
<factor type="double">0.0001</factor>
</volume>
<pitch>
- <property>engines/engine[1]/n1</property>
+ <property>sim/model/A-10/engines/engine[1]/n1</property>
<factor>0.2</factor>
</pitch>
</engine-outside-1>
@@ -121,11 +121,11 @@
</not>
</condition>
<volume>
- <property>engines/engine[1]/n2</property>
+ <property>sim/model/A-10/engines/engine[1]/n1</property>
<factor>0.0005</factor>
</volume>
<pitch>
- <property>engines/engine[1]/n2</property>
+ <property>sim/model/A-10/engines/engine[1]/n1</property>
<factor>0.01</factor>
<offset>0.15</offset>
</pitch>
@@ -154,7 +154,7 @@
<factor type="double">0.00006</factor>
</volume>
<pitch>
- <property>engines/engine[0]/n1</property>
+ <property>sim/model/A-10/engines/engine[0]/n1</property>
<factor>0.2</factor>
</pitch>
</engine-inside-0>
@@ -177,11 +177,11 @@
</less-than-equals>
</condition>
<volume>
- <property>engines/engine[0]/n2</property>
+ <property>sim/model/A-10/engines/engine[0]/n1</property>
<factor>0.0001</factor>
</volume>
<pitch>
- <property>engines/engine[0]/n2</property>
+ <property>sim/model/A-10/engines/engine[0]/n1</property>
<factor>0.01</factor>
<offset>0.15</offset>
</pitch>
@@ -209,7 +209,7 @@
<factor type="double">0.00006</factor>
</volume>
<pitch>
- <property>engines/engine[1]/n1</property>
+ <property>sim/model/A-10/engines/engine[1]/n1</property>
<factor>0.16</factor>
</pitch>
</engine-inside-1>
@@ -232,11 +232,11 @@
</less-than-equals>
</condition>
<volume>
- <property>engines/engine[1]/n2</property>
+ <property>sim/model/A-10/engines/engine[1]/n1</property>
<factor>0.00025</factor>
</volume>
<pitch>
- <property>engines/engine[1]/n2</property>
+ <property>sim/model/A-10/engines/engine[1]/n1</property>
<factor>0.01</factor>
<offset>0.15</offset>
</pitch>
@@ -253,17 +253,17 @@
<value>0</value>
</equals>
<greater-than>
- <property>systems/apu/rpm[0]</property>
+ <property>sim/model/A-10/systems/apu/rpm[0]</property>
<value>0</value>
</greater-than>
</condition>
<volume>
- <property>systems/apu/rpm[0]</property>
+ <property>sim/model/A-10/systems/apu/rpm[0]</property>
<factor>0.0005</factor>
<offset>0.15</offset>
</volume>
<pitch>
- <property>systems/apu/rpm[0]</property>
+ <property>sim/model/A-10/systems/apu/rpm[0]</property>
<factor>0.01</factor>
<offset>0.15</offset>
</pitch>
@@ -675,7 +675,7 @@
<mode>once</mode>
<path>Aircraft/A-10/Sounds/click.wav</path>
<condition>
- <property>controls/APU/off-start-switch</property>
+ <property>sim/model/A-10/controls/APU/off-start-switch</property>
</condition>
<volume>
<factor>0.3</factor>
@@ -687,7 +687,7 @@
<path>Aircraft/A-10/Sounds/click.wav</path>
<condition>
<not>
- <property>controls/APU/off-start-switch</property>
+ <property>sim/model/A-10/controls/APU/off-start-switch</property>
</not>
</condition>
<volume>
------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/
_______________________________________________ Flightgear-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/flightgear-devel

