Guest User

Untitled

a guest
Mar 24th, 2016
105
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     <!-- TILTROTOR FH-AACHEN
  2.         Bachelorarbeit von MERKEL Kevin, 01.03.16 - 01.08.16 -->
  3. <!DOCTYPE airframe SYSTEM "../airframe.dtd">
  4. <airframe name="Tiltrotor">
  5.  
  6.  
  7.                         <!-- FIRMWARE & SUBSYSTEMS -->
  8.  
  9. <firmware name="rotorcraft">
  10.  <target name="nps" board="pc">
  11.   <subsystem name="fdm" type="jsbsim"/>
  12.  </target>
  13.  <target name="ap"  board="lisa_mx_2.1"/>
  14.    
  15.  <!-- Lisa M V2.1 is designed for the aspirin_v2.1 -->
  16.  <subsystem name="imu"           type="aspirin_v2.1"/>
  17.  <subsystem name="ahrs"          type="int_cmpl_euler"/>
  18.  <subsystem name="radio_control" type="ppm">
  19.    <!-- Put the mode on channel AUX1>
  20.   <define name="RADIO_MODE"     value="RADIO_AUX1"/-->
  21.  </subsystem>
  22.  <subsystem name="telemetry"     type="xbee_api"/>
  23.  <subsystem name="actuators"     type="pwm">
  24.    <define name="SERVO_HZ"       value="400"/>
  25.  </subsystem>
  26.  <subsystem name="stabilization" type="int_euler"/>
  27.  <subsystem name="ins"/>
  28. </firmware>
  29.  
  30.  
  31.                         <!-- SERVOS -->
  32.  
  33. <servos driver="Pwm">
  34.   <servo name="FT"           no="0" min="1000" neutral="1050" max="2000"/>
  35.   <servo name="FB"           no="1" min="1000" neutral="1050" max="2000"/>
  36.   <servo name="BL"           no="2" min="1000" neutral="1050" max="2000"/>
  37.   <servo name="BR"           no="3" min="1000" neutral="1050" max="2000"/>
  38.   <servo name="ELEVON_LEFT"  no="4" min="1000" neutral="1500" max="2000"/>
  39.   <servo name="ELEVON_RIGHT" no="5" min="1000" neutral="1500" max="2000"/>
  40.   <servo name="TILT"         no="6" min="1000" neutral="1500" max="2000"/>
  41. </servos>
  42.  
  43. <commands>
  44.  <axis name="PITCH"     failsafe_value="0"/>
  45.  <axis name="ROLL"      failsafe_value="0"/>
  46.  <axis name="YAW"       failsafe_value="0"/>
  47.  <axis name="THRUST"    failsafe_value="0"/>
  48. </commands>
  49.  
  50. <command_laws>
  51.   <call fun="motor_mixing_run(autopilot_motors_on,FALSE,values)"/>
  52.   <set servo="FT"  value="motor_mixing.commands[0]"/>
  53.   <set servo="FB"  value="motor_mixing.commands[1]"/>
  54.   <set servo="BL"  value="motor_mixing.commands[2]"/>
  55.   <set servo="BR"  value="motor_mixing.commands[3]"/>
  56.  
  57. <!-- Definition von Variabeln die den Elevons für Hover- oder für Flugphase zugeordnet werden. Muss noch editiert werden! -->
  58.   <let var="hover_left"  value="0"/>
  59.   <let var="hover_right" value="0"/>
  60.   <let var="forward_left" value="0"/>
  61.   <let var="forward_right" value="0"/>
  62.  
  63. <!-- Wenn der AP_MODE auf AP_MODE_ATTITUDE_DIRECT eingestellt ist, werden die Werte für hover abgerufen, ansonsten die für flight -->
  64.   <set servo="ELEVON_LEFT"    value="AP_MODE == AP_MODE_RC_DIRECT ? $hover_left  : $forward_left" />
  65.   <set servo="ELEVON_RIGHT"   value="AP_MODE == AP_MODE_RC_DIRECT ? $hover_right  : $forward_right" />
  66. </command_laws>
  67.  
  68.  
  69.                         <!-- MOTOR-MIXING -->
  70.  
  71. <section name="MIXING" prefix="MOTOR_MIXING_">
  72.   <define name="TRIM_ROLL" value="0"/>
  73.   <define name="TRIM_PITCH" value="0"/>
  74.   <define name="TRIM_YAW" value="0"/>
  75.   <define name="NB_MOTOR" value="4"/>
  76.   <define name="SCALE" value="256"/>
  77.  
  78. <!-- Variabeln der Motormatrizen für die unterschiedlichen Flugmodi
  79.  Hover-Flugmodus: >
  80.  <let var="hover_pitch"   value="{ 256, 256, -256, -256 }"/>
  81.  <let var="hover_roll"    value="{0, 0, -256, 256 }"/>
  82.  <let var="hover_yaw"     value="{ -256, 256, 0, 0 }"/>
  83.  <let var="hover_thrust"  value="{ 256, 256, 256, 256 }"/>
  84. <! Flight-Flugmodus: >
  85.  <let var="flight_pitch"  value="{ 0, 0, 0, 0 }"/>
  86.  <let var="flight_roll"   value="{ 0, 0, 0, 0 }"/>
  87.  <let var="flight_yaw"    value="{ 0, 0, 0, 0 }"/>
  88.  <let var="flight_thrust" value="{ 256, 256, 0, 0 }"/-->
  89.  
  90.   <define name="PITCH_COEF"  value="{ 256, 256, -256, -256 }"/>
  91.   <define name="ROLL_COEF"   value="{0, 0, -256, 256 }"/>
  92.   <define name="YAW_COEF"    value="{ -256, 256, 0, 0 }"/>
  93.   <define name="THRUST_COEF" value="{ 256, 256, 256, 256 }"/>
  94. </section>
  95.  
  96.  
  97.  
  98.                         <!-- AUTOPILOT -->
  99.  
  100. <!-- Für Testzwecke, sollte unbedingt AP_MODE_KILL mit eingebaut werden um die Motoren zu jedem Zeitpunkt abschalten zu können -->
  101. <section name="AUTOPILOT">
  102.   <define name="MODE_MANUAL"  value="AP_MODE_KILL"/>
  103.   <!-- AP_MODE_TRANSITION und AP_MODE_FLIGHT müssen in einem eigenen CTRL File programmiert werden -->
  104.   <define name="MODE_AUTO1"   value="AP_MODE_RC_DIRECT"/>
  105.   <define name="MODE_AUTO2"   value="AP_MODE_ATTITUDE_DIRECT"/>
  106.  
  107.   <define name="USE_THROTTLE_FOR_MOTOR_ARMING" value="TRUE"/>
  108. </section>
  109.  
  110. <!--section name="BAT">
  111.  <define name="MIN_BAT_LEVEL" value="10.4" units="V"/>
  112.  <define name="CATASTROPHIC_BAT_LEVEL" value="9.3" unit="V"/>
  113. </section-->
  114.  
  115.  
  116.                         <!-- GAIN-SETS -->
  117.  
  118. <section name="GUIDANCE_V" prefix="GUIDANCE_V_">
  119.   <define name="HOVER_KP"    value="150"/>
  120.   <define name="HOVER_KD"    value="80"/>
  121.   <define name="HOVER_KI"    value="20"/>
  122.   <!-- optional parameters
  123.  <define name="NOMINAL_HOVER_THROTTLE" value="0.5"/>
  124.  <define name="ADAPT_THROTTLE_ENABLED" value="TRUE"/>
  125.  <define name="REF_MIN_ZD" value="-3.0" unit="m/s"/>
  126.  <define name="REF_MAX_ZD" value="3.0" unit="m/s"/>
  127.  <define name="MAX_RC_CLIMB_SPEED" value="-3.0" unit="m/s"/>
  128.  <define name="MAX_RC_DESCENT_SPEED" value="3.0" unit="m/s"/-->
  129. </section>
  130.  
  131. <section name="GUIDANCE_H" prefix="GUIDANCE_H_">
  132.   <define name="PGAIN" value="50"/>
  133.   <define name="DGAIN" value="100"/>
  134.   <define name="IGAIN" value="20"/>
  135.   <!-- optional parameters
  136.  <define name="AGAIN" value="0"/>
  137.  <define name="VGAIN" value="0"/>
  138.  <define name="MAX_BANK" value="20" unit="deg"/>
  139.  <define name="USE_SPEED_REF" value="TRUE"/>
  140.  <define name="REF_MAX_SPEED" value="5.0" unit="m/s"/>
  141.  <define name="REF_MAX_ACCEL" value="5.66" unit="m/s2"/>
  142.  <define name="REF_OMEGA" value="67" unit="deg"/>
  143.  <define name="REF_ZETA" value="0.85"/>
  144.  <define name="REF_TAU" value="0.5"/>
  145.  <define name="APPROX_FORCE_BY_THRUST" value="FALSE"/-->
  146. </section>
  147.  
  148.  
  149.  
  150.                     <!-- STABILIZATION -->
  151.  
  152. <section name="STABILIZATION_ATTITUDE" prefix="STABILIZATION_ATTITUDE_">
  153.   <!-- setpoints -->
  154.   <define name="SP_MAX_PHI"     value="45." unit="deg"/>
  155.   <define name="SP_MAX_THETA"   value="45." unit="deg"/>
  156.   <define name="SP_MAX_R"       value="90." unit="deg/s"/>
  157.   <define name="DEADBAND_A"     value="0"/>
  158.   <define name="DEADBAND_E"     value="0"/>
  159.   <define name="DEADBAND_R"     value="250"/>
  160.  
  161.   <!-- reference -->
  162.   <define name="REF_OMEGA_P"  value="800" unit="deg/s"/>
  163.   <define name="REF_ZETA_P"   value="0.85"/>
  164.   <define name="REF_MAX_P"    value="400." unit="deg/s"/>
  165.   <define name="REF_MAX_PDOT" value="RadOfDeg(8000.)"/>
  166.  
  167.   <define name="REF_OMEGA_Q"  value="800" unit="deg/s"/>
  168.   <define name="REF_ZETA_Q"   value="0.85"/>
  169.   <define name="REF_MAX_Q"    value="400." unit="deg/s"/>
  170.   <define name="REF_MAX_QDOT" value="RadOfDeg(8000.)"/>
  171.  
  172.   <define name="REF_OMEGA_R"  value="500" unit="deg/s"/>
  173.   <define name="REF_ZETA_R"   value="0.85"/>
  174.   <define name="REF_MAX_R"    value="180." unit="deg/s"/>
  175.   <define name="REF_MAX_RDOT" value="RadOfDeg(1800.)"/>
  176.  
  177.   <!-- feedback -->
  178.   <define name="PHI_PGAIN"  value="1000"/>
  179.   <define name="PHI_DGAIN"  value="400"/>
  180.   <define name="PHI_IGAIN"  value="200"/>
  181.  
  182.   <define name="THETA_PGAIN"  value="1000"/>
  183.   <define name="THETA_DGAIN"  value="400"/>
  184.   <define name="THETA_IGAIN"  value="200"/>
  185.  
  186.   <define name="PSI_PGAIN"  value="500"/>
  187.   <define name="PSI_DGAIN"  value="300"/>
  188.   <define name="PSI_IGAIN"  value="10"/>
  189.  
  190.   <!-- feedforward -->
  191.   <define name="PHI_DDGAIN"   value="300"/>
  192.   <define name="THETA_DDGAIN" value="300"/>
  193.   <define name="PSI_DDGAIN"   value="300"/>
  194. </section>
  195.  
  196. </airframe>
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×