open-space-collective / open-space-toolkit-astrodynamics

Flight profile, orbit, attitude, access.
https://open-space-collective.github.io/open-space-toolkit-astrodynamics/
Apache License 2.0
58 stars 14 forks source link

feat!: simplify orbit constructor and State conversion to COE #434

Closed vishwa2710 closed 2 months ago

vishwa2710 commented 2 months ago
from ostk.physics.environment.object.celestial import Earth
from ostk.astrodynamics.trajectory import Orbit
from ostk.astrodynamics.trajectory.orbit.model.sgp4 import TLE
from ostk.astrodynamics.trajectory.orbit.model import SGP4

tle = TLE(...)
sgp4 = SGP4(tle)

orbit = Orbit.Builder().with_celestial(Earth.default()).with_model(sgp4).build()

Or even

from ostk.astrodynamics.trajectory import Orbit
from ostk.astrodynamics.trajectory.orbit.model.sgp4 import TLE

tle = TLE(...)
orbit = Orbit.Builder().with_earth().with_tle(tle).build()

and

from ostk.astrodynamics.trajectory import Orbit

states = [...]
orbit = Orbit.Builder().with_earth().with_tabulated(states).build()
codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 90.87%. Comparing base (133716b) to head (b75924e).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #434 +/- ## ======================================= Coverage 90.87% 90.87% ======================================= Files 84 84 Lines 8359 8366 +7 ======================================= + Hits 7596 7603 +7 Misses 763 763 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.