Inspired by MKY's blizzard script, I created functions that provide you with climatological information. The functions contain a simple climatological model and statistical data, that I gathered from all kinds or sources on the web. The climatological data can be overriden by terrain makers, using config entires. I hope that this will contribute to the creation of weather addons, realism- and survival mods.
Input is mostly limited to time, date and a position or object. Besides climatological data, the functions determine Latitude, time, date, overcast, fog, cloud occlusion, terrain occlusion, and object occlusion to calculate output values.
The following variables are provided as output:
* Air temperature (°C) â€“ llw_fnc_getTemperature
* Date and time (YYYY-MM-DD hh:mm:ss) â€“ llw_fnc_getDateTime
* Shadow detection (true/false) â€“ llw_fnc_inShadow
* Solar Azimuth angle (Â°) â€“ llw_fnc_getSunAngle
* Solar Elevation angle (Â°) â€“ llw_fnc_getSunAngle
* Solar Elevation angle at 12:00PM (Â°) â€“ llw_fnc_getSunElevationNoon
* Solar Radiation energy (W/mÂ²) â€“ llw_fnc_getSunRadiation
* Sunrise time (hours) â€“ llw_fnc_getSunRise
* Sunset time (hours) â€“ llw_fnc_getSunRise
* Sea temperature (Â°C) â€“ llw_fnc_getTemperature
llw_fnc_getDateTime - TEXT:
current date and time as "YYYY-MM-DD (hh:mm:ss)"
llw_fnc_getSunAngle - ARRAY:
(0) Solar Elevation angle and (1) Solar Azimuth angle. Current angles, or angles at a given time and date.
llw_fnc_getSunElevationNoon - NUMBER:
Solar Elevation Angle at 12:00AM
llw_fnc_getSunRadiation - NUMBER:
Solar radiation energy in W/mÂ² at object or position. When a subclass of Man is referenced, torso is used as reference position.
llw_fnc_getSunRise - ARRAY:
(0) Time at sunrise and (1) time at sunset. For current day or for date provided in parameters.
llw_fnc_getTemperature - ARRAY:
(0) Air temperature and (1) sea temperature in degrees celcius.
llw_fnc_inShadow - BOOLEAN:
returns wheteher an object or position is shielded from the sun. When a subclass of Man is referenced, torso is used as reference position.
Please refer to the enclosed README.TXT for further details.
The scripts come with a demonstration script. (see screenshots)