Exemplo n.º 1
0
    def to_classical(self):
        p, ecc, inc, raan, argp, nu = mee2coe(
            self.p.to(u.km).value,
            self.f.to(u.rad).value,
            self.g.to(u.rad).value,
            self.h.to(u.rad).value,
            self.k.to(u.rad).value,
            self.L.to(u.rad).value,
        )

        return ClassicalState(
            self.attractor,
            p * u.km,
            ecc * u.one,
            inc * u.rad,
            raan * u.rad,
            argp * u.rad,
            nu * u.rad,
        )
Exemplo n.º 2
0
    def to_classical(self):
        p, ecc, inc, raan, argp, nu = mee2coe(
            self.p.to(u.km).value,
            self.f.to(u.rad).value,
            self.g.to(u.rad).value,
            self.h.to(u.rad).value,
            self.k.to(u.rad).value,
            self.L.to(u.rad).value,
        )

        return ClassicalState(
            self.attractor,
            p * u.km,
            ecc * u.one,
            inc * u.rad,
            raan * u.rad,
            argp * u.rad,
            nu * u.rad,
        )
Exemplo n.º 3
0
    def to_classical(self):
        """Converts to classical orbital elements representation."""
        p, ecc, inc, raan, argp, nu = mee2coe(
            self.p.to_value(u.km),
            self.f.to_value(u.rad),
            self.g.to_value(u.rad),
            self.h.to_value(u.rad),
            self.k.to_value(u.rad),
            self.L.to_value(u.rad),
        )

        return ClassicalState(
            self.attractor,
            p * u.km,
            ecc * u.one,
            inc * u.rad,
            raan * u.rad,
            argp * u.rad,
            nu * u.rad,
            self.plane,
        )
Exemplo n.º 4
0
def test_convert_between_coe_and_mee_is_transitive(classical):
    res = mee2coe(*coe2mee(*classical))
    assert_allclose(res, classical)
Exemplo n.º 5
0
def test_convert_between_coe_and_mee_is_transitive(classical):
    res = mee2coe(*coe2mee(*classical))
    assert_allclose(res, classical)
Exemplo n.º 6
0
def test_convert_between_coe_and_mee_is_transitive(expected_res):
    res = mee2coe(*coe2mee(*expected_res))
    assert_allclose(res, expected_res)