Skip to content

Commit

Permalink
Merge pull request #496 from TheFGFSEagle/master
Browse files Browse the repository at this point in the history
Add compass correction card
  • Loading branch information
hbeni authored Nov 21, 2022
2 parents 8befd6b + 12a8cff commit 712ebb2
Show file tree
Hide file tree
Showing 7 changed files with 103 additions and 0 deletions.
Binary file added Models/Effects/null_lm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Models/Instruments/Compass-correction-card.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions Models/Instruments/CompassCorrectionCard.ac
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
AC3Db
MATERIAL "CompassCorrectionCardMaterial" rgb 1.000 1.000 1.000 amb 1.000 1.000 1.000 emis 0.000 0.000 0.000 spec 1.000 1.000 1.000 shi 102 trans 0.000
OBJECT world
name "Blender_exporter_v3.3__CompassCorrectionCard.ac"
kids 1
OBJECT poly
name "CompassCorrectionCard"
data 5
Plane
crease 40.0
texture "Compass-correction-card.png"
numvert 4
0 0.01563 0.04
-0 -0.01563 0.04
0 0.01563 -0.04
-0 -0.01563 -0.04
numsurf 1
SURF 0X0
mat 0
refs 4
0 0 0.8875
1 0 0.1125
3 1 0.1125
2 1 0.8875
kids 0
Binary file added Models/Instruments/CompassCorrectionCard.blend
Binary file not shown.
30 changes: 30 additions & 0 deletions Models/Instruments/CompassCorrectionCard.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<PropertyList>
<path>CompassCorrectionCard.ac</path>

<animation>
<type>material</type>
<object-name>CompassCorrectionCard</object-name>
<emission>
<red>1</red>
<green>1</green>
<blue>1</blue>
<factor-prop>sim/model/c182s/lighting/panel-emission-factor</factor-prop>
</emission>
</animation>

<effect>
<inherits-from>Aircraft/c182s/Models/Effects/c182s_glareshield</inherits-from>
<object-name>CompassCorrectionCard</object-name>
<parameters>
<texture n="3">
<image>Aircraft/c182s/Models/Effects/null_lm.png</image>
<type>2d</type>
<filter>linear-mipmap-linear</filter>
<wrap-s>clamp</wrap-s>
<wrap-t>clamp</wrap-t>
<internal-format>normalized</internal-format>
</texture>
</parameters>
</effect>
</PropertyList>
25 changes: 25 additions & 0 deletions Models/interior-model-c182s.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,22 @@
<object-name>VACR.Ann</object-name>
<object-name>Volts.Ann</object-name>
</effect>

<animation>
<condition>
<not>
<property>sim/rendering/shaders/skydome</property>
</not>
</condition>
<type>material</type>
<object-name>Panel</object-name>
<emission>
<red>1</red>
<green>1</green>
<blue>1</blue>
<factor-prop>sim/model/c182s/lighting/panel-emission-factor</factor-prop>
</emission>
</animation>

<effect>
<inherits-from>Aircraft/c182s/Models/Effects/c182s_glareshield</inherits-from>
Expand Down Expand Up @@ -2714,6 +2730,15 @@
<z-m>0.685</z-m>
</offsets>
</model>

<model>
<path>Instruments/CompassCorrectionCard.xml</path>
<offsets>
<x-m>0.352</x-m>
<y-m>0.22</y-m>
<z-m>0.42</z-m>
</offsets>
</model>

<!--avionics-->
<model>
Expand Down
23 changes: 23 additions & 0 deletions Systems/als-lights.xml
Original file line number Diff line number Diff line change
Expand Up @@ -975,4 +975,27 @@
</filter>


<filter>
<name>Panel emission factor</name>
<type>gain</type>
<input>
<expression>
<sum>
<product>
<property>/systems/electrical/outputs/glareshield-lights-norm</property>
<value>0.6</value>
</product>
<product>
<property>/systems/electrical/outputs/dome-light-l</property>
<value>0.15</value>
</product>
<product>
<property>/systems/electrical/outputs/dome-light-r</property>
<value>0.05</value>
</product>
</sum>
</expression>
</input>
<output>/sim/model/c182s/lighting/panel-emission-factor</output>
</filter>
</PropertyList>

0 comments on commit 712ebb2

Please sign in to comment.