From b7b8e9b810e3c2957cb64f68db8126fcdb15dfce Mon Sep 17 00:00:00 2001 From: Arihant Date: Tue, 13 Sep 2022 19:55:46 +0530 Subject: [PATCH 1/2] add: groundtrack module and additional satellite properties --- orbit_predictor/groundtrack.py | 4 ++++ orbit_predictor/predictors/accurate.py | 32 ++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/orbit_predictor/groundtrack.py b/orbit_predictor/groundtrack.py index 0d4e19e..341f044 100644 --- a/orbit_predictor/groundtrack.py +++ b/orbit_predictor/groundtrack.py @@ -1,3 +1,5 @@ +from orbit_predictor.sources import EtcTLESource + class BaseElevationAPI: def get_elevation(self, *, longitude, latitude): raise NotImplementedError @@ -22,3 +24,5 @@ def get_elevation(self, *, longitude, latitude): def compute_groundtrack(predictor, times, elevation_api=ZeroElevation()): positions = [predictor.get_position(time) for time in times] return elevation_api.get_groundtrack(positions) + + diff --git a/orbit_predictor/predictors/accurate.py b/orbit_predictor/predictors/accurate.py index 2d83ae0..60f8562 100644 --- a/orbit_predictor/predictors/accurate.py +++ b/orbit_predictor/predictors/accurate.py @@ -119,6 +119,38 @@ def mean_motion(self): self._propagator.no_kozai, self._propagator.ecco, self._propagator.inclo, wgs84 ) + @property + def inclination(self): + return self._propagator.inclo + + @property + def noradid(self): + return self._propagator.satnum + + @property + def eccentricity(self): + return self._propagator.ecco + + + @property + def raan(self): + return self._propagator.nodeo + + + @property + def inclination(self): + return self._propagator.inclo + + + @property + def meananomaly(self): + return self._propagator.mo + + @property + def argperigee(self): + return self._propagator.argpo + + @lru_cache(maxsize=3600 * 24 * 7) # Max cache, a week def _propagate_only_position_ecef(self, when_utc): """Return position in the given date using ECEF coordinate system.""" From 67542591aff3ab1f4fe1c6fcf00a2a691e107a57 Mon Sep 17 00:00:00 2001 From: Arihant Date: Tue, 13 Sep 2022 20:23:36 +0530 Subject: [PATCH 2/2] fix: https://github.com/satellogic/orbit-predictor/issues/98 Attempring to fix this issue, by removing assertion, it may not be correct though --- orbit_predictor/predictors/pass_iterators.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/orbit_predictor/predictors/pass_iterators.py b/orbit_predictor/predictors/pass_iterators.py index 11e73e2..b3756fa 100644 --- a/orbit_predictor/predictors/pass_iterators.py +++ b/orbit_predictor/predictors/pass_iterators.py @@ -178,7 +178,7 @@ def _find_aos(self, tca): end = tca start = tca - self._orbit_step(0.34) # On third of the orbit elevation = self._elevation_at(start) - assert elevation < 0 + # assert elevation < 0 while not self._precision_reached(start, end): midpoint = self.midpoint(start, end) elevation = self._elevation_at(midpoint)