Example #1
0
    def test_03(self):

        # Truth values from NASA RP 1046

        Value = SA.density_ratio2alt(.088035 / 1.225, alt_units='m')
        Truth = 20000
        self.assertTrue(RE(Value, Truth) <= 1e-5)
    def test_03(self):

        # Truth values from NASA RP 1046

        Value = SA.density_ratio2alt(.088035 / 1.225, alt_units='m')
        Truth = 20000
        self.failUnless(RE(Value, Truth) <= 1e-5)
Example #3
0
    def test_02(self):

        # Truth values from NASA RP 1046

        Value = SA.density_ratio2alt(0.78601648829428272)
        Truth = 8000
        self.assertTrue(RE(Value, Truth) <= 1e-5)
    def test_02(self):

        # Truth values from NASA RP 1046

        Value = SA.density_ratio2alt(0.78601648829428272)
        Truth = 8000
        self.failUnless(RE(Value, Truth) <= 1e-5)
Example #5
0
def _hp_at_MP_and_altitude(rpm, MP):
    """ 
    Returns the power and density ratio at a given rpm and MP at full throttle.
    """
    # get density ratio for this MP and altitude, at full throttle
    DR = _DR_FT_from_MP(rpm, MP)

    # get power at this condition
    altitude = SA.density_ratio2alt(DR)
    hp = _hp_at_FT(rpm, altitude)

    return hp, DR
Example #6
0
def _hp_at_MP_and_altitude(rpm, MP):
    """ 
    Returns the power and density ratio at a given rpm and MP at full throttle.
    """
    # get density ratio for this MP and altitude, at full throttle
    DR = _DR_FT_from_MP(rpm, MP)
    
    # get power at this condition
    altitude = SA.density_ratio2alt(DR)
    hp = _hp_at_FT(rpm, altitude)
    
    return hp, DR
Example #7
0
 def test_01(self):
     PR = SA.density_ratio2alt(1)
     self.assertEqual(PR, 0)
 def test_01(self):
     PR = SA.density_ratio2alt(1)
     self.assertEqual(PR, 0)