Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question

Revision history [back]

In the formulas you reference from the Radiance source code, solar altitude and azimuth are calculated from solar time, which is a double that includes the hour of the day. Your mistake is to use the Julian date, an integer, instead. If you want to use the formulas from Radiance, look at some examples within the Radiance source code of how those functions are called.

In the formulas you reference from the Radiance source code, solar altitude and azimuth are calculated from solar time, which is a double that includes the hour of the day. Your mistake is to use the Julian date, an integer, solar time adjustment, stadj, instead. You have also forgotten to include the declination in some cases, and PI/12 needs to be included within the cosine, which is the direct cause of your error. If you want to use the formulas from Radiance, look at some examples within the Radiance source code of how those functions are called. called.