Exemple #1
0
    def test_hyperbolic_orbit(self):
        # Exercise the newtonnu() code path with asinh() to see whether
        # we can replace it with the one from Python's math module.

        self.assertEqual(newtonnu(1.0, 2.9), (8.238092752965605, 194.60069989482898))  # parabolic

        self.assertEqual(newtonnu(1.1, 2.7), (4.262200676156417, 34.76134082028372))  # hyperbolic
Exemple #2
0
    def test_hyperbolic_orbit(self):
        # Exercise the newtonnu() code path with asinh() to see whether
        # we can replace it with the one from Python's math module.

        self.assertEqual(newtonnu(1.0, 2.9),   # parabolic
                         (8.238092752965605, 194.60069989482898))

        self.assertEqual(newtonnu(1.1, 2.7),   # hyperbolic
                         (4.262200676156417, 34.76134082028372))
Exemple #3
0
    def test_hyperbolic_orbit(self):
        # Exercise the newtonnu() code path with asinh() to see whether
        # we can replace it with the one from Python's math module.

        e0, m = newtonnu(1.0, 2.9)  # parabolic
        self.assertAlmostEqual(e0, 8.238092752965605, places=12)
        self.assertAlmostEqual(m, 194.60069989482898, places=12)

        e0, m = newtonnu(1.1, 2.7)  # hyperbolic
        self.assertAlmostEqual(e0, 4.262200676156417, places=12)
        self.assertAlmostEqual(m, 34.76134082028372, places=12)
Exemple #4
0
    def test_hyperbolic_orbit(self):
        # Exercise the newtonnu() code path with asinh() to see whether
        # we can replace it with the one from Python's math module.

        e0, m = newtonnu(1.0, 2.9)  # parabolic
        self.assertAlmostEqual(e0, 8.238092752965605, places=12)
        self.assertAlmostEqual(m, 194.60069989482898, places=12)

        e0, m = newtonnu(1.1, 2.7)   # hyperbolic
        self.assertAlmostEqual(e0, 4.262200676156417, places=12)
        self.assertAlmostEqual(m, 34.76134082028372, places=12)