Avoid unnecessary element conversions in propagation #921
Comments
I'm wondering if |
Prospective contributors: notice that most of the propagators in https://github.com/poliastro/poliastro/tree/master/src/poliastro/core/propagation do something like this: @jit
def propagator_name(k, r0, v0, tof):
p, ecc, inc, raan, argp, nu = rv2coe(k, r0, v0)
...
return coe2rv(k, p, ecc, inc, raan, argp, nu) for all of them, create new functions that do @jit
def propagator_name_coe(k, p, ecc, inc, raan, argp, nu):
...
return nu so we can replace the current ones with @jit
def propagator_name(k, r0, v0, tof):
p, ecc, inc, raan, argp, nu = rv2coe(k, r0, v0)
nu = propagator_name_coe(k, p, ecc, inc, raan, argp, nu)
return coe2rv(k, p, ecc, inc, raan, argp, nu) Also, notice that https://github.com/poliastro/poliastro/blob/master/src/poliastro/core/propagation/farnocchia.py, but no https://github.com/poliastro/poliastro/blob/master/src/poliastro/core/propagation/markley.py, https://github.com/poliastro/poliastro/blob/master/src/poliastro/core/propagation/vallado.py... therefore, when doing this change, consider creating new modules for the propagators currently in https://github.com/poliastro/poliastro/blob/master/src/poliastro/core/propagation/__init__.py. |
@andrea-carballo expressed interest on working on this! 🚀 let's start with |
In #1026, we added |
Postponing this to the next release. |
Fix poliastrogh-921. Still missing proper sampling support and incompatibilities with cowell.
Fix poliastrogh-921. Still missing proper sampling support and incompatibilities with cowell.
Fix poliastrogh-921. Still missing proper sampling support and incompatibilities with cowell.
Fix poliastrogh-921. Still missing proper sampling support and incompatibilities with cowell.
Fix poliastrogh-921. Still missing proper sampling support and incompatibilities with cowell.
Fix poliastrogh-921. Still missing proper sampling support and incompatibilities with cowell.
gh-1521 addresses this by refactoring the propagators into classes. Such classes have a |
Summary:
poliastro/src/poliastro/twobody/orbit.py
Lines 1332 to 1339 in e57d8c4
At the moment, all propagators are forced to receive cartesian elements and return cartesian elements. This introduces inaccuracies, especially given the fact that most propagators work internally with classical orbital elements.
We should find a way to introduce more intermediate layers so:
Orbit.propagate
andOrbit.sample
work exactly the samepoliastro.twobody.propagation.propagate
can still receive any method and produce aCartesianRepresentation
objectThe text was updated successfully, but these errors were encountered: