Метод | Описание | |
---|---|---|
calculateDewPoint ( double $temperature, double $humidity ) : double | Calculate dewpoint from temperature and humidity This is only an approximation, there is no exact formula, this one here is called Magnus-Formula | |
calculateHumidity ( double $temperature, double $dewPoint ) : double | Calculate humidity from temperature and dewpoint This is only an approximation, there is no exact formula, this one here is called Magnus-Formula | |
calculateWindChill ( double $temperature, double $speed ) : double | Calculate windchill from temperature and windspeed. | |
convertDistance ( double $distance, string $from, string $to ) : double | Convert distance between m, km, ft and sm | |
convertPressure ( double $pressure, string $from, string $to ) : float | Convert pressure between in, hpa, mb, mm and atm | |
convertSpeed ( double $speed, string $from, string $to ) : double | integer | boolean | Convert speed between mph, kph, kt, mps, fps and bft | |
convertTemperature ( double $temperature, string $from, string $to ) : double | Convert temperature between f and c | |
degToDirection ( integer $degree ) : string | Utility function to return textual cardinal compass directions from degress. |
public static calculateDewPoint ( double $temperature, double $humidity ) : double | ||
$temperature | double | Temperature in degrees C. |
$humidity | double | Humidity. |
Результат | double |
public static calculateHumidity ( double $temperature, double $dewPoint ) : double | ||
$temperature | double | Temperature in degrees C. |
$dewPoint | double | Dewpoint in degrees C. |
Результат | double |
public static calculateWindChill ( double $temperature, double $speed ) : double | ||
$temperature | double | The temperature in degrees F. |
$speed | double | The wind speed in MPH. |
Результат | double | The windchill factor. |
public static convertDistance ( double $distance, string $from, string $to ) : double | ||
$distance | double | The distance in $from units. |
$from | string | The units to convert from. |
$to | string | The units to convert to. |
Результат | double |
public static convertTemperature ( double $temperature, string $from, string $to ) : double | ||
$temperature | double | The temperature in $from units. |
$from | string | Units to convert from. |
$to | string | Units to convert to. |
Результат | double |
public static degToDirection ( integer $degree ) : string | ||
$degree | integer | The degree direction (0 - 360). |
Результат | string | The cardinal direction. |