<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
 <class>StabilizationWidget</class>
 <widget class="QWidget" name="StabilizationWidget">
  <property name="geometry">
   <rect>
    <x>0</x>
    <y>0</y>
    <width>639</width>
    <height>465</height>
   </rect>
  </property>
  <property name="windowTitle">
   <string>Form</string>
  </property>
  <layout class="QVBoxLayout" name="verticalLayout_3">
   <item>
    <widget class="QTabWidget" name="piFactors">
     <property name="currentIndex">
      <number>0</number>
     </property>
     <widget class="QWidget" name="tab">
      <attribute name="title">
       <string>PI Factors</string>
      </attribute>
      <layout class="QVBoxLayout" name="verticalLayout_2">
       <item>
        <layout class="QVBoxLayout" name="verticalLayout">
         <item>
          <layout class="QHBoxLayout" name="horizontalLayout_3">
           <item>
            <widget class="QLabel" name="label_8">
             <property name="text">
              <string>Rate Stabilization (inner loop)</string>
             </property>
            </widget>
           </item>
           <item>
            <spacer name="horizontalSpacer_3">
             <property name="orientation">
              <enum>Qt::Horizontal</enum>
             </property>
             <property name="sizeHint" stdset="0">
              <size>
               <width>40</width>
               <height>20</height>
              </size>
             </property>
            </spacer>
           </item>
           <item>
            <widget class="QLabel" name="label_4">
             <property name="text">
              <string>Hint: read the toolips!</string>
             </property>
            </widget>
           </item>
          </layout>
         </item>
         <item>
          <widget class="QFrame" name="frame_2">
           <property name="toolTip">
            <string>First, work on rate stabilization.</string>
           </property>
           <property name="frameShape">
            <enum>QFrame::StyledPanel</enum>
           </property>
           <property name="frameShadow">
            <enum>QFrame::Raised</enum>
           </property>
           <layout class="QGridLayout" name="gridLayout" columnstretch="1,1,2,2,2">
            <item row="1" column="1">
             <widget class="QLabel" name="label_10">
              <property name="text">
               <string>Roll</string>
              </property>
             </widget>
            </item>
            <item row="1" column="2">
             <widget class="QDoubleSpinBox" name="rateRollKp">
              <property name="toolTip">
               <string>Slowly raise Kp until you start seeing clear oscillations when you fly.
Then lower the value by 20% or so.</string>
              </property>
              <property name="decimals">
               <number>6</number>
              </property>
              <property name="singleStep">
               <double>0.000100000000000</double>
              </property>
             </widget>
            </item>
            <item row="2" column="1">
             <widget class="QLabel" name="label_11">
              <property name="text">
               <string>Pitch</string>
              </property>
             </widget>
            </item>
            <item row="2" column="2">
             <widget class="QDoubleSpinBox" name="ratePitchKp">
              <property name="toolTip">
               <string>Slowly raise Kp until you start seeing clear oscillations when you fly.
Then lower the value by 20% or so.</string>
              </property>
              <property name="decimals">
               <number>6</number>
              </property>
              <property name="singleStep">
               <double>0.000100000000000</double>
              </property>
             </widget>
            </item>
            <item row="0" column="2">
             <widget class="QLabel" name="label_12">
              <property name="text">
               <string>Kp</string>
              </property>
              <property name="alignment">
               <set>Qt::AlignCenter</set>
              </property>
             </widget>
            </item>
            <item row="1" column="3">
             <widget class="QDoubleSpinBox" name="rateRollKi">
              <property name="toolTip">
               <string>I factor for rate stabilization is usually very low or even zero.</string>
              </property>
              <property name="decimals">
               <number>6</number>
              </property>
              <property name="singleStep">
               <double>0.000100000000000</double>
              </property>
             </widget>
            </item>
            <item row="2" column="3">
             <widget class="QDoubleSpinBox" name="ratePitchKi">
              <property name="toolTip">
               <string>I factor for rate stabilization is usually very low or even zero.</string>
              </property>
              <property name="decimals">
               <number>6</number>
              </property>
              <property name="singleStep">
               <double>0.000100000000000</double>
              </property>
             </widget>
            </item>
            <item row="0" column="3">
             <widget class="QLabel" name="label_13">
              <property name="text">
               <string>Ki</string>
              </property>
              <property name="alignment">
               <set>Qt::AlignCenter</set>
              </property>
             </widget>
            </item>
            <item row="1" column="4">
             <widget class="QDoubleSpinBox" name="rateRollILimit">
              <property name="decimals">
               <number>6</number>
              </property>
              <property name="singleStep">
               <double>0.000100000000000</double>
              </property>
             </widget>
            </item>
            <item row="2" column="4">
             <widget class="QDoubleSpinBox" name="ratePitchILimit">
              <property name="decimals">
               <number>6</number>
              </property>
              <property name="singleStep">
               <double>0.000100000000000</double>
              </property>
             </widget>
            </item>
            <item row="0" column="4">
             <widget class="QLabel" name="label_14">
              <property name="text">
               <string>ILimit</string>
              </property>
              <property name="alignment">
               <set>Qt::AlignCenter</set>
              </property>
             </widget>
            </item>
            <item row="1" column="0" rowspan="2">
             <widget class="QCheckBox" name="linkRateRP">
              <property name="toolTip">
               <string>If checked, the Roll and Pitch factors will be identical.
When you change one, the other is updated.</string>
              </property>
              <property name="text">
               <string>Link</string>
              </property>
             </widget>
            </item>
            <item row="3" column="1">
             <widget class="QLabel" name="label_15">
              <property name="text">
               <string>Yaw</string>
              </property>
             </widget>
            </item>
            <item row="3" column="2">
             <widget class="QDoubleSpinBox" name="rateYawKp">
              <property name="toolTip">
               <string>Slowly raise Kp until you start seeing clear oscillations when you fly.
Then lower the value by 20% or so.

You can usually go for higher values for Yaw factors.</string>
              </property>
              <property name="decimals">
               <number>6</number>
              </property>
              <property name="singleStep">
               <double>0.000100000000000</double>
              </property>
             </widget>
            </item>
            <item row="3" column="3">
             <widget class="QDoubleSpinBox" name="rateYawKi">
              <property name="toolTip">
               <string>As a rule of thumb, you can set YawRate Ki at roughly the same
value as YawRate Kp.</string>
              </property>
              <property name="decimals">
               <number>6</number>
              </property>
              <property name="singleStep">
               <double>0.000100000000000</double>
              </property>
             </widget>
            </item>
            <item row="3" column="4">
             <widget class="QDoubleSpinBox" name="rateYawILimit">
              <property name="decimals">
               <number>6</number>
              </property>
              <property name="singleStep">
               <double>0.000100000000000</double>
              </property>
             </widget>
            </item>
           </layout>
          </widget>
         </item>
         <item>
          <widget class="QLabel" name="label_9">
           <property name="text">
            <string>Attitude Stabilization (outer loop)</string>
           </property>
          </widget>
         </item>
         <item>
          <widget class="QFrame" name="frame_3">
           <property name="frameShape">
            <enum>QFrame::StyledPanel</enum>
           </property>
           <property name="frameShadow">
            <enum>QFrame::Raised</enum>
           </property>
           <layout class="QGridLayout" name="gridLayout_2" columnstretch="1,1,2,2,2">
            <item row="1" column="0" rowspan="2">
             <widget class="QCheckBox" name="linkAttitudeRP">
              <property name="toolTip">
               <string>If checked, the Roll and Pitch factors will be identical.
When you change one, the other is updated.</string>
              </property>
              <property name="text">
               <string>Link</string>
              </property>
             </widget>
            </item>
            <item row="1" column="1">
             <widget class="QLabel" name="label_16">
              <property name="text">
               <string>Roll</string>
              </property>
             </widget>
            </item>
            <item row="2" column="1">
             <widget class="QLabel" name="label_17">
              <property name="text">
               <string>Pitch</string>
              </property>
             </widget>
            </item>
            <item row="3" column="1">
             <widget class="QLabel" name="label_18">
              <property name="text">
               <string>Yaw</string>
              </property>
             </widget>
            </item>
            <item row="1" column="2">
             <widget class="QDoubleSpinBox" name="rollKp">
              <property name="toolTip">
               <string>Once Rate stabilization is done, you should increase the Kp factor until the airframe oscillates again, and go back down 20% or so.
</string>
              </property>
              <property name="decimals">
               <number>6</number>
              </property>
              <property name="singleStep">
               <double>0.100000000000000</double>
              </property>
             </widget>
            </item>
            <item row="2" column="2">
             <widget class="QDoubleSpinBox" name="pitchKp">
              <property name="toolTip">
               <string>Once Rate stabilization is done, you should increase the Kp factor until the airframe oscillates again, and go back down 20% or so.
</string>
              </property>
              <property name="decimals">
               <number>6</number>
              </property>
              <property name="singleStep">
               <double>0.100000000000000</double>
              </property>
             </widget>
            </item>
            <item row="3" column="2">
             <widget class="QDoubleSpinBox" name="yawKp">
              <property name="toolTip">
               <string>Once Rate stabilization is done, you should increase the Kp factor until the airframe oscillates again, and go back down 20% or so.
</string>
              </property>
              <property name="decimals">
               <number>6</number>
              </property>
              <property name="singleStep">
               <double>0.100000000000000</double>
              </property>
             </widget>
            </item>
            <item row="1" column="3">
             <widget class="QDoubleSpinBox" name="rollKi">
              <property name="toolTip">
               <string>Ki can usually be almost identical to Kp.</string>
              </property>
              <property name="decimals">
               <number>6</number>
              </property>
              <property name="singleStep">
               <double>0.100000000000000</double>
              </property>
             </widget>
            </item>
            <item row="2" column="3">
             <widget class="QDoubleSpinBox" name="pitchKi">
              <property name="toolTip">
               <string>Ki can usually be almost identical to Kp.</string>
              </property>
              <property name="decimals">
               <number>6</number>
              </property>
              <property name="singleStep">
               <double>0.100000000000000</double>
              </property>
             </widget>
            </item>
            <item row="3" column="3">
             <widget class="QDoubleSpinBox" name="yawKi">
              <property name="toolTip">
               <string>Ki can usually be almost identical to Kp.</string>
              </property>
              <property name="decimals">
               <number>6</number>
              </property>
              <property name="singleStep">
               <double>0.100000000000000</double>
              </property>
             </widget>
            </item>
            <item row="1" column="4">
             <widget class="QDoubleSpinBox" name="rollILimit">
              <property name="toolTip">
               <string>ILimit can be equal to three to four times Ki, but you can adjust
depending on whether your airframe is well balanced, and your
flying style.</string>
              </property>
              <property name="decimals">
               <number>6</number>
              </property>
              <property name="singleStep">
               <double>0.100000000000000</double>
              </property>
             </widget>
            </item>
            <item row="2" column="4">
             <widget class="QDoubleSpinBox" name="pitchILimit">
              <property name="toolTip">
               <string>ILimit can be equal to three to four times Ki, but you can adjust
depending on whether your airframe is well balanced, and your
flying style.</string>
              </property>
              <property name="decimals">
               <number>6</number>
              </property>
              <property name="singleStep">
               <double>0.100000000000000</double>
              </property>
             </widget>
            </item>
            <item row="3" column="4">
             <widget class="QDoubleSpinBox" name="yawILimit">
              <property name="toolTip">
               <string>ILimit can be equal to three to four times Ki, but you can adjust
depending on whether your airframe is well balanced, and your
flying style.</string>
              </property>
              <property name="decimals">
               <number>6</number>
              </property>
              <property name="singleStep">
               <double>0.100000000000000</double>
              </property>
             </widget>
            </item>
            <item row="0" column="2">
             <widget class="QLabel" name="label_19">
              <property name="text">
               <string>Kp</string>
              </property>
              <property name="alignment">
               <set>Qt::AlignCenter</set>
              </property>
             </widget>
            </item>
            <item row="0" column="3">
             <widget class="QLabel" name="label_20">
              <property name="text">
               <string>Ki</string>
              </property>
              <property name="alignment">
               <set>Qt::AlignCenter</set>
              </property>
             </widget>
            </item>
            <item row="0" column="4">
             <widget class="QLabel" name="label_21">
              <property name="text">
               <string>ILimit</string>
              </property>
              <property name="alignment">
               <set>Qt::AlignCenter</set>
              </property>
             </widget>
            </item>
           </layout>
          </widget>
         </item>
         <item>
          <spacer name="verticalSpacer">
           <property name="orientation">
            <enum>Qt::Vertical</enum>
           </property>
           <property name="sizeHint" stdset="0">
            <size>
             <width>20</width>
             <height>40</height>
            </size>
           </property>
          </spacer>
         </item>
         <item>
          <widget class="QCheckBox" name="realTimeUpdates">
           <property name="toolTip">
            <string>If you check this, the GCS will udpate the stabilization factors
automatically every 300ms, which will help for fast tuning.</string>
           </property>
           <property name="text">
            <string>Update in real time</string>
           </property>
          </widget>
         </item>
        </layout>
       </item>
      </layout>
     </widget>
     <widget class="QWidget" name="tab_2">
      <attribute name="title">
       <string>Limits</string>
      </attribute>
      <layout class="QHBoxLayout" name="horizontalLayout">
       <item>
        <widget class="QGroupBox" name="groupBox">
         <property name="title">
          <string>Angle limits</string>
         </property>
         <layout class="QVBoxLayout" name="verticalLayout_4">
          <item>
           <widget class="QFrame" name="frame">
            <property name="toolTip">
             <string>In this area, you can setup the limits for roll, pitch and yaw in attitude mode, i.e. what max attitude the airframe will reach if the sticks are pushed to the max.</string>
            </property>
            <property name="frameShape">
             <enum>QFrame::StyledPanel</enum>
            </property>
            <property name="frameShadow">
             <enum>QFrame::Raised</enum>
            </property>
            <layout class="QFormLayout" name="formLayout">
             <property name="fieldGrowthPolicy">
              <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
             </property>
             <item row="0" column="0">
              <widget class="QLabel" name="label">
               <property name="text">
                <string>RollMax</string>
               </property>
              </widget>
             </item>
             <item row="0" column="1">
              <widget class="QSpinBox" name="rollMax">
               <property name="maximum">
                <number>180</number>
               </property>
              </widget>
             </item>
             <item row="1" column="0">
              <widget class="QLabel" name="label_2">
               <property name="text">
                <string>PitchMax</string>
               </property>
              </widget>
             </item>
             <item row="1" column="1">
              <widget class="QSpinBox" name="pitchMax">
               <property name="maximum">
                <number>180</number>
               </property>
              </widget>
             </item>
             <item row="2" column="0">
              <widget class="QLabel" name="label_3">
               <property name="text">
                <string>YawMax</string>
               </property>
              </widget>
             </item>
             <item row="2" column="1">
              <widget class="QSpinBox" name="yawMax">
               <property name="maximum">
                <number>180</number>
               </property>
              </widget>
             </item>
            </layout>
           </widget>
          </item>
          <item>
           <spacer name="verticalSpacer_2">
            <property name="orientation">
             <enum>Qt::Vertical</enum>
            </property>
            <property name="sizeHint" stdset="0">
             <size>
              <width>20</width>
              <height>40</height>
             </size>
            </property>
           </spacer>
          </item>
         </layout>
        </widget>
       </item>
       <item>
        <spacer name="horizontalSpacer_2">
         <property name="orientation">
          <enum>Qt::Horizontal</enum>
         </property>
         <property name="sizeHint" stdset="0">
          <size>
           <width>40</width>
           <height>20</height>
          </size>
         </property>
        </spacer>
       </item>
      </layout>
     </widget>
    </widget>
   </item>
   <item>
    <layout class="QHBoxLayout" name="horizontalLayout_2">
     <item>
      <spacer name="horizontalSpacer">
       <property name="orientation">
        <enum>Qt::Horizontal</enum>
       </property>
       <property name="sizeHint" stdset="0">
        <size>
         <width>40</width>
         <height>20</height>
        </size>
       </property>
      </spacer>
     </item>
     <item>
      <widget class="QPushButton" name="resetStabilizationToDefaults">
       <property name="enabled">
        <bool>false</bool>
       </property>
       <property name="toolTip">
        <string>Not implemented yet.</string>
       </property>
       <property name="text">
        <string>Reset to defaults</string>
       </property>
      </widget>
     </item>
     <item>
      <widget class="QPushButton" name="getStabilizationCurrent">
       <property name="text">
        <string>Get Current</string>
       </property>
      </widget>
     </item>
     <item>
      <widget class="QPushButton" name="saveStabilizationToRAM">
       <property name="text">
        <string>Save to RAM</string>
       </property>
      </widget>
     </item>
     <item>
      <widget class="QPushButton" name="saveStabilizationToSD">
       <property name="text">
        <string>Save to SD</string>
       </property>
      </widget>
     </item>
    </layout>
   </item>
  </layout>
 </widget>
 <resources/>
 <connections/>
</ui>
