Skip to content

Instantly share code, notes, and snippets.

@deviousasti
Created May 10, 2020 06:27
Show Gist options
  • Save deviousasti/d800a4e80c92d843773175bf891d2b67 to your computer and use it in GitHub Desktop.
Save deviousasti/d800a4e80c92d843773175bf891d2b67 to your computer and use it in GitHub Desktop.
Model of time -> temperature over a year
static double SunModel(double td, double tm, double Tmin, double Tmax, double time_scale = 24)
{
//http://www.comsiru.uct.ac.za/sites/default/files/image_tool/images/333/Research/Downloads/Mono_8.pdf
return -Sin(2 * PI * (td + tm) / time_scale) * ((Tmax - Tmin) / 2) + ((Tmax + Tmin) / 2);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment