PHP 클래스 Horde_Service_Weather, horde

저자: Michael J Rubinsky ([email protected])
파일 보기 프로젝트 열기: horde/horde 1 사용 예제들

공개 메소드들

메소드 설명
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.

메소드 상세

calculateDewPoint() 공개 정적인 메소드

Temperature has to be entered in deg C!
public static calculateDewPoint ( double $temperature, double $humidity ) : double
$temperature double Temperature in degrees C.
$humidity double Humidity.
리턴 double

calculateHumidity() 공개 정적인 메소드

Temperature and dewpoint have to be entered in deg C!
public static calculateHumidity ( double $temperature, double $dewPoint ) : double
$temperature double Temperature in degrees C.
$dewPoint double Dewpoint in degrees C.
리턴 double

calculateWindChill() 공개 정적인 메소드

Temperature has to be entered in deg F, speed in mph!
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.

convertDistance() 공개 정적인 메소드

Convert distance between m, km, ft and sm
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

convertPressure() 공개 정적인 메소드

Convert pressure between in, hpa, mb, mm and atm
public static convertPressure ( double $pressure, string $from, string $to ) : float
$pressure double The pressure in $from units.
$from string Units converting from.
$to string Units converting to.
리턴 float The converted pressure

convertSpeed() 공개 정적인 메소드

Function will return 'false' when trying to convert from Beaufort, as it is a scale and not a true measurement
public static convertSpeed ( double $speed, string $from, string $to ) : double | integer | boolean
$speed double The speed in $from units.
$from string The units to convert from.
$to string The units to convert to.
리턴 double | integer | boolean

convertTemperature() 공개 정적인 메소드

Convert temperature between f and c
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

degToDirection() 공개 정적인 메소드

Utility function to return textual cardinal compass directions from degress.
부터: 2.3.0
public static degToDirection ( integer $degree ) : string
$degree integer The degree direction (0 - 360).
리턴 string The cardinal direction.