示例#1
0
def test_convert_between_coe_and_mee_is_transitive():
    p = 11067.790  # u.km
    ecc = 0.83285  # u.one
    inc = np.deg2rad(87.87)  # u.rad
    raan = np.deg2rad(227.89)  # u.rad
    argp = np.deg2rad(53.38)  # u.rad
    nu = np.deg2rad(92.335)  # u.rad

    expected_res = (p, ecc, inc, raan, argp, nu)

    res = mee2coe(*coe2mee(*expected_res))

    assert_allclose(res, expected_res)
示例#2
0
    def to_equinoctial(self):
        """Converts to modified equinoctial elements representation.

        """
        p, f, g, h, k, L = coe2mee(self.p.to(u.km).value,
                                   self.ecc.value,
                                   self.inc.to(u.rad).value,
                                   self.raan.to(u.rad).value,
                                   self.argp.to(u.rad).value,
                                   self.nu.to(u.rad).value)

        return equinoctial.ModifiedEquinoctialState(
            self.attractor,
            p * u.km,
            f * u.rad,
            g * u.rad,
            h * u.rad,
            k * u.rad,
            L * u.rad)
示例#3
0
def test_convert_between_coe_and_mee_is_transitive(classical):
    res = mee2coe(*coe2mee(*classical))
    assert_allclose(res, classical)
示例#4
0
def test_convert_between_coe_and_mee_is_transitive(classical):
    res = mee2coe(*coe2mee(*classical))
    assert_allclose(res, classical)
示例#5
0
def test_convert_between_coe_and_mee_is_transitive(expected_res):
    res = mee2coe(*coe2mee(*expected_res))
    assert_allclose(res, expected_res)