Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions orbitdeterminator/kep_determination/orbital_elements.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def h_angularmomentuum(R=None, V=None, semimajor_axis=None, eccentricity=None):

h_angularmomentuum = None

if R.any != None and V.any != None:
if R is not None and V is not None:
h = np.cross(R, V)
h_angularmomentuum = np.linalg.norm(h)

Expand Down Expand Up @@ -119,7 +119,7 @@ def true_anomaly(R=None, V=None, eccentricity=None, E_eccentric_anomaly=None):

true_anomaly = None

if R.any != None and V.any != None:
if R is not None and V is not None:

r_abs = np.linalg.norm(R)
v_abs = np.linalg.norm(V)
Expand Down Expand Up @@ -194,7 +194,7 @@ def semimajor_axis(R = None, V = None, T_orbitperiod = None):

semimajor_axis = None

if R.any != None and V.any != None:
if R is not None and V is not None:
eccentricity_vec = eccentricity_v(R, V)
eccentricity = np.linalg.norm(eccentricity_vec)

Expand Down Expand Up @@ -393,4 +393,4 @@ def get_statevector_from_orbital_elemts(self, inclination, raan, eccentricity,
V2 = oe.V

print(R2, np.linalg.norm(R2))
print(np.linalg.norm(R2-R1))
print(np.linalg.norm(R2-R1))