AI Systems: Difference between revisions

Jump to navigation Jump to search
Line 20: Line 20:
== AI Models ==
== AI Models ==


Starting with FlightGear version 0.9.4 you can place AI objects in the "FlightGear world". In version 0.9.4 the AI objects can be defined in the preferences.xml file, or in an airplane's *-set.xml file. In later versions they are defined in a "scenario file" only. The types of AI objects you can have are airplanes, ships, thunderstorms, thermals and ballistic objects. AI objects have some things in common: The have a location in the "FlightGear world", they can have an associated exterior 3D model, and they can move according to an internal FDM (flight dynamics model). As of now, these objects are created at simulator start-up by adding some XML code to a scenario file. The scenario file must be in the data/AI directory. You select which scenario files you want to use by naming them in the prefernces.xml file. The preferences.xml file has an entry that looks like this (FlightGear versions newer than 0.9.4, including CVS):  
Starting with FlightGear version 0.9.4 you can place AI objects in the "FlightGear world". In version 0.9.4 the AI objects can be defined in the preferences.xml file, or in an airplane's *-set.xml file. In later versions they are defined in a "scenario file" only. The types of AI objects you can have are airplanes, ships, thunderstorms, thermals and ballistic objects. AI objects have some things in common: The have a location in the "FlightGear world", they can have an associated exterior 3D model, and they can move according to an internal FDM (flight dynamics model). As of now, these objects are created at simulator start-up by adding some XML code to a scenario file. The scenario file must be in the data/AI directory. You select which scenario files you want to use by naming them in the preferences.xml file. The preferences.xml file has an entry that looks like this (FlightGear versions newer than 0.9.4, including CVS):  


  <AI>
  <AI>
Line 29: Line 29:
   
   


The scenario file contains one entry for each AI object. The entry specifies what kind of object to create, what its initial conditions will be, and (for aircraft and ships) a flight plan. The entry for a sailboat would look like this:
The scenario file contains one entry for each AI object. The entry specifies what kind of object to create, what its initial conditions will be, and (for aircraft and ships) a flight plan. The entry for a sailboat could look like this:


  <ENTRY>
  <ENTRY>
   <TYPE>ship</TYPE>
   <TYPE>ship</TYPE>
   <PATH>Models/Geometry/sailboat.xml</PATH>  
   <MODEL>Models/Geometry/sailboat.xml</MODEL>  
   <SPEED-KTAS type="double">12.0</SPEED-KTAS>  
   <SPEED-KTAS type="double">12.0</SPEED-KTAS>  
   <ALTITUDE-FT type="double">0.0</ALTITUDE-FT>     
   <ALTITUDE-FT type="double">0.0</ALTITUDE-FT>     
Line 48: Line 48:
   <TYPE>aircraft</TYPE>
   <TYPE>aircraft</TYPE>
   <CLASS>light</CLASS>  
   <CLASS>light</CLASS>  
   <PATH>Aircraft/a4/Models/a4-blue.xml</PATH>  
   <MODEL>Aircraft/a4/Models/a4-blue.xml</MODEL>  
   <SPEED-KTAStype="double">320.0</SPEED-KTAS>  
   <SPEED-KTAStype="double">320.0</SPEED-KTAS>  
   <ALTITUDE-FT type="double">7000.0</ALTITUDE-FT>  
   <ALTITUDE-FT type="double">7000.0</ALTITUDE-FT>  
Line 64: Line 64:
   <TYPE>aircraft</TYPE>  
   <TYPE>aircraft</TYPE>  
   <CLASS>jet-transport</CLASS>
   <CLASS>jet-transport</CLASS>
   <PATH>Aircraft/737/Models/737.xml</PATH>
   <MODEL>Aircraft/737/Models/737.xml</MODEL>
   <FLIGHTPLAN>KSFO_ILS28L.xml</FLIGHTPLAN>  
   <FLIGHTPLAN>KSFO_ILS28L.xml</FLIGHTPLAN>  
  </ENTRY>
  </ENTRY>
Line 73: Line 73:
  <ENTRY>
  <ENTRY>
   <TYPE>storm</TYPE>
   <TYPE>storm</TYPE>
   <PATH>Models/Geometry/thunderstorm.xml</PATH>  
   <MODEL>Models/Geometry/thunderstorm.xml</MODEL>  
   <SPEED-KTAS type="double">20.0</SPEED-KTAS>  
   <SPEED-KTAS type="double">20.0</SPEED-KTAS>  
   <ALTITUDE-FT type="double">4000.0</ALTITUDE-FT>
   <ALTITUDE-FT type="double">4000.0</ALTITUDE-FT>
Line 100: Line 100:
  <ENTRY>
  <ENTRY>
   <TYPE>ballistic</TYPE>  
   <TYPE>ballistic</TYPE>  
   <PATH>Models/Geometry/rocket.xml</PATH>
   <MODEL>Models/Geometry/rocket.xml</MODEL>
   <SPEED-FPS type="double">500.0</SPEED-FPS>  
   <SPEED-FPS type="double">500.0</SPEED-FPS>  
   <ALTITUDE-FT type="double">50.0</ALTITUDE-FT>  
   <ALTITUDE-FT type="double">50.0</ALTITUDE-FT>  
Anonymous user

Navigation menu