Author: Matthijs
Author Website:

Version: 1.0

Short description: Functions to calculate solar and climatological data.

Date: 2016-02-14 15:04

Comments: (2)


Solar and climatological functions

W.M. Crielaard

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:00AM (°) – 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

Installation / Usage:
* Copy the folder “fnc” to your missions folder.
* Use the following to load the functions, e.g. from INIT.SQF:
[] call compile preprocessFile "fnc\loadFunctions.sqf";
For detailed usage instructions of how to use the Solar and climatological functions please refer to the included documentation and/or example mission.

Enable javascript to be able to download from Armaholic please!

Tags: Angle,   Climate,   Radiation,   Shadow,   Sun,   Temperature,   Weather