def run_test1():
    fc = FlightConditions(65.0,1500.)
    print fc.atm.density
    print fc.atm.viscosity
    print fc.atm.soundSpeed
    print fc.Re
    alt = get_density_altitude(1.0)
    fc.set_altitude(alt)
    print fc.atm.density
    
    print const.get_gravity_acceleration(10000)
 def __init__(self,altitude,dT=0,gas='air'):
     altitude = float(altitude)
     P0 = 101325.0
     T0 = 288.15
     G0 = 9.80665
     R  = 287.04
     GAMMA = 1.4
     if altitude<11000:
         T = T0 - 6.5 * altitude / 1000 + dT
         P = P0 * (1 - 0.0065 * altitude / T0) ** 5.2561
     else:
         T11 = T0 - 6.5 * 11000 / 1000 + dT
         P11 = P0 * (1 - 0.0065 * 11000 / T0) ** 5.2561
         T = T11 + dT
         P = P11 * exp(-G0 / (R * T11) * (altitude - 11000))  
     rho = P / (R * T)
     a = (GAMMA * R * T) ** 0.5
     self.dT          = dT
     self.gas         = gas
     self.altitude    = altitude
     self.temperature = T
     self.pressure    = P
     self.soundSpeed  = a
     self.density     = rho
     self.set_sutherland_viscosity(self.gas)
     self.g = const.get_gravity_acceleration(altitude)