At AC set at 16 degreesC, there will be full frost on the glass, both inside and outside, when outside temp is -56.5.
At AC set at 20 degreesC, the frost will go to 0.85 approx.
The problem is not that the AC cannot warm the cockpit faster than it cools down from outside temp., its that the dewpoint and temp outside will form frost with my calculations. The inside frost is also not simulated so good, due to I really don't know how to simulate the inside dewpoint so well.
The glass temperature is done via glass-temperature-index which I think is a standard way of calculating that. Its already at 0.75 which I think is rather high for a cockpit glass, that's probably only single layer.
So there must be something off with the way I do frost/fog, if the glass is not supposed to frost up in those conditions, I guess I just know too little about how frost forms, I did several assumptions when making that.
If your interested, this is my code for fog/frost on outside the glass, its run every 1.5 seconds:
- Code: Select all
var fogNormOutside = clamp((tempOutsideDew-tempGlass)*0.05, 0, 1);
var rain = getprop("/environment/rain-norm");
if (rain == nil) {
rain = 0;
}
var frostSpeedOutside = clamp(-tempGlass, -60, 60)/600 + (tempGlass<0?(fogNormOutside/50 + rain/50):0);
frostNormOutside = clamp(frostNormOutside + frostSpeedOutside, 0, 1);
# recalc fogging from frost levels, frost will lower the fogging as some of that frost probably is formed from fog.
fogNormOutside = clamp(fogNormOutside - frostNormOutside / 4, 0, 1);