MAV'RIC
|
00001 /******************************************************************************* 00002 * Copyright (c) 2009-2016, MAV'RIC Development Team 00003 * All rights reserved. 00004 * 00005 * Redistribution and use in source and binary forms, with or without 00006 * modification, are permitted provided that the following conditions are met: 00007 * 00008 * 1. Redistributions of source code must retain the above copyright notice, 00009 * this list of conditions and the following disclaimer. 00010 * 00011 * 2. Redistributions in binary form must reproduce the above copyright notice, 00012 * this list of conditions and the following disclaimer in the documentation 00013 * and/or other materials provided with the distribution. 00014 * 00015 * 3. Neither the name of the copyright holder nor the names of its contributors 00016 * may be used to endorse or promote products derived from this software without 00017 * specific prior written permission. 00018 * 00019 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00020 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00021 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 00022 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 00023 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 00024 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 00025 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 00026 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 00027 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 00028 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 00029 * POSSIBILITY OF SUCH DAMAGE. 00030 ******************************************************************************/ 00031 00032 /******************************************************************************* 00033 * \file attitude_controller_ywing_config.h 00034 * 00035 * \author MAV'RIC Team 00036 * \author Julien Lecoeur 00037 * 00038 * \brief Configuration for the module attitude_controller for Ywing 00039 * 00040 ******************************************************************************/ 00041 00042 00043 #ifndef ATTITUDE_CONTROLLER_YWING_CONFIG_H_ 00044 #define ATTITUDE_CONTROLLER_YWING_CONFIG_H_ 00045 00046 #ifdef __cplusplus 00047 extern "C" { 00048 #endif 00049 00050 #include "control/attitude_controller.h" 00051 00052 static attitude_controller_conf_t attitude_controller_ywing_config = 00053 { 00054 // ######################################################################### 00055 // ###### RATE CONTROL ################################################### 00056 // ######################################################################### 00057 .rate_pid_config = 00058 { 00059 // ----------------------------------------------------------------- 00060 // ------ ROLL RATE PID -------------------------------------------- 00061 // ----------------------------------------------------------------- 00062 { 00063 .p_gain = 0.2f, 00064 .clip_min = -1.0f, 00065 .clip_max = 1.0f, 00066 .integrator = 00067 { 00068 .gain = 0.0f, 00069 .clip_pre = 1.0f, 00070 .accumulator = 0.0f, 00071 .clip = 1.0f, 00072 }, 00073 .differentiator = 00074 { 00075 .gain = 0.002f, 00076 .previous = 0.0f, 00077 .clip = 1.0f 00078 }, 00079 .soft_zone_width = 0.0f, 00080 }, 00081 // ----------------------------------------------------------------- 00082 // ------ PITCH RATE PID ------------------------------------------- 00083 // ----------------------------------------------------------------- 00084 { 00085 .p_gain = 0.3f, 00086 .clip_min = -1.0f, 00087 .clip_max = 1.0f, 00088 .integrator = 00089 { 00090 .gain = 0.0f, 00091 .clip_pre = 1.0f, 00092 .accumulator = 0.0f, 00093 .clip = 1.0f, 00094 }, 00095 .differentiator = 00096 { 00097 .gain = 0.002f, 00098 .previous = 0.0f, 00099 .clip = 1.0f 00100 }, 00101 .soft_zone_width = 0.0f, 00102 }, 00103 // ----------------------------------------------------------------- 00104 // ------ YAW RATE PID --------------------------------------------- 00105 // ----------------------------------------------------------------- 00106 { 00107 .p_gain = 0.3f, 00108 .clip_min = -1.0f, 00109 .clip_max = 1.0f, 00110 .integrator = { 00111 .gain = 0.0f, 00112 .clip_pre = 1.0f, 00113 .accumulator = 0.0f, 00114 .clip = 1.0f, 00115 }, 00116 .differentiator = { 00117 .gain = 0.002f, 00118 .previous = 0.0f, 00119 .clip = 1.0f 00120 }, 00121 .soft_zone_width = 0.0f 00122 } 00123 }, 00124 // ######################################################################### 00125 // ###### ANGLE CONTROL ################################################## 00126 // ######################################################################### 00127 .angle_pid_config = 00128 { 00129 // ----------------------------------------------------------------- 00130 // ------ ROLL ANGLE PID ------------------------------------------- 00131 // ----------------------------------------------------------------- 00132 { 00133 .p_gain = 5.0f, 00134 .clip_min = -10.0f, 00135 .clip_max = 10.0f, 00136 .integrator = { 00137 .gain = 0.0f, 00138 .clip_pre = 1.0f, 00139 .accumulator = 0.0f, 00140 .clip = 10.0f, 00141 }, 00142 .differentiator = { 00143 .gain = 0.0f, 00144 .previous = 0.0f, 00145 .clip = 10.0f 00146 }, 00147 .soft_zone_width = 0.0f 00148 }, 00149 // ----------------------------------------------------------------- 00150 // ------ PITCH ANGLE PID ------------------------------------------ 00151 // ----------------------------------------------------------------- 00152 { 00153 .p_gain = 6.0f, 00154 .clip_min = -10.0f, 00155 .clip_max = 10.0f, 00156 .integrator = { 00157 .gain = 0.0f, 00158 .clip_pre = 1.0f, 00159 .accumulator = 0.0f, 00160 .clip = 10.0f, 00161 }, 00162 .differentiator = { 00163 .gain = 0.0f, 00164 .previous = 0.0f, 00165 .clip = 10.0f 00166 }, 00167 .soft_zone_width = 0.0f 00168 }, 00169 // ----------------------------------------------------------------- 00170 // ------ YAW ANGLE PID -------------------------------------------- 00171 // ----------------------------------------------------------------- 00172 { 00173 .p_gain = 6.0f, 00174 .clip_min = -10.0f, 00175 .clip_max = 10.0f, 00176 .integrator = { 00177 .gain = 0.0f, 00178 .clip_pre = 1.0f, 00179 .accumulator = 0.0f, 00180 .clip = 10.0f, 00181 }, 00182 .differentiator = { 00183 .gain = 0.0f, 00184 .previous = 0.0f, 00185 .clip = 10.0f 00186 }, 00187 .soft_zone_width = 0.0f 00188 }, 00189 }, 00190 }; 00191 00192 #ifdef __cplusplus 00193 } 00194 #endif 00195 00196 #endif // ATTITUDE_CONTROLLER_YWING_CONFIG_H_