CVS: data/Aircraft/Piper-PA-32/Nasal doors.nas, NONE, 1.1 light.nas, NONE, 1.1 liveries.nas, NONE, 1.1 pa32-keyboard.xml, NONE, 1.1 views.xml, NONE, 1.1

Emmanuel Baranger <[email protected]> Mon, 19 Apr 2010 16:54:47 -0500
Newsgroups gmane.games.flightgear.cvc
Message-ID <[email protected]>
Update of /var/cvs/FlightGear-0.9/data/Aircraft/Piper-PA-32/Nasal
In directory baron.flightgear.org:/tmp/cvs-serv31301/Nasal

Added Files:
	doors.nas light.nas liveries.nas pa32-keyboard.xml views.xml 
Log Message:
- new plane 

--- NEW FILE "doors.nas" ---
# =====
# Doors
# =====

Doors = {};

Doors.new = func {
   obj = { parents : [Doors],
           crew : aircraft.door.new("instrumentation/doors/crew", 8.0),
         };
   return obj;
};

Doors.crewexport = func {
   me.crew.toggle();
}

# ==============
# Initialization
# ==============

# objects must be here, otherwise local to init()
doorsystem = Doors.new();

--- NEW FILE "light.nas" ---
var sbc1 = aircraft.light.new( "/sim/model/lights/sbc1", [0.5, 0.3] );
sbc1.interval = 0.1;
sbc1.switch( 1 );

var sbc2 = aircraft.light.new( "/sim/model/lights/sbc2", [0.2, 0.3], "/sim/model/lights/sbc1/state" );
sbc2.interval = 0;
sbc2.switch( 1 );

setlistener( "/sim/model/lights/sbc2/state", func(n) {
  var bsbc1 = sbc1.stateN.getValue();
  var bsbc2 = n.getBoolValue();
  var b = 0;
  if( bsbc1 and bsbc2 and getprop( "/controls/lighting/beacon") ) {
    b = 1;
  } else {
    b = 0;
  }
  setprop( "/sim/model/lights/beacon/enabled", b );

  if( bsbc1 and !bsbc2 and getprop( "/controls/lighting/strobe" ) ) {
    b = 1;
  } else {
    b = 0;
  }
  setprop( "/sim/model/lights/strobe/enabled", b );
});

var beacon = aircraft.light.new( "/sim/model/lights/beacon", [0.05, 0.05] );
beacon.interval = 0;

var strobe = aircraft.light.new( "/sim/model/lights/strobe", [0.05, 0.05, 0.05, 1] );
strobe.interval = 0;

setprop( "/instrumentation/nav[0]/ident", 0 );
setprop( "/instrumentation/nav[1]/ident", 0 );


--- NEW FILE "liveries.nas" ---
aircraft.livery.init("Aircraft/Piper-PA-32/Models/Liveries");


--- NEW FILE "pa32-keyboard.xml" ---
<?xml version="1.0" encoding="UTF-8"?>

<PropertyList>

  <key n="100">
    <name>d</name>
    <desc>Canopy</desc>
    <binding>
     <command>nasal</command>
     <script>pa18.doorsystem.crewexport();</script>
    </binding>
  </key>

</PropertyList>


--- NEW FILE "views.xml" ---
<?xml version="1.0" encoding="UTF-8"?>


<PropertyList>

  <chase-distance-m type="double" archive="y">-20.0</chase-distance-m>

  <view n="100">
    <name>Passanger Seat View</name>
    <internal archive="y">true</internal>
    <type>lookfrom</type>
    <config>
      <from-model type="bool">true</from-model>
      <ground-level-nearplane-m type="double">0.5f</ground-level-nearplane-m>
       <x-offset-m archive="y">  0.291 </x-offset-m>	<!-- Right -->
       <y-offset-m archive="y">  0.083 </y-offset-m>	<!-- Up    -->
       <z-offset-m archive="y"> -1.305 </z-offset-m>	<!-- Back  -->
      <pitch-offset-deg>-15</pitch-offset-deg>
      <default-field-of-view-deg>60</default-field-of-view-deg>
      <dynamic-view type="bool">true</dynamic-view>
    </config>
  </view>

  <view n="101">
    <name>Tail Camera View</name>
    <type>lookfrom</type>
    <internal archive="y">true</internal>
    <config>
      <from-model type="bool">true</from-model>
      <from-model-idx type="int">0</from-model-idx>
      <ground-level-nearplane-m type="double">0.01f</ground-level-nearplane-m>
      <default-field-of-view-deg type="double">30</default-field-of-view-deg>
      <pitch-offset-deg>-5</pitch-offset-deg>
      <x-offset-m archive="y"> 0.000 </x-offset-m> <!--Right-->
      <y-offset-m archive="y"> 1.066 </y-offset-m> <!--Up-->
      <z-offset-m archive="y"> 2.700 </z-offset-m> <!--Back-->
    </config>
  </view>

  <view n="0">
    <internal archive="y">true</internal>
    <config>
       <x-offset-m archive="y"> -0.291 </x-offset-m>	<!-- Right -->
       <y-offset-m archive="y">  0.083 </y-offset-m>	<!-- Up    -->
       <z-offset-m archive="y"> -1.305 </z-offset-m>	<!-- Back  -->
       <pitch-offset-deg> -10 </pitch-offset-deg>
      <default-field-of-view-deg> 60 </default-field-of-view-deg>
    </config>
  </view>

  <view n="1">
    <config>
      <target-z-offset-m archive="y" type="double">0</target-z-offset-m>
    </config>
  </view>

  <view n="2">
    <config>
      <target-z-offset-m archive="y" type="double">0</target-z-offset-m>
    </config>
  </view>

  <view n="3">
    <config>
      <target-z-offset-m archive="y" type="double">0</target-z-offset-m>
    </config>
  </view>

  <view n="4">
    <config>
      <target-z-offset-m archive="y" type="double">0</target-z-offset-m>
    </config>
  </view>

  <view n="5">
    <config>
      <target-z-offset-m archive="y" type="double">0</target-z-offset-m>
    </config>
  </view>

  <view n="6">
    <config>
      <target-z-offset-m archive="y" type="double">0</target-z-offset-m>
    </config>
  </view>

</PropertyList>


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev