mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Added utility function to calculate the dew point
This commit is contained in:
parent
e6ed1e5dbd
commit
2f7d7ece56
@ -5,6 +5,7 @@ ADDON = false;
|
||||
|
||||
PREP(calculateAirDensity);
|
||||
PREP(calculateBarometricPressure);
|
||||
PREP(calculateDewPoint);
|
||||
PREP(calculateHeatIndex);
|
||||
PREP(calculateRoughnessLength);
|
||||
PREP(calculateTemperatureAtHeight);
|
||||
|
27
addons/weather/functions/fnc_calculateDewPoint.sqf
Normal file
27
addons/weather/functions/fnc_calculateDewPoint.sqf
Normal file
@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Author: Ruthberg
|
||||
*
|
||||
* Calculates dew point based on temperature and relative humidity
|
||||
*
|
||||
* Arguments:
|
||||
* 0: temperature - degrees celcius <NUMBER>
|
||||
* 2: relativeHumidity - value between 0.0 and 1.0 <NUMBER>
|
||||
*
|
||||
* Return Value:
|
||||
* 0: heat index <NUMBER>
|
||||
*
|
||||
* Return value:
|
||||
* None
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
#define __b 17.67
|
||||
#define __c 243.5
|
||||
|
||||
PARAMS_2(_t, _rh);
|
||||
|
||||
// Source: https://en.wikipedia.org/wiki/Dew_point
|
||||
private ["_gamma"];
|
||||
_gamma = ln(_rh) + (__b * _t) / (__c + _t);
|
||||
|
||||
(__c * _gamma) / (__b - _gamma)
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Author: Ruthberg
|
||||
*
|
||||
* Calculates heat index based on temperature and humidity
|
||||
* Calculates heat index based on temperature and relative humidity
|
||||
*
|
||||
* Arguments:
|
||||
* 0: temperature - degrees celcius <NUMBER>
|
||||
|
Loading…
Reference in New Issue
Block a user