From 0e0d8c162005637c2ac6920c3365b63ad3b1bb1d Mon Sep 17 00:00:00 2001 From: Joshua Davidson <joshuadavidson2000@gmail.com> Date: Wed, 6 Dec 2017 11:25:05 -0500 Subject: [PATCH] A3XX: Fix FBW G Pitch 'Shaking' Elevator --- Systems/fbw-pitch.xml | 32 +++++++++++++++++++++++++++++--- revision.txt | 2 +- 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/Systems/fbw-pitch.xml b/Systems/fbw-pitch.xml index 167205d8..8030da07 100644 --- a/Systems/fbw-pitch.xml +++ b/Systems/fbw-pitch.xml @@ -61,7 +61,7 @@ <input> <expression> <sum> - <property>/accelerations/pilot-g</property> + <property>/accelerations/pilot-gdamped</property> <div> <value>1</value> <cos> @@ -132,7 +132,7 @@ <property>/it-fbw/g-elevator</property> </output> <config> - <Kp>-2.5</Kp> + <Kp>-1.5</Kp> <Ki>-1.5</Ki> <min> <condition> @@ -404,7 +404,7 @@ <property>/it-fbw/pitch-rate</property> </reference> <output> - <property>/controls/flight/elevator-fbw-cmd</property> + <property>/controls/flight/elevator-fbw-pid</property> </output> <config> <Kp> @@ -422,6 +422,32 @@ </config> </pid-controller> + <filter> + <name>IT-CONTROLLER: ELEVATOR INVERT</name> + <type>gain</type> + <gain>1.0</gain> + <input> + <condition> + <and> + <less-than-equals> + <property>/orientation/roll-deg</property> + <value>90</value> + </less-than-equals> + <greater-than-equals> + <property>/orientation/roll-deg</property> + <value>-90</value> + </greater-than-equals> + </and> + </condition> + <property>/controls/flight/elevator-fbw-pid</property> + </input> + <input> + <property>/controls/flight/elevator-fbw-pid</property> + <scale>-1.0</scale> + </input> + <output>/controls/flight/elevator-fbw-cmd</output> + </filter> + <filter> <name>IT-CONTROLLER: PITCH OPTION</name> <debug>false</debug> diff --git a/revision.txt b/revision.txt index 723e8a8a..fefa68a8 100644 --- a/revision.txt +++ b/revision.txt @@ -1 +1 @@ -4061 \ No newline at end of file +4062 \ No newline at end of file