JSBSim Propulsion: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
(Stub in the propulsion class. I realized we don't have it documented elsewhere, still needs feed and location tags. FGPropulsion.h needs work, too.)
 
(Paste in an example from the c172p)
Line 15: Line 15:
         ... more tanks ...
         ... more tanks ...
         <dump-rate unit="{LBS/MIN | KG/MIN}"> {number} </dump-rate>
         <dump-rate unit="{LBS/MIN | KG/MIN}"> {number} </dump-rate>
    </propulsion>
=== Example Format ===
    <propulsion>
        <engine file="eng_io320">
            <location unit="IN">
                <x> -19.7 </x>
                <y> 0 </y>
                <z> 26.6 </z>
            </location>
            <orient unit="DEG">
                <roll> 0.0 </roll>
                <pitch> 0 </pitch>
                <yaw> 0 </yaw>
            </orient>
            <feed>0</feed>
            <feed>1</feed>
            <thruster file="prop_75in2f">
                <location unit="IN">
                    <x> -37.7 </x>
                    <y> 0 </y>
                    <z> 26.6 </z>
                </location>
                <orient unit="DEG">
                    <roll> 0.0 </roll>
                    <pitch> 0.0 </pitch>
                    <yaw> 0.0 </yaw>
                </orient>
                <sense> 1 </sense>
                <p_factor> 5 </p_factor>
            </thruster>
        </engine>
        <tank type="FUEL">    <!-- Tank number 0 -->
            <location unit="IN">
                <x> 56 </x>
                <y> -112 </y>
                <z> 59.4 </z>
            </location>
            <capacity unit="LBS"> 185 </capacity>
            <contents unit="LBS"> 100 </contents>
        </tank>
        <tank type="FUEL">    <!-- Tank number 1 -->
            <location unit="IN">
                <x> 56 </x>
                <y> 112 </y>
                <z> 59.4 </z>
            </location>
            <capacity unit="LBS"> 185 </capacity>
            <contents unit="LBS"> 100 </contents>
        </tank>
     </propulsion>
     </propulsion>

Revision as of 23:53, 13 March 2013

JSBSim provides a framework for aerodynamics. This page will attempt to explain how to create a propulsion system for the JSBSim framework. Propulsion systems contain engine, thrusters and fuel tanks


Propulsion

Propulsion entity is the container for engine, thrusters and fuel tanks. Engines and thrusters are commonly kept in separate files in the Engines/ directory.

Configuration File Format

   <propulsion>
       <engine file="{string}">
         ... see FGEngine, FGThruster, and class for engine type ...
       </engine>
       ... more engines ...
       <tank type="{FUEL | OXIDIZER}"> 
         ... see FGTank ...
       </tank>
       ... more tanks ...
       <dump-rate unit="{LBS/MIN | KG/MIN}"> {number} </dump-rate>
   </propulsion>

Example Format

   <propulsion>
       <engine file="eng_io320">
           <location unit="IN">
               <x> -19.7 </x>
               <y> 0 </y>
               <z> 26.6 </z>
           </location>
           <orient unit="DEG">
               <roll> 0.0 </roll>
               <pitch> 0 </pitch>
               <yaw> 0 </yaw>
           </orient>
           <feed>0</feed>
           <feed>1</feed>
           <thruster file="prop_75in2f">
               <location unit="IN">
                   <x> -37.7 </x>
                   <y> 0 </y>
                   <z> 26.6 </z>
               </location>
               <orient unit="DEG">
                   <roll> 0.0 </roll>
                   <pitch> 0.0 </pitch>
                   <yaw> 0.0 </yaw>
               </orient>
               <sense> 1 </sense>
               <p_factor> 5 </p_factor>
           </thruster>
       </engine>
       <tank type="FUEL">    
           <location unit="IN">
               <x> 56 </x>
               <y> -112 </y>
               <z> 59.4 </z>
           </location>
           <capacity unit="LBS"> 185 </capacity>
           <contents unit="LBS"> 100 </contents>
       </tank>
       <tank type="FUEL">    
           <location unit="IN">
               <x> 56 </x>
               <y> 112 </y>
               <z> 59.4 </z>
           </location>
           <capacity unit="LBS"> 185 </capacity>
           <contents unit="LBS"> 100 </contents>
       </tank>
   </propulsion>