Control: Add back generic pushback for now

This commit is contained in:
Joshua Davidson 2018-04-04 17:19:34 -04:00
parent f446b9c129
commit 207fc6decf
12 changed files with 162 additions and 824 deletions

View file

@ -16,7 +16,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<version>Pre V1.0</version>
<description>A32X FDE</description>
</fileheader>
<metrics>
<wingarea unit="FT2"> 1319.79 </wingarea>
<wingspan unit="FT" > 117.26 </wingspan>
@ -26,26 +26,26 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<htailarm unit="FT" > 57.88 </htailarm>
<vtailarea unit="FT2"> 248.79 </vtailarea>
<vtailarm unit="FT" > 57.33 </vtailarm>
<location name="AERORP" unit="M">
<x> 19.2274 </x>
<y> 0 </y>
<z> 0.19249 </z>
</location>
<location name="EYEPOINT" unit="M">
<x> 0 </x>
<y> 0 </y>
<z> 0 </z>
</location>
<location name="VRP" unit="M">
<x> 18.8499 </x>
<y> 0 </y>
<z> -1.7005004 </z>
</location>
</metrics>
<mass_balance>
<ixx unit="SLUG*FT2"> 611903 </ixx>
<iyy unit="SLUG*FT2"> 1735389 </iyy>
@ -55,13 +55,13 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<ixz unit="SLUG*FT2"> 0 </ixz>
<iyz unit="SLUG*FT2"> 0 </iyz>
<emptywt unit="LBS" > 80431 </emptywt>
<location name="CG" unit="M">
<x> 18.8231 </x>
<y> 0 </y>
<z> 0.19249 </z>
</location>
<pointmass name="Crew">
<weight unit="LBS">380</weight>
<location name="POINTMASS" unit="M">
@ -79,7 +79,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<z> 0.19249 </z>
</location>
</pointmass>
<pointmass name="Fwd Cargo">
<weight unit="LBS">3000</weight>
<location name="POINTMASS" unit="M">
@ -88,7 +88,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<z> -1.18112 </z>
</location>
</pointmass>
<pointmass name="Aft Cargo">
<weight unit="LBS">3000</weight>
<location name="POINTMASS" unit="M">
@ -98,7 +98,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
</location>
</pointmass>
</mass_balance>
<ground_reactions>
<contact type="BOGEY" name="NOSE_LG">
<location unit="M">
@ -145,7 +145,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<brake_group> RIGHT </brake_group>
<retractable>1</retractable>
</contact>
<contact type="STRUCTURE" name="NOSE_1">
<location unit="M">
<x> 2.6272 </x>
@ -238,7 +238,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<brake_group> NONE </brake_group>
<retractable>0</retractable>
</contact>
<contact type="STRUCTURE" name="ENG_1">
<location unit="M">
<x> 14.3962788 </x>
@ -269,7 +269,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<brake_group> NONE </brake_group>
<retractable>0</retractable>
</contact>
<contact type="STRUCTURE" name="TAIL_1">
<location unit="M">
<x> 40.0923 </x>
@ -332,7 +332,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<retractable>0</retractable>
</contact>
</ground_reactions>
<propulsion>
<engine file="cfm56_5a1">
<location unit="M">
@ -359,7 +359,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
</orient>
</thruster>
</engine>
<engine file="cfm56_5a1">
<location unit="M">
<x> 14.3962788 </x>
@ -385,7 +385,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
</orient>
</thruster>
</engine>
<tank type="FUEL"> <!-- Left Wing Tank -->
<location unit="M">
<x> 18.9231 </x>
@ -448,17 +448,18 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<type>JET-A1</type>
</tank>
</propulsion>
<system file="electrical" />
<system file="pushback" />
<system file="fuel" />
<system file="electrical" />
<system file="glass-effect1" />
<system file="fmgc" />
<system file="a320-fcs" />
<flight_control name="none"/>
<aerodynamics file="Systems/a320-aerodynamics.xml" />
<external_reactions>
<force name="pushback" frame="BODY">
<location unit="M">

View file

@ -16,7 +16,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<version>Pre V1.0</version>
<description>A32X FDE</description>
</fileheader>
<metrics>
<wingarea unit="FT2"> 1319.79 </wingarea>
<wingspan unit="FT" > 117.26 </wingspan>
@ -26,26 +26,26 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<htailarm unit="FT" > 57.88 </htailarm>
<vtailarea unit="FT2"> 248.79 </vtailarea>
<vtailarm unit="FT" > 57.33 </vtailarm>
<location name="AERORP" unit="M">
<x> 19.2274 </x>
<y> 0 </y>
<z> 0.19249 </z>
</location>
<location name="EYEPOINT" unit="M">
<x> 0 </x>
<y> 0 </y>
<z> 0 </z>
</location>
<location name="VRP" unit="M">
<x> 18.8499 </x>
<y> 0 </y>
<z> -1.7005004 </z>
</location>
</metrics>
<mass_balance>
<ixx unit="SLUG*FT2"> 611903 </ixx>
<iyy unit="SLUG*FT2"> 1735389 </iyy>
@ -55,13 +55,13 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<ixz unit="SLUG*FT2"> 0 </ixz>
<iyz unit="SLUG*FT2"> 0 </iyz>
<emptywt unit="LBS" > 80431 </emptywt>
<location name="CG" unit="M">
<x> 18.8231 </x>
<y> 0 </y>
<z> 0.19249 </z>
</location>
<pointmass name="Crew">
<weight unit="LBS">380</weight>
<location name="POINTMASS" unit="M">
@ -79,7 +79,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<z> 0.19249 </z>
</location>
</pointmass>
<pointmass name="Fwd Cargo">
<weight unit="LBS">3000</weight>
<location name="POINTMASS" unit="M">
@ -88,7 +88,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<z> -1.18112 </z>
</location>
</pointmass>
<pointmass name="Aft Cargo">
<weight unit="LBS">3000</weight>
<location name="POINTMASS" unit="M">
@ -98,7 +98,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
</location>
</pointmass>
</mass_balance>
<ground_reactions>
<contact type="BOGEY" name="NOSE_LG">
<location unit="M">
@ -145,7 +145,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<brake_group> RIGHT </brake_group>
<retractable>1</retractable>
</contact>
<contact type="STRUCTURE" name="NOSE_1">
<location unit="M">
<x> 2.6272 </x>
@ -238,7 +238,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<brake_group> NONE </brake_group>
<retractable>0</retractable>
</contact>
<contact type="STRUCTURE" name="ENG_1">
<location unit="M">
<x> 14.3962788 </x>
@ -269,7 +269,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<brake_group> NONE </brake_group>
<retractable>0</retractable>
</contact>
<contact type="STRUCTURE" name="TAIL_1">
<location unit="M">
<x> 40.0923 </x>
@ -332,7 +332,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<retractable>0</retractable>
</contact>
</ground_reactions>
<propulsion>
<engine file="cfm56_5b4">
<location unit="M">
@ -359,7 +359,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
</orient>
</thruster>
</engine>
<engine file="cfm56_5b4">
<location unit="M">
<x> 14.3962788 </x>
@ -385,7 +385,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
</orient>
</thruster>
</engine>
<tank type="FUEL"> <!-- Left Wing Tank -->
<location unit="M">
<x> 18.9231 </x>
@ -448,17 +448,18 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<type>JET-A1</type>
</tank>
</propulsion>
<system file="pushback" />
<system file="fuel" />
<system file="electrical" />
<system file="glass-effect1" />
<system file="fmgc" />
<system file="a320-fcs" />
<flight_control name="none"/>
<aerodynamics file="Systems/a320-aerodynamics.xml" />
<external_reactions>
<force name="pushback" frame="BODY">
<location unit="M">

View file

@ -16,7 +16,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<version>Pre V1.0</version>
<description>A32X FDE</description>
</fileheader>
<metrics>
<wingarea unit="FT2"> 1319.79 </wingarea>
<wingspan unit="FT" > 117.26 </wingspan>
@ -26,26 +26,26 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<htailarm unit="FT" > 57.88 </htailarm>
<vtailarea unit="FT2"> 248.79 </vtailarea>
<vtailarm unit="FT" > 57.33 </vtailarm>
<location name="AERORP" unit="M">
<x> 19.2274 </x>
<y> 0 </y>
<z> 0.19249 </z>
</location>
<location name="EYEPOINT" unit="M">
<x> 0 </x>
<y> 0 </y>
<z> 0 </z>
</location>
<location name="VRP" unit="M">
<x> 18.8499 </x>
<y> 0 </y>
<z> -1.7005004 </z>
</location>
</metrics>
<mass_balance>
<ixx unit="SLUG*FT2"> 611903 </ixx>
<iyy unit="SLUG*FT2"> 1735389 </iyy>
@ -55,13 +55,13 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<ixz unit="SLUG*FT2"> 0 </ixz>
<iyz unit="SLUG*FT2"> 0 </iyz>
<emptywt unit="LBS" > 80431 </emptywt>
<location name="CG" unit="M">
<x> 18.8231 </x>
<y> 0 </y>
<z> 0.19249 </z>
</location>
<pointmass name="Crew">
<weight unit="LBS">380</weight>
<location name="POINTMASS" unit="M">
@ -79,7 +79,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<z> 0.19249 </z>
</location>
</pointmass>
<pointmass name="Fwd Cargo">
<weight unit="LBS">3000</weight>
<location name="POINTMASS" unit="M">
@ -88,7 +88,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<z> -1.18112 </z>
</location>
</pointmass>
<pointmass name="Aft Cargo">
<weight unit="LBS">3000</weight>
<location name="POINTMASS" unit="M">
@ -98,7 +98,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
</location>
</pointmass>
</mass_balance>
<ground_reactions>
<contact type="BOGEY" name="NOSE_LG">
<location unit="M">
@ -145,7 +145,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<brake_group> RIGHT </brake_group>
<retractable>1</retractable>
</contact>
<contact type="STRUCTURE" name="NOSE_1">
<location unit="M">
<x> 2.6272 </x>
@ -238,7 +238,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<brake_group> NONE </brake_group>
<retractable>0</retractable>
</contact>
<contact type="STRUCTURE" name="ENG_1">
<location unit="M">
<x> 14.3962788 </x>
@ -269,7 +269,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<brake_group> NONE </brake_group>
<retractable>0</retractable>
</contact>
<contact type="STRUCTURE" name="TAIL_1">
<location unit="M">
<x> 40.0923 </x>
@ -332,7 +332,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<retractable>0</retractable>
</contact>
</ground_reactions>
<propulsion>
<engine file="v2527_a5">
<location unit="M">
@ -359,7 +359,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
</orient>
</thruster>
</engine>
<engine file="v2527_a5">
<location unit="M">
<x> 14.3962788 </x>
@ -385,7 +385,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
</orient>
</thruster>
</engine>
<tank type="FUEL"> <!-- Left Wing Tank -->
<location unit="M">
<x> 18.9231 </x>
@ -448,17 +448,18 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<type>JET-A1</type>
</tank>
</propulsion>
<system file="electrical" />
<system file="pushback" />
<system file="fuel" />
<system file="electrical" />
<system file="glass-effect1" />
<system file="fmgc" />
<system file="a320-fcs" />
<flight_control name="none"/>
<aerodynamics file="Systems/a320-aerodynamics.xml" />
<external_reactions>
<force name="pushback" frame="BODY">
<location unit="M">

View file

@ -28,27 +28,10 @@
<model>
<pushback>
<enabled type="int"/>
<available type="int">1</available>
<yaw-deg alias="/fdm/jsbsim/fcs/steer-deg"/>
<target-speed-km_h type="float">0.0</target-speed-km_h>
<K_p type="float">5000.0</K_p>
<K_i type="float">200.0</K_i>
<F_i type="float">25000.0</F_i>
<K_d type="float">500.0</K_d>
<driver>
<tow-distance-m type="float">-60.0</tow-distance-m>
<face-heading-deg type="float">0.0</face-heading-deg>
<steer-cmd-norm alias="/controls/flight/rudder"/>
<K_V_push type="float">5.0</K_V_push>
<F_V_push type="float">5.0</F_V_push>
<S_min-m type="float">5.0</S_min-m>
<K_psi_push type="float">0.05</K_psi_push>
<K_V_turn type="float">1.4</K_V_turn>
<F_V_turn type="float">7.0</F_V_turn>
<K_psi_turn type="float">0.1</K_psi_turn>
<V_min type="float">1.5</V_min>
</driver>
<kp type="double">5000</kp>
<ki type="double">200</ki>
<kd type="double">500</kd>
<position-norm type="double">0</position-norm>
</pushback>
<icing>
<iceable>
@ -247,10 +230,8 @@
<item>
<label>Pushback</label>
<binding>
<command>nasal</command>
<script>
autopush.push_dlg.open();
</script>
<command>dialog-show</command>
<dialog-name>pushback</dialog-name>
</binding>
</item>
<item>
@ -1474,22 +1455,6 @@
<icing>
<file>Aircraft/IDG-A32X/Nasal/icing.nas</file>
</icing>
<autopush>
<file>Nasal/autopush.nas</file>
</autopush>
<autopush_driver>
<file>Nasal/autopush_driver.nas</file>
</autopush_driver>
</nasal>
<fdm>
<jsbsim>
<external_reactions>
<pushback>
<magnitude alias="/sim/model/pushback/force-lbf"/>
<x alias="/sim/model/pushback/force-x"/>
<y alias="/sim/model/pushback/force-y"/>
</pushback>
</external_reactions>
</jsbsim>
</fdm>
</PropertyList>

View file

@ -16,7 +16,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<version>Pre V1.0</version>
<description>A32X FDE</description>
</fileheader>
<metrics>
<wingarea unit="FT2"> 1319.79 </wingarea>
<wingspan unit="FT" > 117.26 </wingspan>
@ -26,26 +26,26 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<htailarm unit="FT" > 57.88 </htailarm>
<vtailarea unit="FT2"> 248.79 </vtailarea>
<vtailarm unit="FT" > 57.33 </vtailarm>
<location name="AERORP" unit="M">
<x> 19.2274 </x>
<y> 0 </y>
<z> 0.19249 </z>
</location>
<location name="EYEPOINT" unit="M">
<x> 0 </x>
<y> 0 </y>
<z> 0 </z>
</location>
<location name="VRP" unit="M">
<x> 18.8499 </x>
<y> 0 </y>
<z> -1.7005004 </z>
</location>
</metrics>
<mass_balance>
<ixx unit="SLUG*FT2"> 611903 </ixx>
<iyy unit="SLUG*FT2"> 1735389 </iyy>
@ -55,13 +55,13 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<ixz unit="SLUG*FT2"> 0 </ixz>
<iyz unit="SLUG*FT2"> 0 </iyz>
<emptywt unit="LBS" > 80431 </emptywt>
<location name="CG" unit="M">
<x> 18.8231 </x>
<y> 0 </y>
<z> 0.19249 </z>
</location>
<pointmass name="Crew">
<weight unit="LBS">380</weight>
<location name="POINTMASS" unit="M">
@ -79,7 +79,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<z> 0.19249 </z>
</location>
</pointmass>
<pointmass name="Fwd Cargo">
<weight unit="LBS">3000</weight>
<location name="POINTMASS" unit="M">
@ -88,7 +88,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<z> -1.18112 </z>
</location>
</pointmass>
<pointmass name="Aft Cargo">
<weight unit="LBS">3000</weight>
<location name="POINTMASS" unit="M">
@ -98,7 +98,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
</location>
</pointmass>
</mass_balance>
<ground_reactions>
<contact type="BOGEY" name="NOSE_LG">
<location unit="M">
@ -145,7 +145,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<brake_group> RIGHT </brake_group>
<retractable>1</retractable>
</contact>
<contact type="STRUCTURE" name="NOSE_1">
<location unit="M">
<x> 2.6272 </x>
@ -238,7 +238,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<brake_group> NONE </brake_group>
<retractable>0</retractable>
</contact>
<contact type="STRUCTURE" name="ENG_1">
<location unit="M">
<x> 14.3962788 </x>
@ -269,7 +269,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<brake_group> NONE </brake_group>
<retractable>0</retractable>
</contact>
<contact type="STRUCTURE" name="TAIL_1">
<location unit="M">
<x> 40.0923 </x>
@ -332,7 +332,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<retractable>0</retractable>
</contact>
</ground_reactions>
<propulsion>
<engine file="leap1a26">
<location unit="M">
@ -359,7 +359,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
</orient>
</thruster>
</engine>
<engine file="leap1a26">
<location unit="M">
<x> 14.3962788 </x>
@ -385,7 +385,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
</orient>
</thruster>
</engine>
<tank type="FUEL"> <!-- Left Wing Tank -->
<location unit="M">
<x> 18.9231 </x>
@ -448,17 +448,18 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<type>JET-A1</type>
</tank>
</propulsion>
<system file="electrical" />
<system file="pushback" />
<system file="fuel" />
<system file="electrical" />
<system file="glass-effect1" />
<system file="fmgc" />
<system file="a320-fcs" />
<flight_control name="none"/>
<aerodynamics file="Systems/a320-aerodynamics.xml" />
<external_reactions>
<force name="pushback" frame="BODY">
<location unit="M">

View file

@ -16,7 +16,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<version>Pre V1.0</version>
<description>A32X FDE</description>
</fileheader>
<metrics>
<wingarea unit="FT2"> 1319.79 </wingarea>
<wingspan unit="FT" > 117.26 </wingspan>
@ -26,26 +26,26 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<htailarm unit="FT" > 57.88 </htailarm>
<vtailarea unit="FT2"> 248.79 </vtailarea>
<vtailarm unit="FT" > 57.33 </vtailarm>
<location name="AERORP" unit="M">
<x> 19.2274 </x>
<y> 0 </y>
<z> 0.19249 </z>
</location>
<location name="EYEPOINT" unit="M">
<x> 0 </x>
<y> 0 </y>
<z> 0 </z>
</location>
<location name="VRP" unit="M">
<x> 18.8499 </x>
<y> 0 </y>
<z> -1.7005004 </z>
</location>
</metrics>
<mass_balance>
<ixx unit="SLUG*FT2"> 611903 </ixx>
<iyy unit="SLUG*FT2"> 1735389 </iyy>
@ -55,13 +55,13 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<ixz unit="SLUG*FT2"> 0 </ixz>
<iyz unit="SLUG*FT2"> 0 </iyz>
<emptywt unit="LBS" > 80431 </emptywt>
<location name="CG" unit="M">
<x> 18.8231 </x>
<y> 0 </y>
<z> 0.19249 </z>
</location>
<pointmass name="Crew">
<weight unit="LBS">380</weight>
<location name="POINTMASS" unit="M">
@ -79,7 +79,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<z> 0.19249 </z>
</location>
</pointmass>
<pointmass name="Fwd Cargo">
<weight unit="LBS">3000</weight>
<location name="POINTMASS" unit="M">
@ -88,7 +88,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<z> -1.18112 </z>
</location>
</pointmass>
<pointmass name="Aft Cargo">
<weight unit="LBS">3000</weight>
<location name="POINTMASS" unit="M">
@ -98,7 +98,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
</location>
</pointmass>
</mass_balance>
<ground_reactions>
<contact type="BOGEY" name="NOSE_LG">
<location unit="M">
@ -145,7 +145,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<brake_group> RIGHT </brake_group>
<retractable>1</retractable>
</contact>
<contact type="STRUCTURE" name="NOSE_1">
<location unit="M">
<x> 2.6272 </x>
@ -238,7 +238,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<brake_group> NONE </brake_group>
<retractable>0</retractable>
</contact>
<contact type="STRUCTURE" name="ENG_1">
<location unit="M">
<x> 14.3962788 </x>
@ -269,7 +269,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<brake_group> NONE </brake_group>
<retractable>0</retractable>
</contact>
<contact type="STRUCTURE" name="TAIL_1">
<location unit="M">
<x> 40.0923 </x>
@ -332,7 +332,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<retractable>0</retractable>
</contact>
</ground_reactions>
<propulsion>
<engine file="pw1127g">
<location unit="M">
@ -359,7 +359,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
</orient>
</thruster>
</engine>
<engine file="pw1127g">
<location unit="M">
<x> 14.3962788 </x>
@ -385,7 +385,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
</orient>
</thruster>
</engine>
<tank type="FUEL"> <!-- Left Wing Tank -->
<location unit="M">
<x> 18.9231 </x>
@ -448,17 +448,18 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<type>JET-A1</type>
</tank>
</propulsion>
<system file="electrical" />
<system file="pushback" />
<system file="fuel" />
<system file="electrical" />
<system file="glass-effect1" />
<system file="fmgc" />
<system file="a320-fcs" />
<flight_control name="none"/>
<aerodynamics file="Systems/a320-aerodynamics.xml" />
<external_reactions>
<force name="pushback" frame="BODY">
<location unit="M">

View file

@ -1,74 +0,0 @@
# AUTOPUSH
# Basic pushback logic class.
#
# Copyright (c) 2018 Michael Danilov <mike.d.ft402 -eh- gmail.com>
# Distribute under the terms of GPLv2.
var push_dlg = gui.Dialog.new("sim/gui/dialogs/autopush/push/dialog", "Aircraft/IDG-A32X/Systems/autopush.xml");
var _K_p = nil;
var _K_i = nil;
var _K_d = nil;
var _F_i = nil;
var _int = nil;
var _deltaV_old = nil;
var _t_old = nil;
var loop = func() {
if (!getprop("/sim/model/pushback/available")) {
stop();
return;
}
var force = 0.0;
# Rollspeed is only adequate if the wheel is touching the ground.
if (getprop("/gear/gear[0]/wow")) {
var deltaV =
getprop("/sim/model/pushback/target-speed-km_h") -
getprop("/gear/gear[0]/rollspeed-ms") * 3.6;
var dV = deltaV - _deltaV_old;
var t = getprop("/sim/time/elapsed-sec");
var dt = math.max(t - _t_old, 0.0001);
_int = math.min(math.max(_int + dV * dt, -_F_i), _F_i);
force = (_K_p * deltaV + _K_d * dV / dt + _K_i * _int) * KG2LB;
_deltaV_old = deltaV;
_t_old = t;
var yaw = getprop("/sim/model/pushback/yaw-deg") * D2R;
setprop("/sim/model/pushback/force-x", math.cos(yaw));
setprop("/sim/model/pushback/force-y", math.sin(yaw));
}
setprop("/sim/model/pushback/force-lbf", force);
}
var timer = maketimer(0.026, func{loop()});
var start = func() {
_K_p = getprop("/sim/model/pushback/K_p");
_K_i = getprop("/sim/model/pushback/K_i");
_K_d = getprop("/sim/model/pushback/K_d");
_F_i = getprop("/sim/model/pushback/F_i");
_int = 0.0;
_deltaV_old = 0.0;
_t_old = getprop("/sim/time/elapsed-sec");
setprop("/sim/model/pushback/connected", 1);
if (!timer.isRunning) {
screen.log.write("(pushback): Release brakes.");
}
timer.start();
}
var stop = func() {
if (timer.isRunning) {
screen.log.write("(pushback): Pushback disconnected, bypass pin removed.");
}
timer.stop();
setprop("/sim/model/pushback/force-lbf", 0.0);
setprop("/sim/model/pushback/connected", 0);
}
var toggle = func(){
if (getprop("/sim/model/pushback/enabled") * getprop("/sim/model/pushback/available")) {
start();
} else {
stop();
}
}

View file

@ -1,111 +0,0 @@
# AUTOPUSH
# Pushback driver class.
#
# Command the pushback to tow/push the aircract facing set heading.
#
# Copyright (c) 2018 Michael Danilov <mike.d.ft402 -eh- gmail.com>
# Distribute under the terms of GPLv2.
# FIXME When facing, acccount for current steering position, to work without dry steering.
var _K_V_push = nil;
var _F_V_push = nil;
var _S_min = nil;
var _K_psi_push = nil;
var _K_V_turn = nil;
var _F_V_turn = nil;
var _K_psi_turn = nil;
var _V_min = nil;
var _turning = nil;
var _sign = nil;
var _target = nil;
var _psi_parking = nil;
var _psi_turn = nil;
var loop = func() {
if (!getprop("/sim/model/pushback/connected")) {
stop();
return;
}
var V = 0.0;
var steering = 0.0;
var deltapsi = 0.0;
var psi = getprop("/orientation/heading-magnetic-deg");
if (!_turning) {
# Initially follow a straight line parallel to our initial heading.
var (A, S) = courseAndDistance(_target);
S *= NM2M;
# Stop when the bearing flips, guarante against infinite pushing.
if ((abs(S) < _S_min) + (abs(saw180(_psi_parking - A - math.min(_sign, 0.0) * 180.0) > 90.0))) {
_turning = 1;
screen.log.write("(pushback): Turning to face heading " ~ int(_psi_turn) ~ ".");
}
deltapsi = saw180(_psi_parking - psi);
V = math.min(math.max(_K_V_push * _sign * (S / _S_min), -_F_V_push), _F_V_push);
steering = math.min(math.max(_K_psi_push * _sign * deltapsi, -1.0), 1.0);
} else {
# Turn (almost) in place.
deltapsi = saw180(_psi_turn - psi);
V = math.min(math.max(_K_V_turn * _sign * abs(deltapsi), -_F_V_turn), _F_V_turn);
# We are done when the heading error is small.
if (abs(V) < _V_min) {
stop();
return;
}
steering = math.min(math.max(_K_psi_turn * _sign * deltapsi, -1.0), 1.0);
}
setprop("/sim/model/pushback/target-speed-km_h", V);
setprop("/sim/model/pushback/driver/steer-cmd-norm", steering);
}
var timer = maketimer(0.051, func{loop()});
var start = func() {
_K_V_push = getprop("/sim/model/pushback/driver/K_V_push");
_F_V_push = getprop("/sim/model/pushback/driver/F_V_push");
_S_min = getprop("/sim/model/pushback/driver/S_min-m");
_K_psi_push = getprop("/sim/model/pushback/driver/K_psi_push");
_K_V_turn = getprop("/sim/model/pushback/driver/K_V_turn");
_F_V_turn = getprop("/sim/model/pushback/driver/F_V_turn");
_K_psi_turn = getprop("/sim/model/pushback/driver/K_psi_turn");
_V_min = getprop("/sim/model/pushback/driver/V_min");
if (!getprop("/sim/model/pushback/connected")) {
return;
}
towdist = getprop("/sim/model/pushback/driver/tow-distance-m");
_target = geo.aircraft_position();
_psi_parking = getprop("/orientation/heading-magnetic-deg");
_target.apply_course_distance(_psi_parking, towdist);
_psi_turn = getprop("/sim/model/pushback/driver/face-heading-deg");
_sign = 1.0 - 2.0 * (towdist < 0.0);
_turning = 0;
timer.start();
if (_sign < 0.0) {
screen.log.write("(pushback): Pushing back.");
} else {
screen.log.write("(pushback): Towing.");
}
}
var stop = func() {
if (timer.isRunning) {
screen.log.write("(pushback): Done.");
setprop("/controls/flight/rudder", 0);
}
timer.stop();
setprop("/sim/model/pushback/target-speed-km_h", 0.0);
}
# Sawtooth: -180..+180 deg.
var saw180 = func(p) {
while (p <= -180.0) {
p += 360.0;
}
while (p > 180.0) {
p -= 360.0;
}
return p;
}

View file

@ -1,117 +0,0 @@
AUTOMATIC PUSHBACK FOR FLIGHTGEAR
Version 0.1.1
Copyright (c) 2018 Michael Danilov <mike.d.ft402 -eh- gmail.com>
Some of the code (c) FlightGear
Distribute under the terms of GPLv2.
FILES
Nasal/autopush-README.txt this file
Models/Goldhofert-autopush.xml the animation for FGDATA's Goldhofer
Nasal/autopush.nas basic pushback logic
Nasal/autopush_driver.nas pushback driver
gui/dialogs/autopush.xml GUI dialog
INSTALLATION
Only the minimal working example is covered here. Later you will have
to implement correct steering in your FDM (driving the
"/sim/model/pushback/yaw-deg") and pushback availability
("/sim/model/pushback/available") -- because those are too
aircraft-specific.
1. Set up the pushback logic. Add the following tags in your set.xml.
Replace the "/fdm/jsbsim/gear/unit[0]/steering/pos-deg" with the
property for the front wheel steering degrees of your aircraft.
Under <sim><model>:
<pushback>
<enabled type="int"/>
<available type="int">1</available>
<yaw-deg alias="/fdm/jsbsim/gear/unit[0]/steering/pos-deg"/>
<target-speed-km_h type="float">0.0</target-speed-km_h>
<K_p type="float">100.0</K_p>
<K_i type="float">25.0</K_i>
<F_i type="float">25000.0</F_i>
<K_d type="float">0.0</K_d>
<driver>
<tow-distance-m type="float">-60.0</tow-distance-m>
<face-heading-deg type="float">0.0</face-heading-deg>
<steer-cmd-norm alias="/controls/flight/rudder"/>
<K_V_push type="float">10.0</K_V_push>
<F_V_push type="float">10.0</F_V_push>
<S_min-m type="float">5.0</S_min-m>
<K_psi_push type="float">0.05</K_psi_push>
<K_V_turn type="float">1.4</K_V_turn>
<F_V_turn type="float">7.0</F_V_turn>
<K_psi_turn type="float">0.2</K_psi_turn>
<V_min type="float">2.5</V_min>
</driver>
</pushback>
Under <nasal>:
<autopush>
<file>Nasal/autopush.nas</file>
</autopush>
<autopush_driver>
<file>Nasal/autopush_driver.nas</file>
</autopush_driver>
2. Connect the FDM's external force.
a) JSBSim:
a.1. Add the following under <external_reactions> of your
JSBSim XML. Change the coordinates under <location> to equal
those of your front bogey.
<force name="tractor" frame="BODY">
<location unit="M">
<x>0.0</x>
<y>0.0</y>
<z>0.0</z>
</location>
<direction>
<x>1.0</x>
<y>0.0</y>
<z>0.0</z>
</direction>
</force>
a.2. Add the following under <fdm><jsbsim><external_reactions> of
your set.xml.
<tractor>
<magnitude alias="/sim/model/pushback/force-lbf"/>
<x alias="/sim/model/pushback/force-x"/>
<y alias="/sim/model/pushback/force-y"/>
</tractor>
b) YASim: TODO
3. Copy the gui/dialogs/autopush.xml from the distribution to your
aircraft's gui/dialogs directory. Add it to the menu (see
FlightGear documentation for editing the menu).
4. Copy the Models/Goldhofert-autopush.xml to your aircraft's Models/
directory. Edit all the places marked by "SETTING" to match your
setup. Include it in your Model XML, with offsets equal to the
front wheel's contact point.
5. Add the following in your Model XML. Change the coordinates under
<offsets> to equal those of your front bogey.
<model>
<name>Pushback</name>
<path>Models/Airport/Pushback/Goldhofert-autopush.xml</path>
<offsets>
<x-m>0.0</x-m>
<y-m>0.0</y-m>
<z-m>0.0</z-m>
</offsets>
</model>

View file

@ -1,375 +0,0 @@
<?xml version="1.0"?>
<!--
AUTOPUSH
Pushback dialog.
Copyright (c) 2018 Michael Danilov <mike.d.ft402 -eh- gmail.com>
Original code (c) FlightGear
Distribute under the terms of GPLv2.
-->
<PropertyList>
<name>autopush</name>
<layout>vbox</layout>
<group>
<layout>hbox</layout>
<text>
<label>Pushback</label>
</text>
<empty>
<stretch>true</stretch>
</empty>
<button>
<halign>right</halign>
<pref-width>20</pref-width>
<pref-height>20</pref-height>
<legend>X</legend>
<key>Esc</key>
<binding>
<command>dialog-close</command>
</binding>
</button>
</group>
<hrule/>
<group>
<stretch>true</stretch>
<layout>vbox</layout>
<halign>center</halign>
<valign>top</valign>
<checkbox>
<halign>left</halign>
<label>Connect</label>
<property>/sim/model/pushback/enabled</property>
<binding>
<command>dialog-apply</command>
</binding>
<binding>
<command>nasal</command>
<script>autopush.toggle();</script>
</binding>
</checkbox>
<hrule/>
<group>
<layout>table</layout>
<text>
<row>0</row>
<col>0</col>
<label>Speed: </label>
</text>
<button>
<row>0</row>
<col>1</col>
<pref-width>25</pref-width>
<pref-height>25</pref-height>
<legend>&lt;</legend>
<binding>
<command>property-adjust</command>
<property>/sim/model/pushback/target-speed-km_h</property>
<min>-15</min>
<max>15</max>
<step>-1</step>
<wrap>false</wrap>
</binding>
</button>
<slider>
<row>0</row>
<col>2</col>
<min>-15</min>
<max>15</max>
<property>/sim/model/pushback/target-speed-km_h</property>
<live>true</live>
<binding>
<command>dialog-apply</command>
</binding>
</slider>
<button>
<row>0</row>
<col>3</col>
<pref-width>25</pref-width>
<pref-height>25</pref-height>
<legend>&gt;</legend>
<binding>
<command>property-adjust</command>
<property>/sim/model/pushback/target-speed-km_h</property>
<min>-15</min>
<max>15</max>
<step>1</step>
<wrap>false</wrap>
</binding>
</button>
<button>
<row>0</row>
<col>4</col>
<pref-width>50</pref-width>
<pref-height>25</pref-height>
<legend>Stop</legend>
<binding>
<command>property-assign</command>
<property>/sim/model/pushback/target-speed-km_h</property>
<value>0</value>
</binding>
</button>
<text>
<row>0</row>
<col>5</col>
<pref-width>16</pref-width>
<property>/sim/model/pushback/target-speed-km_h</property>
<format>%3.0f</format>
<live>true</live>
</text>
<text>
<row>0</row>
<col>6</col>
<label>km/h</label>
</text>
</group>
<hrule/>
<group>
<layout>table</layout>
<text>
<row>0</row>
<col>0</col>
<halign>left</halign>
<label>Distance:</label>
</text>
<button>
<row>0</row>
<col>1</col>
<pref-width>25</pref-width>
<pref-height>25</pref-height>
<legend>&lt;&lt;</legend>
<binding>
<command>property-adjust</command>
<property>/sim/model/pushback/driver/tow-distance-m</property>
<min>-100</min>
<max>100</max>
<step>-10</step>
<wrap>false</wrap>
</binding>
</button>
<button>
<row>0</row>
<col>2</col>
<pref-width>25</pref-width>
<pref-height>25</pref-height>
<legend>&lt;</legend>
<binding>
<command>property-adjust</command>
<property>/sim/model/pushback/driver/tow-distance-m</property>
<min>-100</min>
<max>100</max>
<step>-1</step>
<wrap>false</wrap>
</binding>
</button>
<slider>
<row>0</row>
<col>3</col>
<min>-100</min>
<max>100</max>
<property>/sim/model/pushback/driver/tow-distance-m</property>
<live>true</live>
<binding>
<command>dialog-apply</command>
</binding>
</slider>
<button>
<row>0</row>
<col>4</col>
<pref-width>25</pref-width>
<pref-height>25</pref-height>
<legend>&gt;</legend>
<binding>
<command>property-adjust</command>
<property>/sim/model/pushback/driver/tow-distance-m</property>
<min>-100</min>
<max>100</max>
<step>1</step>
<wrap>false</wrap>
</binding>
</button>
<button>
<row>0</row>
<col>5</col>
<pref-width>25</pref-width>
<pref-height>25</pref-height>
<legend>&gt;&gt;</legend>
<binding>
<command>property-adjust</command>
<property>/sim/model/pushback/driver/tow-distance-m</property>
<min>-100</min>
<max>100</max>
<step>10</step>
<wrap>false</wrap>
</binding>
</button>
<text>
<row>0</row>
<col>6</col>
<pref-width>16</pref-width>
<property>/sim/model/pushback/driver/tow-distance-m</property>
<format>%4.0f</format>
<live>true</live>
</text>
<text>
<row>0</row>
<col>7</col>
<label>m </label>
</text>
</group>
<group>
<layout>table</layout>
<text>
<row>0</row>
<col>0</col>
<halign>left</halign>
<label>Facing: </label>
</text>
<button>
<row>0</row>
<col>1</col>
<pref-width>25</pref-width>
<pref-height>25</pref-height>
<legend>&lt;&lt;</legend>
<binding>
<command>property-adjust</command>
<property>/sim/model/pushback/driver/face-heading-deg</property>
<min>0</min>
<max>360</max>
<step>-10</step>
<wrap>false</wrap>
</binding>
</button>
<button>
<row>0</row>
<col>2</col>
<pref-width>25</pref-width>
<pref-height>25</pref-height>
<legend>&lt;</legend>
<binding>
<command>property-adjust</command>
<property>/sim/model/pushback/driver/face-heading-deg</property>
<min>0</min>
<max>360</max>
<step>-1</step>
<wrap>false</wrap>
</binding>
</button>
<slider>
<row>0</row>
<col>3</col>
<min>0</min>
<max>360</max>
<property>/sim/model/pushback/driver/face-heading-deg</property>
<live>true</live>
<binding>
<command>dialog-apply</command>
</binding>
</slider>
<button>
<row>0</row>
<col>4</col>
<pref-width>25</pref-width>
<pref-height>25</pref-height>
<legend>&gt;</legend>
<binding>
<command>property-adjust</command>
<property>/sim/model/pushback/driver/face-heading-deg</property>
<min>0</min>
<max>360</max>
<step>1</step>
<wrap>false</wrap>
</binding>
</button>
<button>
<row>0</row>
<col>5</col>
<pref-width>25</pref-width>
<pref-height>25</pref-height>
<legend>&gt;&gt;</legend>
<binding>
<command>property-adjust</command>
<property>/sim/model/pushback/driver/face-heading-deg</property>
<min>0</min>
<max>360</max>
<step>10</step>
<wrap>false</wrap>
</binding>
</button>
<text>
<row>0</row>
<col>6</col>
<pref-width>16</pref-width>
<property>/sim/model/pushback/driver/face-heading-deg</property>
<format>%3.0f</format>
<live>true</live>
</text>
<text>
<row>0</row>
<col>7</col>
<label> </label>
</text>
</group>
<group>
<layout>hbox</layout>
<button>
<legend>Start</legend>
<binding>
<command>nasal</command>
<script>autopush_driver.start();</script>
</binding>
</button>
<button>
<legend>Stop</legend>
<binding>
<command>nasal</command>
<script>autopush_driver.stop();</script>
</binding>
</button>
</group>
</group>
</PropertyList>

45
Systems/pushback.xml Normal file
View file

@ -0,0 +1,45 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!--
##############################################
# Copyright (c) Joshua Davidson (it0uchpods) #
##############################################
-->
<system name="pushback">
<property>/sim/model/pushback/target-speed-fps</property>
<channel name="Pushback">
<switch name="systems/pushback/linked">
<default value="-1"/>
<test value="0">
/sim/model/pushback/position-norm gt 0.95
/gear/gear/wow == 1
gear/unit[0]/wheel-speed-fps lt 50
</test>
</switch>
<summer name="systems/pushback/speed-error">
<input>/sim/model/pushback/target-speed-fps</input>
<input>-gear/unit[0]/wheel-speed-fps</input>
</summer>
<pid name="systems/pushback/force">
<input>systems/pushback/speed-error</input>
<kp>/sim/model/pushback/kp</kp>
<ki>/sim/model/pushback/ki</ki>
<kd>/sim/model/pushback/kd</kd>
<trigger>systems/pushback/linked</trigger>
<output>/sim/model/pushback/force</output>
</pid>
<switch name="systems/pushback/force-output">
<default value="0"/>
<test value="systems/pushback/force">
systems/pushback/linked == 0
</test>
<output>external_reactions/pushback/magnitude</output>
</switch>
</channel>
</system>

View file

@ -1 +1 @@
4319
4321