libwx

package module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 25, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PressureInHg

type PressureInHg float64

PressureInHg represents barometric pressure in inches of mercury.

func PressureMbToInHg

func PressureMbToInHg(p PressureMb) PressureInHg

PressureMbToInHg converts the given pressure in millibars to inches of mercury.

type PressureMb

type PressureMb float64

PressureMb represents barometric pressure in millibars.

func PressureInHgToMb

func PressureInHgToMb(p PressureInHg) PressureMb

PressureInHgToMb converts the given pressure in inches of mercury to millibars.

type RelHumidity

type RelHumidity int

RelHumidity represents a relative humidity percentage (0-100, inclusive).

func ClampRelHumidity

func ClampRelHumidity(h RelHumidity) RelHumidity

ClampRelHumidity ensures that the given relative humidity percentage is within the valid 0-100 inclusive range.

func IndoorHumidityRecommendationC

func IndoorHumidityRecommendationC(outdoorTemp TempC) RelHumidity

IndoorHumidityRecommendationC returns the maximum recommended indoor relative humidity percentage for the given outdoor temperature (in degrees C).

func IndoorHumidityRecommendationF

func IndoorHumidityRecommendationF(outdoorTemp TempF) RelHumidity

IndoorHumidityRecommendationF returns the maximum recommended indoor relative humidity percentage for the given outdoor temperature (in degrees F).

type TempC

type TempC float64

TempC represents a temperature in degrees Celsius.

func DewPointC

func DewPointC(t TempC, relH RelHumidity) TempC

DewPointC calculates the dew point given the current temperature (in Celsius) and relative humidity percentage (an integer 0-100, *not* a float 0.0-1.0).

func TempFToC

func TempFToC(f TempF) TempC

TempFToC converts the given Fahrenheit temperature to Celsius.

func WindChillC

func WindChillC(temp TempC, windSpeedMph float64) TempC

WindChillC calculates the wind chill for the given temperature (in Fahrenheit) and wind speed (in miles/hour). If wind speed is less than 3 mph, or temperature if over 50 degrees, the given temperature is returned - the formula works below 50 degrees and above 3 mph.

type TempF

type TempF float64

TempF represents a temperature in degrees Fahrenheit.

func DewPointF

func DewPointF(temp TempF, relH RelHumidity) TempF

DewPointF calculates the dew point given the current temperature (in Fahrenheit) and relative humidity percentage (an integer 0-100, *not* a float 0.0-1.0).

func TempCToF

func TempCToF(c TempC) TempF

TempCToF converts the given Celsius temperature to Fahrenheit.

func WindChillF

func WindChillF(temp TempF, windSpeedMph float64) TempF

WindChillF calculates the wind chill for the given temperature (in Fahrenheit) and wind speed (in miles/hour). If wind speed is less than 3 mph, or temperature if over 50 degrees, the given temperature is returned - the formula works below 50 degrees and above 3 mph.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL