WeatherHelper Class

Definition

This class contains methods to calculate meteorological values from different sensor measurements. Multiple sensor inputs are used to generate additional information.

public static class WeatherHelper
type WeatherHelper = class
Public Class WeatherHelper
Inheritance
WeatherHelper

Fields

MeanSeaLevel

The mean sea-level pressure (MSLP) is the average atmospheric pressure at mean sea level

Methods

CalculateAbsoluteHumidity(Temperature, Ratio)

Calculates the absolute humidity in g/m³

CalculateAbsoluteHumidity(Temperature, RelativeHumidity)

Calculates the absolute humidity in g/m³.

CalculateActualVaporPressure(Temperature, Ratio)

Calculates the actual vapor pressure.

CalculateActualVaporPressure(Temperature, RelativeHumidity)

Calculates the actual vapor pressure.

CalculateAirDensity(Pressure, Temperature)

Simplified air density (not taking humidity into account)

CalculateAirDensity(Pressure, Temperature, RelativeHumidity)

Calculates the air density

CalculateAltitude(Pressure)

Calculates the altitude in meters from the given pressure. Assumes mean sea-level pressure and temperature of 15C.

CalculateAltitude(Pressure, Pressure)

Calculates the altitude in meters from the given pressure and sea-level pressure. Assumes temperature of 15C.

CalculateAltitude(Pressure, Pressure, Temperature)

Calculates the altitude in meters from the given pressure, sea-level pressure and air temperature.

CalculateAltitude(Pressure, Temperature)

Calculates the altitude in meters from the given pressure and air temperature. Assumes mean sea-level pressure.

CalculateBarometricPressure(Pressure, Temperature, Length)

Calculates the barometric pressure from a raw reading, using the reduction formula from the german met service. This is a more complex variant of CalculateSeaLevelPressure(Pressure, Length, Temperature). It gives the value that a weather station gives for a particular area and is also used in meteorological charts. You are at 650m over sea and measure a pressure of 948.7 hPa and a temperature of 24.0°C. The met service will show that you are within a high-pressure area of around 1020 hPa.

CalculateBarometricPressure(Pressure, Temperature, Length, Ratio)

Calculates the barometric pressure from a raw reading, using the reduction formula from the german met service. This is a more complex variant of CalculateSeaLevelPressure(Pressure, Length, Temperature). It gives the value that a weather station gives for a particular area and is also used in meteorological charts. Use this method if you also have the relative humidity.

CalculateBarometricPressure(Pressure, Temperature, Length, RelativeHumidity)

Calculates the barometric pressure from a raw reading, using the reduction formula from the german met service. This is a more complex variant of CalculateSeaLevelPressure(Pressure, Length, Temperature). It gives the value that a weather station gives for a particular area and is also used in meteorological charts. Use this method if you also have the relative humidity.

CalculateBarometricPressure(Pressure, Temperature, Pressure, Length)

Calculates the barometric pressure from a raw reading, using the reduction formula from the german met service. This is a more complex variant of CalculateSeaLevelPressure(Pressure, Length, Temperature). It gives the value that a weather station gives for a particular area and is also used in meteorological charts. You are at 650m over sea and measure a pressure of 948.7 hPa and a temperature of 24.0°C. The met service will show that you are within a high-pressure area of around 1020 hPa.

CalculateDewPoint(Temperature, Ratio)

Calculates the dew point.

CalculateDewPoint(Temperature, RelativeHumidity)

Calculates the dew point. The dew point is the temperature at which, given the other values remain constant - dew or fog would start building up.

CalculateHeatIndex(Temperature, Ratio)

The heat index (or apparent temperature) is used to measure the amount of discomfort during the summer months when heat and humidity often combine to make it feel hotter than it actually is. The heat index is usually used for afternoon high temperatures.

CalculateHeatIndex(Temperature, RelativeHumidity)

The heat index (or apparent temperature) is used to measure the amount of discomfort during the summer months when heat and humidity often combine to make it feel hotter than it actually is. The heat index is usually used for afternoon high temperatures.

CalculatePressure(Pressure, Length, Temperature)

Calculates the approximate absolute pressure from given sea-level pressure, altitude and air temperature.

CalculateSaturatedVaporPressureOverIce(Temperature)

Calculates the saturated vapor pressure for a given air temperature over ice. The formula used is valid for temperatures between -100°C and +0°C.

CalculateSaturatedVaporPressureOverWater(Temperature)

Calculates the saturated vapor pressure for a given air temperature over water. The formula used is valid for temperatures between -100°C and +100°C.

CalculateSeaLevelPressure(Pressure, Length, Temperature)

Calculates the approximate sea-level pressure from given absolute pressure, altitude and air temperature.

CalculateTemperature(Pressure, Pressure, Length)

Calculates the temperature gradient for the given pressure difference

CalculateWindchill(Temperature, Speed)

Calculates the wind chill temperature - this is the perceived temperature in (heavy) winds at cold temperatures. This is only useful at temperatures below about 20°C, above use CalculateHeatIndex(Temperature, RelativeHumidity) instead. Not suitable for wind speeds < 5 km/h.

CalculateWindForce(Density, Speed, Double)

Calculates the wind force on an object.

GetRelativeHumidityFromActualAirTemperature(Temperature, Ratio, Temperature)

Calculates a corrected relative humidity. This is useful if you have a temperature/humidity sensor that is placed in a location where the temperature is different from the real ambient temperature (like it sits inside a hot case) and another temperature-only sensor that gives more reasonable ambient temperature readings. Do note that the relative humidity is dependent on the temperature, because it depends on how much water a volume of air can contain, which increases with temperature.

GetRelativeHumidityFromActualAirTemperature(Temperature, RelativeHumidity, Temperature)

Calculates a corrected relative humidity. This is useful if you have a temperature/humidity sensor that is placed in a location where the temperature is different from the real ambient temperature (like it sits inside a hot case) and another temperature-only sensor that gives more reasonable ambient temperature readings. Do note that the relative humidity is dependent on the temperature, because it depends on how much water a volume of air can contain, which increases with temperature.

Applies to