org.jscience.earth
Class AbstractAtmosphere

java.lang.Object
  extended by org.jscience.earth.AbstractAtmosphere
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
EarthStandardAtmosphere1962, EarthStandardAtmosphere1976, MarsAtmosphere

public abstract class AbstractAtmosphere
extends java.lang.Object
implements java.io.Serializable

An abstract class that provides standard functionality for all atmosphere models that sub-class off of this one. Sub-classes must provide a method for calculating the atmosphere properties of density ratio, temperature ratio and pressure ratio. Also methods must be provided that simply return the values of temperature, pressure, density and speed of sound at sea level conditions.

Modified by: Joseph A. Huwaldt

See Also:
Serialized Form

Field Summary
protected  float alt
           
protected  float delta
           
protected  float sigma
           
protected  float theta
           
 
Constructor Summary
AbstractAtmosphere()
           
 
Method Summary
abstract  float a0()
          Returns the standard sea level speed of sound for this atmosphere model.
protected abstract  void calculate()
          Sub-classes must provide a method here that calculates the properties of a particular atmosphere model.
 float getAltitude()
          Get geometric altitude currently being used for standard atmosphere calculations.
 float getDensity()
          Get the static air density at altitude.
 float getDensityRatio()
          Get the density at altitude divided by the sea-level standard density.
 float getPressure()
          Get the static air pressure at altitude.
 float getPressureRatio()
          Get the pressure at altitude divided by the sea-level standard pressure.
 float getSpeedOfSound()
          Get the speed of sound at altitude.
 float getTemperature()
          Get the static air temperature at altitude.
 float getTemperatureRatio()
          Get the temperature at altitude divided by the sea-level standard temperature.
abstract  float maxAltitude()
          Returns the maximum altitude supported by this atmosphere model.
abstract  float minAltitude()
          Returns the minimum altitude supported by this atmosphere model.
abstract  float P0()
          Returns the standard sea level pressure for this atmosphere model.
abstract  float RHO0()
          Returns the standard sea level density for this atmosphere model.
abstract  void setAltitude(float altitude)
          Sets the geometric altitude where the standard atmosphere is to be calculated.
abstract  float T0()
          Returns the standard sea level temperature for this atmosphere model.
 java.lang.String toString()
          Creates a String representation of this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

alt

protected float alt

sigma

protected float sigma

delta

protected float delta

theta

protected float theta
Constructor Detail

AbstractAtmosphere

public AbstractAtmosphere()
Method Detail

getAltitude

public final float getAltitude()
Get geometric altitude currently being used for standard atmosphere calculations.

Returns:
Returns altitude where the standard atmosphere is being calculated in meters.

getDensityRatio

public final float getDensityRatio()
Get the density at altitude divided by the sea-level standard density.

Returns:
Returns the density ratio at altitude.

getPressureRatio

public final float getPressureRatio()
Get the pressure at altitude divided by the sea-level standard pressure.

Returns:
Returns the pressure ratio at altitude.

getTemperatureRatio

public final float getTemperatureRatio()
Get the temperature at altitude divided by the sea-level standard temperature.

Returns:
Returns the temperature ratio at altitude.

getTemperature

public float getTemperature()
Get the static air temperature at altitude.

Returns:
Returns the temperature at altitude in units of �K.

getPressure

public float getPressure()
Get the static air pressure at altitude.

Returns:
Returns the pressure at altitude in units of N/m^2.

getDensity

public float getDensity()
Get the static air density at altitude.

Returns:
Returns the density at altitude in units of g/cm^3.

getSpeedOfSound

public float getSpeedOfSound()
Get the speed of sound at altitude.

Returns:
Returns the speed of sound at altitude in units of m/s.

toString

public java.lang.String toString()
Creates a String representation of this object.

Overrides:
toString in class java.lang.Object
Returns:
The String representation of this AbstractAtmosphere object.

T0

public abstract float T0()
Returns the standard sea level temperature for this atmosphere model. Value returned in degrees Kelvin.

Returns:
Returns the standard sea level temperature in �K.

P0

public abstract float P0()
Returns the standard sea level pressure for this atmosphere model. Value returned in Newtons/m^2.

Returns:
Returns the standard sea level pressure in N/m^2.

RHO0

public abstract float RHO0()
Returns the standard sea level density for this atmosphere model. Value returned in kg/L (g/cm^3).

Returns:
Returns the standard sea level density in kg/L (g/cm^3).

a0

public abstract float a0()
Returns the standard sea level speed of sound for this atmosphere model. Value returned in meters/sec.

Returns:
Returns the standard sea level density in m/s.

minAltitude

public abstract float minAltitude()
Returns the minimum altitude supported by this atmosphere model. Sub-classes should return the minimum altitude supported the the sub-class' atmosphere model.

Returns:
Returns the minimum altitude supported by this atmosphere model.

maxAltitude

public abstract float maxAltitude()
Returns the maximum altitude supported by this atmosphere model. Sub-classes should return the maximum altitude supported the the sub-class' atmosphere model.

Returns:
Returns the maximum altitude supported by this atmosphere model.

setAltitude

public abstract void setAltitude(float altitude)
                          throws java.lang.IllegalArgumentException
Sets the geometric altitude where the standard atmosphere is to be calculated.

Parameters:
altitude - Geometric altitude at which standard atmosphere is to be calculated; value given in meters.
Throws:
java.lang.IllegalArgumentException

calculate

protected abstract void calculate()
Sub-classes must provide a method here that calculates the properties of a particular atmosphere model. The following poperties must be calculated (sub-classes may add others, but these are required): Density Ratio (sigma) as fn(alt) Pressure Ratio (delta) as fn(alt) Temperature Ratio (theta) as fn(alt)