Closed OrbitalPineapple closed 7 years ago
Use orbitX.r
and orbitX.v
.
I tried it before and again now and it resulted in an attribute error. Code:
print(orbitX.r)
print(orbitX.v)
AttributeError Traceback (most recent call last)
<ipython-input-16-d39ac04f7e8f> in <module>()
----> 1 print(orbitX.r)
2 print(orbitX.v)
AttributeError: 'NoneType' object has no attribute 'r'
It turns out that for the state vectors .r and .v you can only use the original orbit name. The original name will automatically be updated after each maneuver or propagation.
So,
print(orbitPineapple.r)
print(orbitPineapple.v)
will give me the state vectors, position and velocity, in Earth centric inertial coordinates (ECI).
Yes, apply_maneuver
mutates the orbit as shown in the documentation.
I am trying to get the cartesian position and velocity vectors for each propagation step in my orbit. I generated the orbit with Keplerian elements.
According to the documentation I should be able to get the state vectors (both position and velocity) from class orbital.utilities.StateVector , but I get a Type Error: new() takes exactly 3 arguments (2 given)
Here is the code:
Out[23]: KeplerianElements(a=6945033.343911132, e=0, i=0.90058989402907408, raan=0, arg_pe=0, M0=0.0, body=orbital.bodies.earth, ref_epoch=
TypeError Traceback (most recent call last)