Skip to content
This repository has been archived by the owner on Oct 14, 2023. It is now read-only.

Orbit propagate get wrong answer #1621

Open
Rundao opened this issue Mar 15, 2023 · 0 comments
Open

Orbit propagate get wrong answer #1621

Rundao opened this issue Mar 15, 2023 · 0 comments

Comments

@Rundao
Copy link

Rundao commented Mar 15, 2023

馃悶 Orbit propagate get wrong answer in 3 cases

from poliastro.twobody.propagation.farnocchia import farnocchia_rv_fast as propagate

Case1

propagate(1., np.array([1., -1., 0.]), np.array([-1., -1., 0.]), 0.)
array([[ 1.41421356e+00,  0.00000000e+00,  0.00000000e+00],
       [ 0.00000000e+00, -1.41421356e+00,  1.73191211e-16]])

It should be r = [1., -1., 0.] and v = [-1., -1., 0.]

Case2

propagate(1., np.array([1., 0., 0.]), np.array([-1., -1., 0.]), 0.)

It raises ZeroDivisionError: division by zero.

Case3

propagate(1., np.array([1., 0., 0.]), np.array([-1.1, -1., 0.]), 0.)
array([[ 1.00000000e+00,  8.88178420e-16, -1.08770486e-31],
       [-1.10000000e+00, -1.00000000e+00,  1.22464680e-16]])

is correct, but change vz0=0. to vz0=-0.

propagate(1., np.array([1., 0., 0.]), np.array([-1.1, -1., -0.]), 0.)
array([[-1.00000000e+00, -7.65713740e-16, -1.08770486e-31],
       [ 1.10000000e+00,  1.00000000e+00,  1.22464680e-16]])

it returns -r_correct.

馃枼 Please paste the output of following commands

  • conda list
    Name Version Build Channel
    poliastro 0.17.0 pyhd8ed1ab_1 conda-forge
# Paste your output here:
# Paste your output here:

馃挕 Possible solutions

馃搵 Steps to solve the problem

  • Comment below about what you've started working on.
  • Add, commit, push your changes
  • Submit a pull request and add this in comments - Addresses #<put issue number here>
  • Ask for a review in comments section of pull request
  • Celebrate your contribution to this project 馃帀
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant