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

Extended Gauss' propagator #631

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

jorgepiloto
Copy link
Member

I took directly the algorithm from Battin 1999, section 5.6 and tested the algorithm with the proposed example 5-30.

This algorithm still needs to be finished, so CI is going to fail. But I decided to make the PR just for receive code reviews and keep working on this. Last part of Battin's explanation about the algorithm is a little bit confusing.

This may solve when finished #475

@ghost ghost assigned jorgepiloto Mar 26, 2019
@ghost ghost added the 2 - In Progress label Mar 26, 2019
Copy link
Member

@astrojuanlu astrojuanlu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As you requested a review, I left some early comments

src/poliastro/tests/tests_twobody/test_propagation.py Outdated Show resolved Hide resolved
src/poliastro/twobody/propagation.py Outdated Show resolved Hide resolved
src/poliastro/twobody/propagation.py Outdated Show resolved Hide resolved
return x ** 3 - 3 * epsilon * x - 2 * b

# Solving for the roots
x = root(f, b, args=(epsilon, b)).x[0]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a chance we have the derivative of the function? I think the answer is yes, so I would use newton instead. Even if we don't provide the derivative, I would not use root, because it's too general purpose and impossible to accelerate with numba (unless we explore #486)

src/poliastro/twobody/propagation.py Outdated Show resolved Hide resolved
src/poliastro/twobody/propagation.py Outdated Show resolved Hide resolved
@jorgepiloto
Copy link
Member Author

jorgepiloto commented Apr 11, 2019

I've decided to work again on this since I have some free time today. However, even if the tests pass some things still need to be done:

  • When the algorithm checks if the value of A is higher than A_m and gets inside the conditional, the returned orbit is propagated wrong. I have spent hours checking and debugging and not sure if this part is well implemented in the code. Still working on this

  • Furthermore, some docstings are needed

What a pity Riot-Matrix is down today 😢

@codecov
Copy link

codecov bot commented Apr 11, 2019

Codecov Report

Merging #631 into master will decrease coverage by 2.88%.
The diff coverage is 67.81%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #631      +/-   ##
==========================================
- Coverage   87.17%   84.28%   -2.89%     
==========================================
  Files          52       51       -1     
  Lines        2580     2533      -47     
  Branches      220      198      -22     
==========================================
- Hits         2249     2135     -114     
- Misses        262      344      +82     
+ Partials       69       54      -15
Impacted Files Coverage Δ
src/poliastro/twobody/propagation.py 79.72% <67.81%> (-16.7%) ⬇️
src/poliastro/plotting/porkchop.py 0% <0%> (-75.44%) ⬇️
src/poliastro/core/iod.py 74.85% <0%> (-13.78%) ⬇️
src/poliastro/frames.py 71.42% <0%> (-6.73%) ⬇️
src/poliastro/core/elements.py 93.33% <0%> (-6.67%) ⬇️
src/poliastro/twobody/orbit.py 88.99% <0%> (-1.61%) ⬇️
src/poliastro/maneuver.py 94.44% <0%> (-0.16%) ⬇️
src/poliastro/threebody/soi.py 100% <0%> (ø) ⬆️
src/poliastro/plotting/static.py 87.37% <0%> (ø) ⬆️
src/poliastro/czml/czml_extract_default_params.py
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ec2dc04...4f540b1. Read the comment docs.

@astrojuanlu
Copy link
Member

astrojuanlu commented May 9, 2019

Pending:

  • Rebase on current master
  • Add failing tests
  • Add link to paper that contains full flow chart

@jorgepiloto
Copy link
Member Author

Link to paper on Gauss Algorithm: https://dspace.mit.edu/handle/1721.1/16383

@jorgepiloto
Copy link
Member Author

This is going to be my priority during the following days. I will read in detail the paper because even that if Battin is the advisor, I am not sure if it is the same algorithm that the one explained on his book.
And as it is said in the introduction to the paper:

The final algorithm is a general form valid for any orbit of any eccentricity and requires no knowledge of the nature of tKo orbit for application.

So this is supposed to be what I call the MOAP (Mother Of All Propagators) 😆

@jorgepiloto
Copy link
Member Author

Current status of this algorithm:

  • There are two implemented tests: one is from Battin (passing) and another one that tests all the propagators in poliastro (failing in gauss).

  • Algorithm works well if not entering in the elif section, that means that A never exceeds A_max = 0.3. Otherwise algorithm does not converge well. I have done line by line debugging but everything looks good when executing different parts of the code. Problem may be located at this section but I am not able to find the bug.

  • Notice that on the failing tests, results just diverge from a few km.

@jorgepiloto
Copy link
Member Author

Current status and updates on this pull request:

Base automatically changed from master to main March 11, 2021 09:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants