Class MKS

java.lang.Object
org.bzdev.util.units.MKS

public class MKS extends Object
Class to convert various units to MKS units. The resulting units will measure distances in meters, mass in kilograms, time in seconds, and temperature in Kelvin.
  • Method Summary

    Modifier and Type
    Method
    Description
    static double
    cm(double x)
    Convert distances in centimeters to meters.
    static double
    daN(double x)
    Convert decanewtons to newtons.
    static double
    days(double t)
    Convert time in days to seconds.
    static double
    degC(double x)
    Convert temperature in degrees Celsius to Kelvin.
    static double
    degF(double x)
    Convert temperature in degrees Fahrenheit to Kelvin.
    static double
    dyne(double x)
    Convert dynes to newtons.
    static double
    feet(double x)
    Convert distances in feet to meters.
    static double
    feetPerSec(double x)
    Convert speeds in feet per second to m/s
    static double
    feetPerSecPerSec(double x)
    Convert acceleration in feet per second per second to m s-2.
    static double
    g(double x)
    Convert grams to kilograms.
    static double
    gFract(double x)
    Convert acceleration in fractions of g to m s-2.
    static double
    Gg(double x)
    Convert Gigagrams to kilograms.
    static double
    hours(double t)
    Convert time in hours to seconds.
    static double
    inches(double x)
    Convert distances in inches to meters.
    static double
    km(double x)
    Convert distances in kilometers to meters.
    static double
    kN(double x)
    Convert kilonewtons to newtons.
    static double
    kph(double x)
    Convert speeds in kph to m/s
    static double
    kphPerSec(double x)
    Convert acceleration in kph per second to m s-2.
    static double
    lbf(double x)
    Convert lb force to Newtons.
    static double
    lbm(double x)
    Convert pound-mass to kilograms.
    static double
    mg(double x)
    Convert milligrams to kilograms.
    static double
    Mg(double x)
    Convert Megagrams (metric tons) to kilograms.
    static double
    miles(double x)
    Convert distances in miles to meters.
    static double
    milesPerSec(double x)
    Convert speeds in miles per second to m/s
    static double
    Convert acceleration in miles per second per second to m s-2.
    static double
    minutes(double t)
    Convert time in minutes to seconds.
    static double
    mm(double x)
    Convert distances in millimeters to meters.
    static double
    mph(double x)
    Convert speeds in mph to m/s
    static double
    mphPerSec(double x)
    Convert acceleration in mph per second to m s-2.
    static double
    ms(double t)
    Convert time in milliseconds to seconds.
    static double
    ng(double x)
    Convert nanograms to kilograms.
    static double
    nm(double x)
    Convert distances in nanometers to meters.
    static double
    ns(double t)
    Convert time in nanoseconds to seconds.
    static double
    pdl(double x)
    Convert poundals to newtons.
    static double
    slugs(double x)
    Convert slugs to kilograms.
    static double
    tonf(double x)
    Convert tons to newtons.
    static double
    tonm(double x)
    Convert tons to kg.
    static double
    ug(double x)
    Convert micrograms to kilograms.
    static double
    um(double x)
    Convert distances in micrometers to meters.
    static double
    us(double t)
    Convert time in microseconds to seconds.
    static double
    yards(double x)
    Convert distances in yards to meters.
    static double
    yardsPerSec(double x)
    Convert speeds in yards per second to m/s
    static double
    Convert acceleration in yards per second per second to m s-2.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • inches

      public static double inches(double x)
      Convert distances in inches to meters.
      Parameters:
      x - the distance in inches
      Returns:
      the distance in meters
    • feet

      public static double feet(double x)
      Convert distances in feet to meters.
      Parameters:
      x - the distance in feet
      Returns:
      the distance in meters
    • yards

      public static double yards(double x)
      Convert distances in yards to meters.
      Parameters:
      x - the distance in yards
      Returns:
      the distance in meters
    • miles

      public static double miles(double x)
      Convert distances in miles to meters.
      Parameters:
      x - the distance in miles
      Returns:
      the distance in meters
    • cm

      public static double cm(double x)
      Convert distances in centimeters to meters.
      Parameters:
      x - the distance in centimeters
      Returns:
      the distance in meters
    • mm

      public static double mm(double x)
      Convert distances in millimeters to meters.
      Parameters:
      x - the distance in millimeters
      Returns:
      the distance in meters
    • um

      public static double um(double x)
      Convert distances in micrometers to meters.
      Parameters:
      x - the distance in micrometers (microns)
      Returns:
      the distance in meters
    • nm

      public static double nm(double x)
      Convert distances in nanometers to meters.
      Parameters:
      x - the distance in nanometers
      Returns:
      the distance in meters
    • km

      public static double km(double x)
      Convert distances in kilometers to meters.
      Parameters:
      x - the distance in kilometers
      Returns:
      the distance in meters
    • ms

      public static double ms(double t)
      Convert time in milliseconds to seconds.
      Parameters:
      t - the time in milliseconds
      Returns:
      the time in seconds
    • us

      public static double us(double t)
      Convert time in microseconds to seconds.
      Parameters:
      t - the time in microseconds
      Returns:
      the time in seconds
    • ns

      public static double ns(double t)
      Convert time in nanoseconds to seconds.
      Parameters:
      t - the time in nanoseconds
      Returns:
      the time in seconds
    • minutes

      public static double minutes(double t)
      Convert time in minutes to seconds.
      Parameters:
      t - the time in minutes
      Returns:
      the time in seconds
    • hours

      public static double hours(double t)
      Convert time in hours to seconds.
      Parameters:
      t - the time in hours
      Returns:
      the time in seconds
    • days

      public static double days(double t)
      Convert time in days to seconds.
      Parameters:
      t - the time in days
      Returns:
      the time in seconds
    • mph

      public static double mph(double x)
      Convert speeds in mph to m/s
      Parameters:
      x - the speed in mph
      Returns:
      the speed in m/s
    • kph

      public static double kph(double x)
      Convert speeds in kph to m/s
      Parameters:
      x - the speed in kph
      Returns:
      the speed in m/s
    • feetPerSec

      public static double feetPerSec(double x)
      Convert speeds in feet per second to m/s
      Parameters:
      x - the speed in feet per second
      Returns:
      the speed in m/s
    • yardsPerSec

      public static double yardsPerSec(double x)
      Convert speeds in yards per second to m/s
      Parameters:
      x - the speed in yards per second
      Returns:
      the speed in m/s
    • milesPerSec

      public static double milesPerSec(double x)
      Convert speeds in miles per second to m/s
      Parameters:
      x - the speed in miles per second
      Returns:
      the speed in m/s
    • lbm

      public static double lbm(double x)
      Convert pound-mass to kilograms.
      Parameters:
      x - the mass in pound-mass units
      Returns:
      the mass in kg
    • slugs

      public static double slugs(double x)
      Convert slugs to kilograms.
      Parameters:
      x - the mass in units of slugs
      Returns:
      the mass in kg
    • pdl

      public static double pdl(double x)
      Convert poundals to newtons.
      Parameters:
      x - the force in units of poundals
      Returns:
      the force in newtons
    • g

      public static double g(double x)
      Convert grams to kilograms.
      Parameters:
      x - the mass in units of grams
      Returns:
      the mass in kg
    • mg

      public static double mg(double x)
      Convert milligrams to kilograms.
      Parameters:
      x - the mass in units of mg
      Returns:
      the mass in kg
    • ug

      public static double ug(double x)
      Convert micrograms to kilograms.
      Parameters:
      x - the mass in units of micrograms
      Returns:
      the mass in kg
    • ng

      public static double ng(double x)
      Convert nanograms to kilograms.
      Parameters:
      x - the mass in units of micrograms
      Returns:
      the mass in kg
    • Mg

      public static double Mg(double x)
      Convert Megagrams (metric tons) to kilograms.
      Parameters:
      x - the mass in units of Mg
      Returns:
      the mass in kg
    • Gg

      public static double Gg(double x)
      Convert Gigagrams to kilograms.
      Parameters:
      x - the mass in units of Mg
      Returns:
      the mass in kg
    • gFract

      public static double gFract(double x)
      Convert acceleration in fractions of g to m s-2. The constant g is set to the standard value of 9.80665 m s-2.
      Parameters:
      x - the acceleration as a fraction of g
      Returns:
      the acceleration in m s-2
    • feetPerSecPerSec

      public static double feetPerSecPerSec(double x)
      Convert acceleration in feet per second per second to m s-2.
      Parameters:
      x - the acceleration in feet per second per second
      Returns:
      the acceleration in m s-2
    • yardsPerSecPerSec

      public static double yardsPerSecPerSec(double x)
      Convert acceleration in yards per second per second to m s-2.
      Parameters:
      x - the acceleration in yards per second per second
      Returns:
      the acceleration in m s-2
    • milesPerSecPerSec

      public static double milesPerSecPerSec(double x)
      Convert acceleration in miles per second per second to m s-2.
      Parameters:
      x - the acceleration in miles per second per second
      Returns:
      the acceleration in m s-2
    • mphPerSec

      public static double mphPerSec(double x)
      Convert acceleration in mph per second to m s-2.
      Parameters:
      x - the acceleration in mph per second
      Returns:
      the acceleration in m s-2
    • kphPerSec

      public static double kphPerSec(double x)
      Convert acceleration in kph per second to m s-2.
      Parameters:
      x - the acceleration in kph per second
      Returns:
      the acceleration in m s-2
    • degC

      public static double degC(double x)
      Convert temperature in degrees Celsius to Kelvin.
      Parameters:
      x - the Celsius temperature
      Returns:
      the thermodynamic temperature (Kelvin)
    • degF

      public static double degF(double x)
      Convert temperature in degrees Fahrenheit to Kelvin.
      Parameters:
      x - the Fahrenheit temperature
      Returns:
      the thermodynamic temperature (Kelvin)
    • lbf

      public static double lbf(double x)
      Convert lb force to Newtons.
      Parameters:
      x - the force in units of pounds
      Returns:
      the force in units of newtons
    • dyne

      public static double dyne(double x)
      Convert dynes to newtons.
      Parameters:
      x - the force in units of dynes
      Returns:
      the force in units of newtons
    • daN

      public static double daN(double x)
      Convert decanewtons to newtons. Because the acceleration due to gravity on the earth's surface is close to 10, the weight of a 1 kg mass is approximately 1 daN. While the "da" prefix is rarely used in practice, it is used in some product specifications when the mass something can support is of interest to the reader.
      Parameters:
      x - the force in units of decanewtons
      Returns:
      the force in units of newtons
    • kN

      public static double kN(double x)
      Convert kilonewtons to newtons.
      Parameters:
      x - the force in units of decanewtons
      Returns:
      the force in units of newtons
    • tonf

      public static double tonf(double x)
      Convert tons to newtons.
      Parameters:
      x - the force in units of tons
      Returns:
      the force in units of newtons
    • tonm

      public static double tonm(double x)
      Convert tons to kg.
      Parameters:
      x - the force in units of tons
      Returns:
      the force in units of newtons