> Is there a quickie tutorial ...

The AIManager subsystem reads the preferences.xml file at startup and 
instantiates an AI object for every occurrance of <entry> in the sim/ai node.
Presently there are three object "types" available, "aircraft", "ship" and 
"ballistic".  The aircraft are available in four "classes", called "light", 
"jet_transport", "ww2_fighter" and "jet_fighter".  The class is used to 
establish the airplane's performance capabilities.

The "aircraft" object can have the following attributes:
"class", "heading", "speed-KTAS", "path", "altitude-ft", "longitude" and 
"latitude".  These values are the starting point for the object. The "path" 
refers to the path to the exterior model.

The "ship" object can have the following attributes:
"heading", "speed-KTAS", "path", "altitude-ft", "longitude" and "latitude".

The "ballistic" object can have the following attributes:
"azimuth", "elevation", "speed-fps", "path", "altitude-ft", "longitude" and 
"latitude".


Much of the FDM's are untested, awaiting scripting to call the TurnTo(), 
ClimbTo() and AccelTo() methods.

For a good demo of each type:

***** Aircraft  ************************************************
This sets up a fly-by of 3 F16s.  Take off form KSFO rwy 28R and climb at 250 
kts straight ahead.  The formation of F-16s will pass you.

  <ai>
   <enabled type="bool">true</enabled>

   <entry>
    <type>aircraft</type>
    <class>jet_fighter</class>
    <path>Aircraft/f16/Models/f16.xml</path>
    <speed-KTAS type="double">300.0</speed-KTAS>
    <altitude-ft type="double">1000</altitude-ft>
    <longitude type="double">-122.321</longitude>
    <latitude type="double">37.5972446</latitude>
    <heading type="double">298.0</heading>
   </entry>

   <entry>
    <type>aircraft</type>
    <class>jet_fighter</class>
    <path>Aircraft/f16/Models/f16.xml</path>
    <speed-KTAS type="double">300.0</speed-KTAS>
    <altitude-ft type="double">1000</altitude-ft>
    <longitude type="double">-122.321</longitude>
    <latitude type="double">37.5969666</latitude>
    <heading type="double">298.0</heading>
   </entry>

   <entry>
    <type>aircraft</type>
    <class>jet_fighter</class>
    <path>Aircraft/f16/Models/f16.xml</path>
    <speed-KTAS type="double">300.0</speed-KTAS>
    <altitude-ft type="double">1000</altitude-ft>
    <longitude type="double">-122.321</longitude>
    <latitude type="double">37.5975226</latitude>
    <heading type="double">298.0</heading>
   </entry>


  </ai>


***** Ship ***************************************************

This puts the Saratoga a couple miles east of KSFO, doing 30 knots, heading 
020.

  <ai>
   <enabled type="bool">true</enabled>

   <entry>
    <type>ship</type>
    <path>Models/Geometry/saratoga.xml</path>
    <speed-KTAS type="double">30.0</speed-KTAS>
    <altitude-ft type="double">0.0</altitude-ft>
    <longitude type="double">-122.33333</longitude>
    <latitude type="double">37.61667</latitude>
    <heading type="double">20.0</heading>
   </entry>

  </ai>


***** Ballistic **************************************************

This will launch an unpowered rocket from the terminal at KSFO.  The rocket 
model is already in the base package, but it needs to be reoriented using the 
rocket.xml file below.

  <ai>
   <enabled type="bool">true</enabled>
   <entry>
    <type>ballistic</type>
    <path>Models/Geometry/rocket.xml</path>
    <speed-fps type="double">500.0</speed-fps>
    <altitude-ft type="double">13</altitude-ft>
    <longitude type="double">-122.3858</longitude>
    <latitude type="double">37.616</latitude>
    <azimuth type="double">90.0</azimuth>
    <elevation type="double">45.0</elevation>
   </entry>
  </ai>


***** rocket.xml  (a file to reorient the rocket.ac model) ******************

<?xml version="1.0"?>

<!--
   NOTE: These are the available offsets:
   <x-m></x-m>
   <y-m></y-m>
   <z-m></z-m>
   <heading-deg></heading-deg>
   <roll-deg></roll-deg>
   <pitch-deg></pitch-deg>
-->
    
<PropertyList>

 <path>rocket.ac</path>

 <offsets>
   <pitch-deg>-90.0</pitch-deg>
 </offsets>  

</PropertyList>


Dave
-- 
****************************
David Culp
davidculp2[at]comcast.net
****************************

_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to