Board index FlightGear Development Aircraft

C-130

Questions and discussion about creating aircraft. Flight dynamics, 3d models, cockpits, systems, animation, textures.

C-130

Postby glazmax » Fri Jun 25, 2010 12:54 pm

Hi, I've fideled around with the FDM and tuned it a bit more, here is the result:

Code: Select all
<?xml version="1.0" encoding="UTF-8"?>

<!--  C130-H YASim config. - 2008 Emmanuel BARANGER
                             2010 updated by Jettoo

      Source    : http://en.wikipedia.org/wiki/C-130_Hercules

      Envergure : 40.4 m (132 ft 7 in)
      Longueur  : 29.8 m (97 ft 9 in)
      Hauteur   : 11.6 m (38 ft 3 in)
      Poids vide: 34600 kg (76120 lbs)
      Moteurs   : 4 Allison T56-A-15 turboprops 4591 CV, 13820 RPM, 1940 lb (880 kg)
      Helices   : Hamilton Standard 43E60-6901A (1074 lbs)
      Vitesse   : 644 km/h (348 kts)
-->
<airplane mass="76120">

  <!-- Configuration d'approche -->
  <approach speed="123" aoa="3.0" fuel="1.0">
    <control-setting axis="/controls/engines/engine[0]/throttle" value="0.3"/>
    <control-setting axis="/controls/engines/engine[1]/throttle" value="0.3"/>
    <control-setting axis="/controls/engines/engine[2]/throttle" value="0.3"/>
    <control-setting axis="/controls/engines/engine[3]/throttle" value="0.3"/>
    <control-setting axis="/controls/engines/engine[0]/propeller-pitch" value="1.0"/>
    <control-setting axis="/controls/engines/engine[1]/propeller-pitch" value="1.0"/>
    <control-setting axis="/controls/engines/engine[2]/propeller-pitch" value="1.0"/>
    <control-setting axis="/controls/engines/engine[3]/propeller-pitch" value="1.0"/>
    <control-setting axis="/controls/flight/flaps" value="0.7"/>
    <control-setting axis="/controls/gear/gear-down" value="1"/>
  </approach>

  <!-- Configuration de croisiere -->
  <cruise speed="348" alt="28000" fuel="0.7">
    <control-setting axis="/controls/engines/engine[0]/throttle" value="0.7"/>
    <control-setting axis="/controls/engines/engine[1]/throttle" value="0.7"/>
    <control-setting axis="/controls/engines/engine[2]/throttle" value="0.7"/>
    <control-setting axis="/controls/engines/engine[3]/throttle" value="0.7"/>
    <control-setting axis="/controls/engines/engine[0]/propeller-pitch" value="0.8"/>
    <control-setting axis="/controls/engines/engine[1]/propeller-pitch" value="0.8"/>
    <control-setting axis="/controls/engines/engine[2]/propeller-pitch" value="0.8"/>
    <control-setting axis="/controls/engines/engine[3]/propeller-pitch" value="0.8"/>
    <control-setting axis="/controls/flight/flaps" value="0.0"/>
    <control-setting axis="/controls/gear/gear-down" value="0"/>
  </cruise>

  <cockpit x="10.333" y="0.598" z="3.005"/>

  <!-- Fuselage -->

  <fuselage ax="13.224" ay="0" az="1.23" bx="11.80" by="0" bz="1.23" width="2.00" taper="0.40" midpoint="1.00"/>
  <fuselage ax="12.00" ay="0" az="1.12" bx="8.90" by="0" bz="2.02" width="4.36" taper="0.42" midpoint="1.00"/>
  <fuselage ax="9.50" ay="0" az="2.05" bx="-4.10" by="0" bz="2.05" width="4.304" taper="1.00" midpoint="1.00"/>
  <fuselage ax="-3.80" ay="0" az="2.05" bx="-11.50" by="0" bz="3.50" width="4.304" taper="0.3" midpoint="0.00"/>
  <fuselage ax="-11.50" ay="0" az="3.50" bx="-16.414" by="0" bz="4.175" width="1.30" taper="0.1" midpoint="0.00"/>

  <!-- engines -->
  <fuselage ax="3.533" ay="9.821" az="3.725" bx="-1.427" by="9.821" bz="3.725" width="1.05" taper="0.60" midpoint="0.15"/>

  <fuselage ax="3.533" ay="4.929" az="3.725" bx="-1.427" by="4.929" bz="3.725" width="1.05" taper="0.60" midpoint="0.15"/>

  <fuselage ax="3.533" ay="-4.929" az="3.725" bx="-1.427" by="-4.929" bz="3.725" width="1.05" taper="0.60" midpoint="0.15"/>

  <fuselage ax="3.533" ay="-9.821" az="3.725" bx="-1.427" by="-9.821" bz="3.725" width="1.05" taper="0.60" midpoint="0.15"/>

  <!-- fuel tank -->
  <fuselage ax="2.910" ay="7.695" az="2.172" bx="-4.795" by="7.695" bz="2.172" width="1.1" taper="0.60" midpoint="0.15"/>

  <fuselage ax="2.910" ay="-7.695" az="2.172" bx="-4.795" by="-7.695" bz="2.172" width="1.1" taper="0.60" midpoint="0.15"/>

  <!-- Ailes taper 0.85, twist 3-->
  <wing x="-1.486" y="1.240" z="3.660"
        chord="5.201"
        length="18.9"
        taper="0.565"
        camber="0.18"
        sweep="-1.7"
        dihedral="2.5"
   twist="-3.0">
        <stall aoa="16.0" width="5" peak="1.3"/>
        <flap0 start="0.048" end="0.679" lift="1.52" drag="1.63"/>
        <flap1 start="0.679" end="0.990" lift="1.27" drag="1.35"/>

        <control-input axis="/controls/flight/flaps" control="FLAP0"/>
        <control-input axis="/controls/flight/aileron" control="FLAP1" split="true"/>
        <control-input axis="/controls/flight/aileron-trim" control="FLAP1" split="true"/>
 
        <control-output control="FLAP0" prop="/surface-positions/flap-pos-norm"/>

        <control-output control="FLAP1" side="left" prop="/surface-positions/left-aileron-pos-norm"/>
        <control-output control="FLAP1" side="right" prop="/surface-positions/right-aileron-pos-norm"/>

        <control-speed control="FLAP0" transition-time="15"/>
        <control-speed control="FLAP1" transition-time="1.0"/>
  </wing>

  <!-- Gouverne de profondeur -->
  <hstab x="-12.648" y="0.370" z="4.090"
         chord="4.494"
         length="7.5"
         taper="0.43"
         sweep="5">
         <stall aoa="20.0" width="4" peak="1.5"/>
         <flap0 start="0" end="1" lift="1.53" drag="1.53"/>

         <control-input axis="/controls/flight/elevator" control="FLAP0"/>
         <control-input axis="/controls/flight/elevator-trim" control="FLAP0"/>

         <control-output control="FLAP0" side="left" prop="/surface-positions/elevator-pos-norm"/>

         <control-speed control="FLAP0" transition-time="2.5"/>
  </hstab>

  <!-- Gouverne de direction -->
  <vstab x="-12.181" y="0" z="4.296"
         chord="5.776"
         length="6.704"
         taper="0.32"
         sweep="8">
         <stall aoa="16.0" width="4" peak="1.5"/>
         <flap0 start="0" end="1" lift="1.5" drag="1.5"/>

         <control-input axis="/controls/flight/rudder" control="FLAP0" effectiveness="1.0" invert="true"/>
         <control-input axis="/controls/flight/rudder-trim" control="FLAP0" invert="true"/>

         <control-output control="FLAP0" prop="/surface-positions/rudder-pos-norm"/>

        <control-speed control="FLAP0" transition-time="2.0"/>
  </vstab>

  <!-- Sources : http://en.wikipedia.org/wiki/Allison_T56

       Engines   : Allison T56
       Type      : Turboprop
       Power     : 5565 ch
       Masse     : 1940 lb (880 kg)
       RPM       : 2400 - 2600

       Propeller : Hamilton Standard 43E60-6901A (1074 lbs)

       engine + propeller = 1940 + 1074 = 3014
  -->

  <!-- Exterieur gauche -->
  <propeller x="2.22" y="9.821" z="3.307"
             mass="3014"
             moment="110"
             radius="2.8"
             cruise-speed="300"
             cruise-rpm="920"
             cruise-power="4500"
             cruise-alt="25000"
             min-rpm="220"
             max-rpm="1020">
             <actionpt x="3.764" y="9.821" z="3.622"/>
             <control-input axis="/controls/engines/engine[0]/propeller-pitch" control="ADVANCE"/>
             <turbine-engine eng-power="5565"
                             eng-rpm="1020"
                             alt="28000"
                             flat-rating="4150"
                             min-n2="70"
                             max-n2="100">
                             <control-input axis="/controls/engines/engine[0]/throttle" control="THROTTLE"/>
                             <control-input axis="/controls/engines/engine[0]/starter" control="STARTER"/>
                             <control-input axis="/controls/engines/engine[0]/magnetos" control="MAGNETOS"/>
                             <control-input axis="/controls/engines/engine[0]/boost" control="BOOST"/>
             </turbine-engine>
  </propeller>

  <!-- Interieur gauche -->
  <propeller x="2.22" y="4.929" z="3.307"
             mass="3014"
             moment="110"
             radius="2.8"
             cruise-speed="300"
             cruise-rpm="920"
             cruise-power="4500"
             cruise-alt="25000"
             min-rpm="220"
             max-rpm="1020">
             <actionpt x="3.764" y="4.926" z="3.622"/>
             <control-input axis="/controls/engines/engine[1]/propeller-pitch" control="ADVANCE"/>
             <turbine-engine eng-power="5565"
                             eng-rpm="1020"
                             alt="28000"
                             flat-rating="4150"
                             min-n2="70"
                             max-n2="100">
                             <control-input axis="/controls/engines/engine[1]/throttle" control="THROTTLE"/>
                             <control-input axis="/controls/engines/engine[1]/starter" control="STARTER"/>
                             <control-input axis="/controls/engines/engine[1]/magnetos" control="MAGNETOS"/>
                             <control-input axis="/controls/engines/engine[1]/boost" control="BOOST"/>
             </turbine-engine>
  </propeller>

  <!-- Interieur droit -->
  <propeller x="2.22" y="-4.929" z="3.307"
             mass="3014"
             moment="110"
             radius="2.8"
             cruise-speed="300"
             cruise-rpm="920"
             cruise-power="4500"
             cruise-alt="25000"
             min-rpm="220"
             max-rpm="1020">
             <actionpt x="3.764" y="-4.926" z="3.622"/>
             <control-input axis="/controls/engines/engine[2]/propeller-pitch" control="ADVANCE"/>
             <turbine-engine eng-power="5565"
                             eng-rpm="1020"
                             alt="28000"
                             flat-rating="4150"
                             min-n2="70"
                             max-n2="100">
                             <control-input axis="/controls/engines/engine[2]/throttle" control="THROTTLE"/>
                             <control-input axis="/controls/engines/engine[2]/starter" control="STARTER"/>
                             <control-input axis="/controls/engines/engine[2]/magnetos" control="MAGNETOS"/>
                             <control-input axis="/controls/engines/engine[2]/boost" control="BOOST"/>
             </turbine-engine>
  </propeller>

  <!-- Exterieur droit -->
  <propeller x="2.22" y="-9.821" z="3.307"
             mass="3014"
             moment="110"
             radius="2.8"
             cruise-speed="300"
             cruise-rpm="920"
             cruise-power="4500"
             cruise-alt="25000"
             min-rpm="220"
             max-rpm="1020">
             <actionpt x="3.764" y="-9.821" z="3.622"/>
             <control-input axis="/controls/engines/engine[3]/propeller-pitch" control="ADVANCE"/>
             <turbine-engine eng-power="4591"
                             eng-rpm="1020"
                             alt="28000"
                             flat-rating="4150"
                             min-n2="70"
                             max-n2="100">
                             <control-input axis="/controls/engines/engine[3]/throttle" control="THROTTLE"/>
                             <control-input axis="/controls/engines/engine[3]/starter" control="STARTER"/>
                             <control-input axis="/controls/engines/engine[3]/magnetos" control="MAGNETOS"/>
                             <control-input axis="/controls/engines/engine[3]/boost" control="BOOST"/>
             </turbine-engine>
  </propeller>
 
  <!-- trusters for reverse -->
  <thruster x="3.764" y="4.929" z="3.307" vx="-1" vy="0" vz="0" thrust="15000">
    <control-input axis="/controls/engines/engine[0]/reverser" control="THROTTLE"
      src0="0" src1="1" dst0="0" dst1="1"/>
  </thruster>
    <thruster x="3.764" y="-4.929" z="3.307" vx="-1" vy="0" vz="0" thrust="15000">
    <control-input axis="/controls/engines/engine[0]/reverser" control="THROTTLE"
      src0="0" src1="1" dst0="0" dst1="1"/>
  </thruster>
 

  <!-- Poition des roues au sol -->
  <!-- Nez -->
  <gear x="9.511" y="0" z="-0.878"
        retract-time="7"
        compression="0.45"
        spring="0.78"
   damp="1.35">

        <control-input axis="/controls/flight/rudder" control="STEER" square="true"/>
        <control-input axis="/controls/gear/gear-down" control="EXTEND"/>
        <control-output control="STEER" prop="/gear/gear[0]/steering-norm"/>
        <control-output control="EXTEND" prop="/gear/gear[0]/position-norm"/>
        <control-speed control="EXTEND" transition-time="7"/>
  </gear>


  <!-- Gauche avant -->
  <gear x="0.831" y="2.125" z="-0.896"
        retract-time="7"
        compression="0.45"
        spring="0.80"
   damp="1.10">
        <control-input axis="/controls/gear/brake-left" control="BRAKE"/>
        <control-input axis="/controls/gear/brake-parking" control="BRAKE"/>
        <control-input axis="/controls/gear/gear-down" control="EXTEND"/>
        <control-output control="EXTEND" prop="/gear/gear[1]/position-norm"/>
        <control-speed control="EXTEND" transition-time="10"/>
  </gear>

  <!-- Droite avant -->
  <gear x="0.831" y="-2.125" z="-0.896"
        retract-time="7"
        compression="0.45"
        spring="0.80"
   damp="1.10">
        <control-input axis="/controls/gear/brake-right" control="BRAKE"/>
        <control-input axis="/controls/gear/brake-parking" control="BRAKE"/>
        <control-input axis="/controls/gear/gear-down" control="EXTEND"/>
        <control-output control="EXTEND" prop="/gear/gear[2]/position-norm"/>
        <control-speed control="EXTEND" transition-time="10"/>
  </gear>

  <!-- Gauche arriere -->
  <gear x="-0.702" y="2.125" z="-0.896"
        retract-time="7"
        compression="0.35"
        spring="1.40"
   damp="1.23">
        <control-input axis="/controls/gear/brake-left" control="BRAKE"/>
        <control-input axis="/controls/gear/brake-parking" control="BRAKE"/>
        <control-input axis="/controls/gear/gear-down" control="EXTEND"/>
        <control-output control="EXTEND" prop="/gear/gear[3]/position-norm"/>
        <control-speed control="EXTEND" transition-time="10"/>
  </gear>

  <!-- Droite arriere -->
  <gear x="-0.702" y="-2.125" z="-0.896"
        retract-time="7"
        compression="0.35"
        spring="1.40"
   damp="1.23">
        <control-input axis="/controls/gear/brake-right" control="BRAKE"/>
        <control-input axis="/controls/gear/brake-parking" control="BRAKE"/>
        <control-input axis="/controls/gear/gear-down" control="EXTEND"/>
        <control-output control="EXTEND" prop="/gear/gear[4]/position-norm"/>
        <control-speed control="EXTEND" transition-time="10"/>
  </gear>

  <!-- Reservoirs de carburant -->
  <!-- 1 et 4 - Reservoirs principaux d'extremites -->
  <!-- adjusted tanks to get a balanced aircraft/approx position)-->
  <tank x="-0.2" y="14.732" z="3.927" capacity="8710"/>
  <tank x="-0.2" y="-14.732" z="3.927" capacity="8710"/>
  <!-- 2 et 3 - Reservoirs principaux interieurs -->
  <tank x="-0.4" y="7.041" z="3.796" capacity="7995"/>
  <tank x="-0.4" y="-7.041" z="3.796" capacity="7995"/>
  <!-- 5 et 6 - Reservoirs auxiliaires -->
  <tank x="-0.4" y="2.451" z="3.770" capacity="5915"/>
  <tank x="-0.4" y="-2.451" z="3.770" capacity="5915"/>

  <!-- 7 et 8 - Reservoirs supplementaires sur pylones -->
  <tank x="-0.133" y="7.701" z="2.179" capacity="5299"/>
  <tank x="-0.133" y="-7.701" z="2.179" capacity="5299"/>

  <!-- Ballast CG au centre de la corde des ailes x=1.486 -->
  <ballast x="11" y="0" z="1" mass="8000"/>
 
  <ballast x="-13.5" y="0" z="3.7" mass="-15000"/>
 
</airplane>


Helijah, could you please replace the old yasim.xml?

Additionally, I added thrusters to simulate the prop reverse, put the following in the c130-keyboard.xml:

Code: Select all
   <key n="127">
     <name>Delete</name>
     <desc>Toggle Reversers</desc>
     <binding>
       <command>property-toggle</command>
         <property>controls/engines/engine[0]/reverser</property>
       </binding>
       <binding>
   <command>nasal</command>
   <script>
          setprop("controls/engines/engine[0]/propeller-pitch",0);
     setprop("controls/engines/engine[1]/propeller-pitch",0);
     setprop("controls/engines/engine[2]/propeller-pitch",0);
     setprop("controls/engines/engine[3]/propeller-pitch",0);
   </script>
      </binding>
   </key>


With Del you can toggle the prop reverse (prop pitch will put to 0), so increase prop-pitch if you want to take off again.
When using prop-reverse to taxi, use breaks with caution, better use normal forward props to stop the aircraft.

Fly on,
glazmax
XXX pilot of the caribbean - bones and porters XXX
User avatar
glazmax
 
Posts: 453
Joined: Sat Jan 27, 2007 11:38 am
Location: Austria
Callsign: jettoo/OE-JTO
Version: cvs

Re: C-130

Postby helijah » Fri Jun 25, 2010 2:34 pm

Thanks,

Just one little remark.

With yasim, the result is :

Code: Select all
Solution results:       Iterations: 2114
 Drag Coefficient: 11.779464
       Lift Ratio: 270.704163
       Cruise AoA: -0.695990
   Tail Incidence: -0.222305
Approach Elevator: -0.626837
               CG: x:0.569, y:-0.000, z:3.382

  Inertia tensor : 4214099.500, -0.007, 308575.281
        [kg*m^2]   -0.007, 1106461.000, 0.002
     Origo at CG   308575.281, 0.002, 5103149.500


Well, I always made sure that the value "AOA Cruise" is always positive. The closer to 0 as possible, but still positive. So, replacing the "camber="0.18" by "camber=0147" in the wing section, we get :

Code: Select all
Solution results:       Iterations: 2266
 Drag Coefficient: 11.260620
       Lift Ratio: 308.721405
       Cruise AoA: 0.020396
   Tail Incidence: -0.918553
Approach Elevator: -0.557657
               CG: x:0.569, y:-0.000, z:3.382

  Inertia tensor : 4214099.500, -0.007, 308575.281
        [kg*m^2]   -0.007, 1106461.000, 0.002
     Origo at CG   308575.281, 0.002, 5103149.500


For the rest. I thank you very much. The fuselage should greatly amuse Melchior (he estimated that it is not useful to be very close to the real forms :) ). I took your changes for the 3 versions. Even if the versions should be slightly different (this is not the case yet)

I think the result should appeal to many:)

Again thank you to you.

Best regards. Emmanuel
Some planes (and other) for FlightGear
http://helijah.free.fr
and
http://embaranger.free.fr
User avatar
helijah
 
Posts: 1338
Joined: Wed Dec 27, 2006 1:35 pm
Location: Chartres (France)
Callsign: helijah
IRC name: helijah
Version: GIT
OS: GNU/Linux

Re: C-130

Postby glazmax » Sun Jun 27, 2010 10:16 am

Hi helijah, thanks for applying, the c130 works very well now :)

As the hsi display did not work, and instrument flight is necessary sometimes, I did some more changes:

1.)hsi: changed some paths and values to get it working, now VOR/ILS and TACAN work

Code: Select all
<?xml version="1.0" encoding="UTF-8"?>

<PropertyList>

  <path>hsi.ac</path>

  <animation>
    <!-- Objets opaques -->
    <object-name>fond</object-name>
    <object-name>buttonCRS</object-name>
    <object-name>buttonHDG</object-name>
    <object-name>back</object-name>
    <object-name>cmpscard</object-name>
    <object-name>crs01</object-name>
    <object-name>crs02</object-name>
    <object-name>crs03</object-name>
    <object-name>dist01</object-name>
    <object-name>dist02</object-name>
    <object-name>dist03</object-name>
    <object-name>dist04</object-name>
    <object-name>HDGneedle</object-name>
    <object-name>HDGneedle2</object-name>
    <object-name>bearing-bug</object-name>
    <object-name>heading-bug</object-name>
    <object-name>GSpointer</object-name>
    <object-name>cache</object-name>
    <object-name>off-flag</object-name>

    <!-- Objets transparents -->
    <object-name>vitre</object-name>
  </animation>

  <animation>
    <type>noshadow</type>
    <object-name>vitre</object-name>
  </animation>

  <animation>
    <type>shader</type>
    <shader>chrome</shader>
    <texture>shader.png</texture>
  </animation>

  <animation>
    <type>material</type>
    <object-name>back</object-name>
    <object-name>cmpscard</object-name>
    <object-name>crs01</object-name>
    <object-name>crs02</object-name>
    <object-name>crs03</object-name>
    <object-name>dist01</object-name>
    <object-name>dist02</object-name>
    <object-name>dist03</object-name>
    <object-name>dist04</object-name>
    <object-name>HDGneedle</object-name>
    <object-name>HDGneedle2</object-name>
    <object-name>bearing-bug</object-name>
    <object-name>heading-bug</object-name>
    <object-name>GSpointer</object-name>
    <object-name>cache</object-name>
    <object-name>off-flag</object-name>
    <emission>
      <red>   0.8 </red>
      <green> 0.7 </green>
      <blue>  0.5 </blue>
      <factor-prop>controls/lighting/instruments-norm</factor-prop>
    </emission>
  </animation>

  <!-- tacan distance digital display -->
  <animation>
    <type>textranslate</type>
    <object-name>dist01</object-name>
    <property>instrumentation/tacan/indicated-distance-nm</property>
    <!-- <property>/instrumentation/navcomputer/indicated-distance-nm</property> -->
    <factor>0.0005</factor>
    <step>100</step>
    <axis>
      <x> 0 </x>
      <y> 1 </y>
      <z> 0 </z>
    </axis>
  </animation>

  <animation>
    <type>textranslate</type>
    <object-name>dist02</object-name>
    <property>instrumentation/tacan/indicated-distance-nm</property>
    <!-- <property>/instrumentation/navcomputer/indicated-distance-nm</property> -->
    <factor>0.005</factor>
    <step>10</step>
    <axis>
      <x> 0 </x>
      <y> 1 </y>
      <z> 0 </z>
    </axis>
  </animation>

  <animation>
    <type>textranslate</type>
    <object-name>dist03</object-name>
    <property>instrumentation/tacan/indicated-distance-nm</property>
    <!-- <property>/instrumentation/navcomputer/indicated-distance-nm</property> -->
    <factor>0.05</factor>
    <step>1</step>
    <axis>
      <x> 0 </x>
      <y> 1 </y>
      <z> 0 </z>
    </axis>
  </animation>

  <animation>
    <type>textranslate</type>
    <object-name>dist04</object-name>
    <property>instrumentation/tacan/indicated-distance-nm</property>
    <!-- <property>/instrumentation/navcomputer/indicated-distance-nm</property> -->
    <factor>1</factor>
    <step>0.1</step>
    <axis>
      <x> 0 </x>
      <y> 1 </y>
      <z> 0 </z>
    </axis>
  </animation>
 
  <!-- Course Readout -->
  <animation>
    <type>textranslate</type>
    <object-name>crs01</object-name>
    <property>instrumentation/nav[0]/radials/selected-deg</property>
    <factor>0.0005</factor>
    <step>100</step>
    <axis>
      <x> 0 </x>
      <y> 1 </y>
      <z> 0 </z>
    </axis>
  </animation>

  <animation>
    <type>textranslate</type>
    <object-name>crs02</object-name>
    <property>instrumentation/nav[0]/radials/selected-deg</property>
    <factor>0.005</factor>
    <step>10</step>
    <axis>
      <x> 0 </x>
      <y> 1 </y>
      <z> 0 </z>
    </axis>
  </animation>

  <animation>
    <type>textranslate</type>
    <object-name>crs03</object-name>
    <property>instrumentation/nav[0]/radials/selected-deg</property>
    <factor>0.05</factor>
    <step>1</step>
    <axis>
      <x> 0 </x>
      <y> 1 </y>
      <z> 0 </z>
    </axis>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>cmpscard</object-name>
    <condition>
      <greater-than>
        <property>systems/electrical/outputs/hsi</property>
        <value type="float">24</value>
      </greater-than>
    </condition>
    <property>instrumentation/heading-indicator/indicated-heading-deg</property>
    <!-- <property>/orientation/heading-magnetic-deg[0]</property> -->
    <axis>
      <x> 1 </x>
      <y> 0 </y>
      <z> 0 </z>
    </axis>
    <center>
      <x> 0.000 </x>
      <y> 0.000 </y>
      <y> 0.003 </y>
    </center>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>HDGneedle</object-name>
    <object-name>HDGneedle2</object-name>
    <object-name>heading-bug</object-name>
    <property>orientation/heading-deg</property>
    <axis>
      <x> 1 </x>
      <y> 0 </y>
      <z> 0 </z>
    </axis>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>heading-bug</object-name>
    <condition>
      <greater-than>
        <property>systems/electrical/outputs/hsi</property>
        <value>24</value>
      </greater-than>
    </condition>
      <property>autopilot/settings/heading-bug-deg</property>
      <axis>
        <x> -1 </x>
        <y>  0 </y>
        <z>  0 </z>
      </axis>
  </animation>
 
  <!--<animation>
    <type>rotate</type>
    <object-name>bearing-bug</object-name>
    <condition>
      <greater-than>
        <property>systems/electrical/outputs/hsi</property>
        <value>24</value>
      </greater-than>
    </condition>
    <property>autopilot/settings/heading-bug-deg</property>
    <axis>
      <x> -1 </x>
      <y>  0 </y>
      <z>  0 </z>
    </axis>
  </animation>-->

  <animation>
    <type>select</type>
    <object-name>cache</object-name>
    <condition>
      <or>
        <equals>
          <property>instrumentation/tacan/in-range</property>
          <value>false</value>
        </equals>
        <equals>
          <property>instrumentation/tacan/switch-position</property>
          <value>0</value>
        </equals>
      </or>
    </condition>
  </animation>

  <animation>
    <type>select</type>
    <object-name>off-flag</object-name>
    <condition>
      <less-than>
        <property>systems/electrical/outputs/hsi</property>
        <value type="float">24</value>
      </less-than>
    </condition>
  </animation>

<!-- tacan display -->

  <animation>
    <type>rotate</type>
    <object-name>bearing-bug</object-name>
    <property>orientation/heading-deg</property>
    <axis>
      <x> 1 </x>
      <y> 0 </y>
      <z> 0 </z>
    </axis>
  </animation>

<animation>
   <type>rotate</type>
   <object-name>bearing-bug</object-name>
   <property>instrumentation/tacan/indicated-bearing-true-deg</property>
   <axis>
      <x>-1</x>
      <y>0</y>
      <z>0</z>
   </axis>

</animation>

  <animation>
    <type>rotate</type>
    <object-name>HDGneedle</object-name>
    <object-name>HDGneedle2</object-name>
    <property>instrumentation/nav/radials/selected-deg</property>
    <axis>
      <x> -1 </x>
      <y>  0 </y>
      <z>  0 </z>
    </axis>
  </animation>

  <animation>
    <type>translate</type>
    <object-name>HDGneedle2</object-name>
    <property>instrumentation/nav/heading-needle-deflection</property>
    <interpolation>
     <entry>
       <ind> -10.0</ind>
       <dep>-0.0253</dep>
     </entry>
     <entry>
       <ind> 0.0</ind>
       <dep>0.0</dep>
     </entry>
     <entry>
       <ind> 10.0</ind>
       <dep>0.0253</dep>
     </entry>
    </interpolation>
    <!--<factor>0.002</factor>-->
    <axis>
      <x> 0 </x>
      <y> 1 </y>
      <z> 0 </z>
    </axis>
  </animation>

  <animation>
    <type>translate</type>
    <object-name>GSpointer</object-name>
    <property>instrumentation/nav/gs-needle-deflection</property>
    <interpolation>
      <entry>
        <ind>-9</ind>
        <dep>-0.03</dep>
      </entry>
      <entry>
       <ind> 0.0</ind>
       <dep>0.0</dep>
      </entry>
      <entry>
        <ind>9</ind>
   <dep>0.03</dep>
      </entry>
    </interpolation>
    <axis>
      <x> 0 </x>
      <y> 0 </y>
      <z> 1 </z>
    </axis>
  </animation>

  <animation>
    <type>select</type>
    <object-name>GSpointer</object-name>
    <condition>
      <and>
         <property>instrumentation/nav/has-gs</property>
         <property>instrumentation/nav/in-range</property>
     </and>
    </condition>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>buttonCRS</object-name>
    <property>instrumentation/nav[0]/radials/selected-deg</property>
    <center>
      <x-m>  0.007 </x-m>
      <y-m> -0.048 </y-m>
      <z-m> -0.050 </z-m>
    </center>
    <axis>
      <x> -1 </x>
      <y>  0 </y>
      <z>  0 </z>
    </axis>
  </animation>

  <animation>
   <type>rotate</type>
   <object-name>buttonHDG</object-name>
   <property>instrumentation/heading-indicator/offset-deg</property>
   <center>
      <x-m>  0.007 </x-m>
      <y-m> -0.048 </y-m>
      <z-m> -0.050 </z-m>
   </center>
   <axis>
     <x> -1 </x>
     <y>  0 </y>
     <z>  0 </z>
   </axis>
  </animation>

</PropertyList>


One notice on the TACAN distance display: It is working correctly now, but for a normal factor/step animation, the numbers should cover the whole vertical space on the png image. As yours go from top to about half, I had to split the factor eg: 0.1 -> 0.05 to display correct distances. You better create an additional small png or borrow one of the hundrets around.

2.)In order to get the instruments working I changed in base-set.xml:

-> Battery switch to 1
Code: Select all
<electric>
      <external-power>0</external-power>
      <battery-switch>1</battery-switch>


->commented out Electrical.nas because it deactivated the nav displays after some time (but I don't know how)
Code: Select all
<!--<file>Aircraft/C130/Nasal/Electrical.nas</file>-->


3.)in interior.xml rise the panel1 a bit:
Code: Select all
  <!-- Tableau de bord-->
  <model>
    <path>Aircraft/C130/Models/Interior/Panel/panel1.xml</path>
    <offsets>
      <x-m> -10.746 </x-m>
      <y-m>   0.000 </y-m>
      <z-m>   2.480 </z-m>
    </offsets>
  </model>


4.)added ADF to panel1.xml where it belongs:
Code: Select all
  <!-- adf -->
  <model>
    <path>Aircraft/Instruments-3d/adf/adf.xml</path>
    <offsets>
      <x-m> -0.322 </x-m>
      <y-m> -0.530 </y-m>
      <z-m>  0.160 </z-m>
    </offsets>
  </model>


5.)Changed views.xml to:
Code: Select all
  <view n="0">
    <internal archive="y">true</internal>
    <config>
        <x-offset-m archive="y">  -0.607 </x-offset-m> <!--Right -->
        <y-offset-m archive="y">   2.970 </y-offset-m> <!--Up    -->
        <z-offset-m archive="y"> -10.362 </z-offset-m> <!--Back  -->
      <pitch-offset-deg> -12 </pitch-offset-deg>
      <default-field-of-view-deg>60</default-field-of-view-deg>
    </config>
  </view>


I hope you like the changes, for me they were essential to provide instrument flight capability and the panel is now a little higher and matches reality much better.

see you and thanks,
glazmax
XXX pilot of the caribbean - bones and porters XXX
User avatar
glazmax
 
Posts: 453
Joined: Sat Jan 27, 2007 11:38 am
Location: Austria
Callsign: jettoo/OE-JTO
Version: cvs

Re: C-130

Postby helijah » Sun Jun 27, 2010 11:33 am

Wow !

Thx GAZMAX. I commit now in GIT.

Best regards. Emmanuel
Some planes (and other) for FlightGear
http://helijah.free.fr
and
http://embaranger.free.fr
User avatar
helijah
 
Posts: 1338
Joined: Wed Dec 27, 2006 1:35 pm
Location: Chartres (France)
Callsign: helijah
IRC name: helijah
Version: GIT
OS: GNU/Linux

Re: C-130

Postby greertr » Wed Sep 29, 2010 2:17 am

Thanks for posting these changes...much better, and it also showed me how to make changes to the files for an aircraft...I'm truly dangerous now :lol:
greertr
 
Posts: 8
Joined: Sat Sep 18, 2010 9:13 pm


Return to Aircraft

Who is online

Users browsing this forum: No registered users and 16 guests