Commit a1a129bb authored by Jörg Weingrill's avatar Jörg Weingrill
Browse files

added brightness pressure and lightdir

parent 541fa081
......@@ -27,7 +27,11 @@ VAR
Dust1, Dust2,
CryoSupport,
CryoReturn,
CryoDifference: REAL;
CryoDifference,
CryoPressure,
Brightness,
Pressure,
LightDirection: REAL;
WindEvent,
HumidityEvent,
......@@ -79,6 +83,9 @@ HumidityDome := F_YREAL(GVL_Environment.rawHumidityDome, 0, 32767, 0.0, 100.
CryoSupport := F_YREAL(GVL_Environment.rawCryoSupport, 0, 32767, 0.0, 25.0); //bar
CryoReturn := F_YREAL(GVL_Environment.rawCryoReturn, 0, 32767, 0.0, 25.0); //bar
CryoDifference := CryoSupport - CryoReturn;
IF (ABS(CryoDifference)) < 0.1 THEN
CryoPressure := 0.5 * CryoSupport + 0.5 * CryoReturn;
END_IF
WindAverage(IN := WindSpeed, PT := T#5M, AVG => avg_wind, MAXAVG => max_wind);
PrecipitationAverage(IN := MAX(Precipitation1, Precipitation2), PT := T#2M);
......@@ -92,6 +99,15 @@ Dust22Average(IN := 1.0 - BOOL_TO_REAL(GVL_Environment.rawDust22), PT := T#30S);
Dust1 := 10.0 * MAX(Dust11Average.AVG, Dust21Average.AVG); //mg/m³
Dust2 := 10.0 * MAX(Dust12Average.AVG, Dust22Average.AVG); //mg/m³
DustAverage(IN := 0.5*Dust1 + 0.5*Dust2, PT := T#5M);
Brightness := MAX(Brightness1, Brightness2);
Pressure := MIN(Pressure1, Pressure2);
IF Brightness1 > Brightness2 THEN
LightDirection := LightDirection1;
ELSE
LightDirection := LightDirection2;
END_IF
WindEvent( Trigger := avg_wind > 10.0,
Level := ADSLOG_MSGTYPE_WARN,
FormatString := 'Wind Speed: %s',
......@@ -136,6 +152,7 @@ PrecipitationEvent( Trigger := PrecipitationAverage.AVG > 0.3,
<LineId Id="71" Count="1" />
<LineId Id="351" Count="2" />
<LineId Id="355" Count="0" />
<LineId Id="412" Count="2" />
<LineId Id="230" Count="1" />
<LineId Id="143" Count="0" />
<LineId Id="293" Count="0" />
......@@ -145,6 +162,14 @@ PrecipitationEvent( Trigger := PrecipitationAverage.AVG > 0.3,
<LineId Id="343" Count="0" />
<LineId Id="348" Count="0" />
<LineId Id="296" Count="0" />
<LineId Id="399" Count="0" />
<LineId Id="398" Count="0" />
<LineId Id="403" Count="0" />
<LineId Id="405" Count="1" />
<LineId Id="408" Count="0" />
<LineId Id="410" Count="0" />
<LineId Id="407" Count="0" />
<LineId Id="400" Count="0" />
<LineId Id="144" Count="19" />
<LineId Id="299" Count="0" />
</LineIds>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment