Added wet bulb calculation, fixed macros

This commit is contained in:
ulteq 2015-05-15 21:10:46 +02:00
parent 2f7d7ece56
commit 7f966de28c
6 changed files with 25 additions and 5 deletions

View File

@ -9,6 +9,7 @@ PREP(calculateDewPoint);
PREP(calculateHeatIndex);
PREP(calculateRoughnessLength);
PREP(calculateTemperatureAtHeight);
PREP(calculateWetBulb);
PREP(calculateWindChill);
PREP(calculateWindSpeed);
PREP(displayWindInfo);

View File

@ -16,7 +16,7 @@
*/
#include "script_component.hpp"
PARAMS_3(_temperature, _pressure, _relativeHumidity);
PARAMS_3(_temperature,_pressure,_relativeHumidity);
_pressure = _pressure * 100; // hPa to Pa

View File

@ -8,7 +8,7 @@
* 2: relativeHumidity - value between 0.0 and 1.0 <NUMBER>
*
* Return Value:
* 0: heat index <NUMBER>
* 0: dew point <NUMBER>
*
* Return value:
* None
@ -18,7 +18,7 @@
#define __b 17.67
#define __c 243.5
PARAMS_2(_t, _rh);
PARAMS_2(_t,_rh);
// Source: https://en.wikipedia.org/wiki/Dew_point
private ["_gamma"];

View File

@ -15,7 +15,7 @@
*/
#include "script_component.hpp"
PARAMS_2(_t, _rh);
PARAMS_2(_t,_rh);
_rh = _rh * 100; // relative humidity in %

View File

@ -0,0 +1,19 @@
/*
* Author: Ruthberg
*
* Calculates wet bulb based on temperature and relative humidity
*
* Arguments:
*
*
* Return Value:
* 0: wet bulb <NUMBER>
*
* Return value:
* None
*/
#include "script_component.hpp"
// TODO: ...
GVAR(currentTemperature)

View File

@ -14,7 +14,7 @@
*/
#include "script_component.hpp"
PARAMS_2(_t, _v);
PARAMS_2(_t,_v);
_v = _v * 3,6; // wind speed in km/h