Game Development Reference
In-Depth Information
Computing Atmospheric Pressure, Density, and Temperature
The atmospheric pressure as a function of altitude is necessary to properly evaluate the thrust
of a rocket engine. When we study drag a little later in this chapter, we will find that we need the
density as a function of altitude as well. The pressure, temperature, and density relations that
were presented in Chapter 10 are valid only up to an altitude of 11 km . A more extensive atmo-
sphere model is required for modeling rockets, which can travel significantly higher than 11 km .
The U.S. Committee on Extension to the Standard Atmosphere (COESA) is a government
organization that developed an earth atmosphere model known as the U.S. Standard Atmosphere
1976 model, which is an industry standard for computing the pressure, density, temperature,
and other atmosphere quantities as a function of altitude.
We won't go into details about the equations that make up the U.S. Standard Atmosphere
1976 model. They are fairly complicated, involving things like geopotential altitudes. As a brief
overview, Earth's atmosphere is divided into a series of altitude ranges. Temperature is modeled
using a series of straight lines between control points. Pressure and density are modeled using
exponential or power equations. If you want, you can find out more about the nitty-gritty
details of the U.S. Standard Atmosphere 1976 model at http://nssdc.gsfc.nasa.gov/space/
model/atmos/us_standard.html .
For use in the rocket simulator we will develop a bit later in this chapter, a class named
USatm76 was written that encapsulates the U.S. Standard Atmosphere 1976 model. Actually,
the USatm76 class represents a simplified version of the model in that only the pressure, density,
and temperature quantities are computed. The code listing for the USatm76 class is shown next.
To make use of the atmosphere model, a program would create a USatm76 object and call the
updateConditions method on that object.
public class USatm76
{
private static final double R = 287.1; // Gas constant for air
private static final double G = 9.80665; // Gravity acceleration
private static final double RE = 6356766.0; // Earth radius in meters
private double pressure;
private double density;
private double temperature;
public USatm76(double altitude) {
// Set the field values according to an
// initial altitude.
updateConditions(altitude);
}
// Declare methods to return field values.
public double getPressure() {
return pressure;
}
Search WWH ::




Custom Search