Class WXUtils

java.lang.Object
org.deltava.util.WXUtils

public class WXUtils extends Object
A utility class for weather calculations.
Since:
11.5
Version:
11.5
Author:
Luke
  • 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 feet
      temp - the current temperature in degrees Kelvin
      p - the current pressure
      Returns:
      the pressure at the specified altitude delta from current