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

Repeat Ground Track Orbit Implementation #984

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Meuge
Copy link
Contributor

@Meuge Meuge commented Jun 26, 2020

No description provided.

@codecov
Copy link

codecov bot commented Jun 26, 2020

Codecov Report

Merging #984 (be60385) into main (7dd35c6) will increase coverage by 0.36%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #984      +/-   ##
==========================================
+ Coverage   89.70%   90.07%   +0.36%     
==========================================
  Files          72       77       +5     
  Lines        3827     5529    +1702     
  Branches      331      580     +249     
==========================================
+ Hits         3433     4980    +1547     
- Misses        311      435     +124     
- Partials       83      114      +31     
Impacted Files Coverage Δ
src/poliastro/earth/__init__.py 100.00% <100.00%> (ø)
src/poliastro/plotting/util.py 76.66% <0.00%> (-2.50%) ⬇️
src/poliastro/plotting/static.py 89.90% <0.00%> (-2.02%) ⬇️
src/poliastro/twobody/elements.py 91.83% <0.00%> (-1.03%) ⬇️
src/poliastro/twobody/mean_elements.py 88.00% <0.00%> (-0.24%) ⬇️
src/poliastro/spheroid_location.py 87.62% <0.00%> (-0.07%) ⬇️
src/poliastro/util.py 100.00% <0.00%> (ø)
src/poliastro/__init__.py 100.00% <0.00%> (ø)
src/poliastro/core/hyper.py 100.00% <0.00%> (ø)
src/poliastro/czml/utils.py 100.00% <0.00%> (ø)
... and 33 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 7dd35c6...be60385. Read the comment docs.

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.

Looking good! Left some comments 📖

@@ -104,3 +105,66 @@ def ad(t0, state, k, perturbations):
ad_kwargs.update(perturbations=perturbations)
new_orbit = self.orbit.propagate(value=tof, method=cowell, ad=ad, **ad_kwargs)
return EarthSatellite(new_orbit, self.spacecraft)

def rgt(self, ndays, norbits, atol=1e-10, iter=float("+inf")):
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
def rgt(self, ndays, norbits, atol=1e-10, iter=float("+inf")):
def repeating_ground_track(self, ndays, norbits, atol=1e-10, iter=float("+inf")):

Let's better have the long name :)

Copy link
Member

Choose a reason for hiding this comment

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

Ideas:

  • Transform this into a @classmethod receiving: (a, ecc, inc, ndays, norbits, spacecraft). But we already thought that classmethods were ugly, so...
  • Add this as a @classmethod in Orbit

Can we attempt the second one?


Notes
-----
The algorithm was obtained from "Fundamentals of Astrodynamics and Applications", 4th ed (2013)" by David
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
The algorithm was obtained from "Fundamentals of Astrodynamics and Applications", 4th ed (2013)" by David
The algorithm was obtained from "Fundamentals of Astrodynamics and Applications, 4th ed (2013)" by David

src/poliastro/earth/__init__.py Show resolved Hide resolved
J2 = Earth.J2.value
R = Earth.R.to(u.km)
i = self.orbit.inc
we = 7.292115855306589e-5 * (1 / u.s)
Copy link
Member

Choose a reason for hiding this comment

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

We can use .angular_velocity from Body class instead

Copy link
Member

Choose a reason for hiding this comment

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

>>> Earth.angular_velocity
<Quantity 7.29211415e-05 rad / s>

@astrojuanlu
Copy link
Member

@Meuge added some extra information to https://github.com/poliastro/poliastro/wiki/Repeating-Ground-Track-Orbit we want to compare the algorithms for similarities and differences.

@astrojuanlu
Copy link
Member

Some ideas after a first pass:

  • The numerical model by David Eagle (repeat2.m) is not really equivalent to the other ones: it uses a gravitational model of degree and order 18 as well as Solar perturbations, therefore it's much more sophisticated than what we need.
  • repeat1.m solves the direct problem (how much time does it take for this orbit to repeat its groundtrack?) while repeat3.m solves the inverse problem (which orbit do I need to fulfill these repeating groundtrack requirements?). We are interested in the latter.
  • repeat3.m uses mean Kozai elements, while repeat4.m uses osculating elements
  • Curtis algorithm doesn't seem to take any perturbations into account (not even nodal regression), therefore it's probably not very useful.
  • It's too early to mplement repeat2.m or repeat4.m in poliastro, since we don't have good support for high order gravitational models

Therefore, what's left is:

  • Make 100 % sure that Vallado and Wagner algorithms are the same or equivalent, which means that we would be using Kozai mean elements (this is not stated in Vallado)
  • Find out why Vallado/Wagner and Noreen et al are different, and in particular determine if the latter is a strict superset of the former

@Meuge
Copy link
Contributor Author

Meuge commented Jul 23, 2020

  • Noreen

I’ve been reading Wagner’s algorithm in detail along with the one in Vallado, and I haven’t noticed a major difference.
As for the Noreen case, it shares some similarities with Vallado’s algorithm. Nevertheless, the algorithm looks for repeating ground track orbits that pass the same locations at the same each solar day, so basically daily. Also, another big difference is that the Period takes into consideration the sidereal and solar period, and it distinguishes between prograde and retrograde orbits.
It’s worth stressing that I haven’t read any mention for retrograde orbits in Vallado for this algorithm, and when I tried to test it with Mars and Venus examples of repeating ground- track orbits, the semimajor axis differs approximately 10/20 km and the eccentricity wasn’t as accurate as Earth’s case.

@Meuge
Copy link
Contributor Author

Meuge commented Jul 24, 2020

Another approach worth considering might be using Newton-Raphson, see this paper, for further information. Still, I am dubious if it's going to solve our problem to generalize to all the bodies since it doesn't have any reference other than Earth. It's my understanding that this method and the one implemented in the PR only works for prograde orbits.

@astrojuanlu
Copy link
Member

Vtipil (2012) looks interesting, it introduces more methods and adds some theoretical background about the assumptions behind them. I added it to the wiki, and expanded a little bit with the information we discussed.

I think our requirements should be:

  1. Approximate method. Let's consider only J2 perturbations. Otherwise it's (a) a rabbit hole and (b) much more difficult to implement.
  2. Should work for all eccentric orbits, not only near-circular ones.

@astrojuanlu
Copy link
Member

astrojuanlu commented Jul 24, 2020

@Meuge To avoid blocking you any further, if you see that Noreen's algorithm (a) gives more or less same results for orbits that Vallado & Wagner already solve and (b) works for Mars and Venus, let's go for it.

@astrojuanlu
Copy link
Member

...although now I remembered that Noreen contains several cases: circular equatorial orbits, equatorial eccentric orbits, circular Sun-synchronous orbits, and critically inclined eccentric orbits. Therefore, there is not single formula that would work for all orbits, as far as I understand. @Meuge which case in particular were you using for your comparison?

@Meuge
Copy link
Contributor Author

Meuge commented Jul 24, 2020

...although now I remembered that Noreen contains several cases: circular equatorial orbits, equatorial eccentric orbits, circular Sun-synchronous orbits, and critically inclined eccentric orbits. Therefore, there is not single formula that would work for all orbits, as far as I understand. @Meuge which case in particular were you using for your comparison?

That's right Noreen details several cases, but I compared the circular equatorial orbits since in the fourth edition of Vallado's book, page 870, it's stated the following "However, consider near-Earth satellites routinely used to study Earth resources, such as Landsat and RADARSAT, with nearly circular orbits, e ≈ 0.0011. Because the eccentricity is of the 22 same order as J2, e ≈ J2 « 1 . As a result, we can simplify the secular rate expressions (deleting terms of e2) and add them together:". So if I understood correctly, it's taking into consideration only circular orbits. 🤔

@astrojuanlu
Copy link
Member

Gotcha. Perhaps my requirement of having a method that works with all eccentric orbits is too stringent. I'll give this more thought today.

@astrojuanlu
Copy link
Member

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
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants