-
-
Notifications
You must be signed in to change notification settings - Fork 276
Repeat Ground Track Orbit Implementation #984
base: main
Are you sure you want to change the base?
Conversation
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
There was a problem hiding this 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")): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 :)
There was a problem hiding this comment.
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
inOrbit
Can we attempt the second one?
|
||
Notes | ||
----- | ||
The algorithm was obtained from "Fundamentals of Astrodynamics and Applications", 4th ed (2013)" by David |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
J2 = Earth.J2.value | ||
R = Earth.R.to(u.km) | ||
i = self.orbit.inc | ||
we = 7.292115855306589e-5 * (1 / u.s) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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>
@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. |
Some ideas after a first pass:
Therefore, what's left is:
|
I’ve been reading Wagner’s algorithm in detail along with the one in Vallado, and I haven’t noticed a major difference. |
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. |
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:
|
@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. |
...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. 🤔 |
Gotcha. Perhaps my requirement of having a method that works with all eccentric orbits is too stringent. I'll give this more thought today. |
No description provided.