Skip to content

Commit

Permalink
removed gainset node in airframe.ml
Browse files Browse the repository at this point in the history
  • Loading branch information
EwoudSmeur committed Nov 28, 2012
1 parent 8bbdbdb commit a36944f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 30 deletions.
28 changes: 14 additions & 14 deletions conf/airframes/esden/gain_scheduling_example.xml
Expand Up @@ -85,27 +85,27 @@
</section>

<!--////////////////THIS SECTION CONTAINS THE GAINS FOR DIFFERENT SETPOINTS\\\\\\\\\\\\\\\\\\-->
<gain_set>
<section name ="GAIN_SETS">
<define name="NUMBER_OF_GAINSETS" value="2"/>
<define name="SCHEDULING_VARIABLE" value="stab_att_sp_euler.theta"/>
<define name="SCHEDULING_POINTS" value="{0, 20*M_PI/180}"/>
<define name="SCHEDULING_VARIABLE_FRAC" value="12"/>

<gain name="PHI_P" value="{0, 1000}"/>
<gain name="PHI_D" value="{0, 1000}"/>
<gain name="PHI_I" value="{0, 1000}"/>
<gain name="PHI_DD" value="{0, 1000}"/>
<define name="PHI_P" value="{0, 1000}"/>
<define name="PHI_D" value="{0, 1000}"/>
<define name="PHI_I" value="{0, 1000}"/>
<define name="PHI_DD" value="{0, 1000}"/>

<gain name="PSI_P" value="{0, 1000}"/>
<gain name="PSI_D" value="{0, 1000}"/>
<gain name="PSI_I" value="{0, 1000}"/>
<gain name="PSI_DD" value="{0, 1000}"/>
<define name="PSI_P" value="{0, 1000}"/>
<define name="PSI_D" value="{0, 1000}"/>
<define name="PSI_I" value="{0, 1000}"/>
<define name="PSI_DD" value="{0, 1000}"/>

<gain name="THETA_P" value="{0, 1000}"/>
<gain name="THETA_D" value="{0, 1000}"/>
<gain name="THETA_I" value="{0, 1000}"/>
<gain name="THETA_DD" value="{0, 1000}"/>
</gain_set>
<define name="THETA_P" value="{0, 1000}"/>
<define name="THETA_D" value="{0, 1000}"/>
<define name="THETA_I" value="{0, 1000}"/>
<define name="THETA_DD" value="{0, 1000}"/>
</section>

<section name="STABILIZATION_ATTITUDE" prefix="STABILIZATION_ATTITUDE_">

Expand Down
Expand Up @@ -162,7 +162,7 @@ static inline void stabilization_attitude_read_rc_roll_pitch_earth_quat_f(struct
q->qi = qi_roll * qi_pitch;
q->qx = qx_roll * qi_pitch;
q->qy = qi_roll * qy_pitch;
q->qz = -qx_roll * qy_pitch;
q->qz = qx_roll * qy_pitch;
}

static inline void stabilization_attitude_read_rc_setpoint_quat_f(struct FloatQuat* q_sp, bool_t in_flight) {
Expand Down
15 changes: 0 additions & 15 deletions sw/tools/gen_airframe.ml
Expand Up @@ -276,21 +276,6 @@ let rec parse_section = fun s ->
printf "#define AllActuatorsInit() { \\\n";
List.iter (fun d -> printf " Actuators%sInit();\\\n" d) drivers;
printf "}\n\n";
| "gain_set" ->
let parse_gain = fun c ->
let attr = fun attr_name -> ExtXml.attrib c attr_name in
match Xml.tag c with
"gain" ->
let name = attr "name"
and value = attr "value" in
printf " #define %s %s\n" name value
| "define" ->
let name = attr "name"
and value = attr "value" in
printf "#define %s %s\n" name value
| _ -> xml_error "gain" in
List.iter parse_gain (Xml.children s);
nl ()
| "include" ->
let filename = ExtXml.attrib s "href" in
let subxml = Xml.parse_file filename in
Expand Down

0 comments on commit a36944f

Please sign in to comment.