View Single Post
  #5  
Old 03-11-2019, 06:24 PM
peter_4059's Avatar
peter_4059 (Peter)
Big Scopes are Cool

peter_4059 is offline
 
Join Date: Jun 2007
Location: SE Tasmania
Posts: 4,532
Quote:
Originally Posted by ribuck View Post
Hi All,

I've built a DIY arduino based weather station and have all the hardware and Ascom driver working fine, but the last piece of the puzzle which i need to understand is the relationship between Sky Temp vs the Ambient Air temp to determine if it's cloudy or not.

i think i read somewhere once, that there is a direct relationship between the Air & Sky temps which determines if it's cloudy or not, and it's that bit i dont yet know.

All i know is that clear sky is supposed to create a bigger difference in temperatures, then cloudy which can get very close to ambient.

Anyone got any idea's on the approx temp differences ??

e.g. Clear Sky = (30 degree difference in temp ???)
Light / Whispy Cloud (15 degree difference in temp ??)
Full / Thick Cloud ( 5 degree difference in temp ??? )

Hope my question makes sense

Rich.
I've been working on a similar project. I've currently got mine set as 100% cloudy=5 degC delta T and 100% clear = 13.7 degC delta T. I've been watching the predictions vs observed conditions on and off and I'm getting close to a good prediction. I'm finding it slightly overpredicts cloud at the lowcloud percentage end meaning I probably need to reduce my 13.7 number a bit - maybe to 12.7 degC. I'm using a linear model in between the two temperatures and I've written a bit of simple code to calculate the slope and intercept:

clear = 13.7; // initialise delta t for clear sky
cloudy = 5; // initialise delta t for cloudy sky
slope = (100 - 0)/(cloudy - clear);// slope of cloud model
xin = 100 - (cloudy * slope);// intercept of cloud model

Then calculate the delta T
dt = ambient - sky;

adt = (adt * 2 + dt) / 3; // calculate rolling 3 point average dt
// use the average dt to smooth out cloud detection

// cloud calc using rolling average delta T
cloud = xin + slope * adt;
cld = constrain(cloud, 0, 100);
//ensure the cloud reading is between 0 and 100%

It takes a bit of tuning however with this code I only need to adjust the constants clear and cloudy.

I'd be interested to hear how your worked out.

Peter
Reply With Quote