示例#1
0
    def test_02(self):

        # Truth values from NASA RP 1046

        Value = SA.density2alt(0.012215)
        Truth = 49000
        self.assertLessEqual(RE(Value, Truth), 1e-5)
示例#2
0
    def test_01(self):

        # Truth values from NASA RP 1046

        Value = SA.density2alt(0.06011)
        Truth = 8000
        self.assertLessEqual(RE(Value, Truth), 1e-5)
示例#3
0
    def test_03(self):

        # Truth values from NASA RP 1046

        Value = SA.density2alt(0.039466, alt_units='m',
                               density_units='kg/m**3')
        Truth = 25000
        self.assertLessEqual(RE(Value, Truth), 1e-5)
示例#4
0
    def test_07(self):

        # truth value calculated from program at:
        # http://www.sworld.com.au/steven/space/atmosphere/

        Value = SA.density2alt(1.3418e-5, density_units='kg/m**3',
                               alt_units='m')
        Truth = 80956
        self.assertLessEqual(RE(Value, Truth), 1e-5)
示例#5
0
    def test_04(self):

        # test units in other order
        # truth value calculated from program at:
        # http://www.sworld.com.au/steven/space/atmosphere/

        Value = SA.density2alt(5.36663e-3, density_units='kg/m**3',
                               alt_units='m')
        Truth = 37774
        self.assertLessEqual(RE(Value, Truth), 1e-5)