Class WXUtils
java.lang.Object
org.deltava.util.WXUtils
A utility class for weather calculations.
- Since:
- 11.5
- Version:
- 11.5
- Author:
- Luke
-
Method Summary
Modifier and TypeMethodDescriptionstatic doublegetPressure(int altDelta, int temp, int p) Calculates atmospheric pressure at a given altitude.static doubletoHG(int p) Converts pascals to inches of mercury.
-
Method Details
-
toHG
public static double toHG(int p) Converts pascals to inches of mercury.- Parameters:
p- the pressure in pascals- Returns:
- the pressure in inches of mercury
-
getPressure
public static double getPressure(int altDelta, int temp, int p) Calculates atmospheric pressure at a given altitude. This function is unit-agnostic.- Parameters:
altDelta- the altitude delta from current in feettemp- the current temperature in degrees Kelvinp- the current pressure- Returns:
- the pressure at the specified altitude delta from current
-