Skip to content

Commit

Permalink
Switched compass pitch/roll to daped c++ values
Browse files Browse the repository at this point in the history
  • Loading branch information
hbeni committed Aug 12, 2024
1 parent 9405594 commit 07b0ec4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 40 deletions.
4 changes: 2 additions & 2 deletions Models/Instruments/Compass.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<clip>
<clipMin>-25</clipMin>
<clipMax>25</clipMax>
<property>instrumentation/magnetic-compass/roll-deg-final</property>
<property>instrumentation/magnetic-compass/roll-deg</property>
</clip>
</expression>
<factor>1.0</factor>
Expand All @@ -48,7 +48,7 @@
<clip>
<clipMin>-9</clipMin>
<clipMax>9</clipMax>
<property>instrumentation/magnetic-compass/pitch-deg-final</property>
<property>instrumentation/magnetic-compass/pitch-deg</property>
</clip>
</expression>
<factor>1.0</factor>
Expand Down
42 changes: 4 additions & 38 deletions Systems/instruments.xml
Original file line number Diff line number Diff line change
Expand Up @@ -696,19 +696,19 @@
<not><property>instrumentation/magnetic-compass/stuck</property></not>
<or>
<less-than>
<property>/instrumentation/magnetic-compass/pitch-deg-final</property>
<property>/instrumentation/magnetic-compass/pitch-deg</property>
<property>instrumentation/magnetic-compass/pitch-limit-down</property>
</less-than>
<greater-than>
<property>/instrumentation/magnetic-compass/pitch-deg-final</property>
<property>/instrumentation/magnetic-compass/pitch-deg</property>
<property>instrumentation/magnetic-compass/pitch-limit-up</property>
</greater-than>
<less-than>
<property>/instrumentation/magnetic-compass/roll-deg-final</property>
<property>/instrumentation/magnetic-compass/roll-deg</property>
<property>instrumentation/magnetic-compass/roll-limit-left</property>
</less-than>
<greater-than>
<property>/instrumentation/magnetic-compass/roll-deg-final</property>
<property>/instrumentation/magnetic-compass/roll-deg</property>
<property>instrumentation/magnetic-compass/roll-limit-right</property>
</greater-than>
</or>
Expand Down Expand Up @@ -784,40 +784,6 @@
<property>instrumentation/magnetic-compass/indicated-heading-deg-final</property>
</output>
</filter>
<filter>
<name>Magnetic compass pitch</name>
<type>exponential</type>
<filter-time>0.5</filter-time> <!-- simulate damping fluid -->
<input>
<condition>
<property>instrumentation/magnetic-compass/stuck</property>
</condition>
<property>instrumentation/magnetic-compass/pitch-deg-final</property>
</input>
<input>
<property>/instrumentation/magnetic-compass/pitch-deg</property>
</input>
<output>
<property>instrumentation/magnetic-compass/pitch-deg-final</property>
</output>
</filter>
<filter>
<name>Magnetic compass roll</name>
<type>exponential</type>
<filter-time>0.5</filter-time> <!-- simulate damping fluid -->
<input>
<condition>
<property>instrumentation/magnetic-compass/stuck</property>
</condition>
<property>instrumentation/magnetic-compass/roll-deg-final</property>
</input>
<input>
<property>/instrumentation/magnetic-compass/roll-deg</property>
</input>
<output>
<property>instrumentation/magnetic-compass/roll-deg-final</property>
</output>
</filter>

<!-- VSI damper -->
<!-- To dampen the needle a bit more, especially at very tiny changes (like parking) -->
Expand Down

0 comments on commit 07b0ec4

Please sign in to comment.