<?xml version="1.0" encoding="UTF-8"?>

<PropertyList>
	<filter>
		<name>airspeed-clamped-sqrt</name>
		<input>
			<expression>
				<sqrt>
					<quotient>
						<min>
							<property>/velocities/airspeed-kt</property>
							<value>40</value>
						</min>
						<value>40</value>
					</quotient>
				</sqrt>
			</expression>
		</input>
		<output>/sim/model/glass-effects/airspeed-clamped-sqrt</output>
	</filter>
	<filter>
		<name>Splash Vector X</name>
		<input>
			<expression>
				<difference>
					<value>-0.1</value>
					<product>
						<value>2.0</value>
						<property>/fdm/jsbsim/glass-effects/airspeed-clamped-sqrt</property>
					</product>
				</difference>
			</expression>
		</input>
		<output>/environment/aircraft-effects/splash-vector-x</output>
	</filter>
	<filter>
		<name>Splash Vector Y</name>
		<input>0.0</input>
		<output>/environment/aircraft-effects/splash-vector-y</output>
	</filter>
	<filter>
		<name>Splash Vector Z</name>
		<input>
			<expression>
				<difference>
					<value>1.0</value>
					<product>
						<value>1.35</value>
						<property>/fdm/jsbsim/glass-effects/airspeed-clamped-sqrt</property>
					</product>
				</difference>
			</expression>
		</input>
		<output>/environment/aircraft-effects/splash-vector-z</output>
	</filter>
	<!--	Emission from Panel and Instrument Lights	-->
	<filter>
		<type>gain</type>
		<gain>1.0</gain>
		<input>
			<expression>
				<sum>
					<product>
						<property>/systems/electrical/outputs/panel-light-norm[0]</property>
						<value>0.6</value>
					</product>
					<product>
						<property>/systems/electrical/outputs/panel-light-norm[1]</property>
						<value>0.2</value>
					</product>
					<product>
						<property>/systems/electrical/outputs/panel-light-norm[2]</property>
						<value>0.15</value>
					</product>
				</sum>
			</expression>
			<min>0.0</min>
			<max>1.0</max>
		</input>
		<output>/sim/model/glass-effects/emission-strength</output>
	</filter>
	<filter>
		<type>gain</type>
		<gain>1.0</gain>
		<!-- adapted from Cessna 172p -->
		<input>
			<expression>
				<sum>
					<table>
						<property>/sim/model/glass-effects/emission-strength</property>
						<entry><ind>0.0</ind><dep>0.01</dep></entry>
						<entry><ind>0.3</ind><dep>0.2</dep></entry>
						<entry><ind>1.0</ind><dep>0.9</dep></entry>
					</table>
					<property>/rendering/scene/diffuse/red</property>
				</sum>
			</expression>
			<min>0.01</min>
			<max>0.9</max>
		</input>
		<output>/sim/model/glass-effects/reflection-emission-strength</output>
	</filter>
</PropertyList>
