I have position (x,y,z) and velocity (Vx,Vy,Vz) vectors in Earth Centered Inertial Coordinates (ECI) for a satellite orbit, and ultimately want to end up with geodetic coordinates (Latitude, Longitude, & Altitude).
According to this other Stack Overflow question it seems that I need to convert to Earth Centered Earth Fixed (ECEF) coordinates as an intermediate step (so ECI --> ECEF --> Lat/Lon/Alt).
I know ECI and ECEF share the same origin point (the center of mass of Earth) and the same z-axis that points to the North Pole. However, I am not sure what actual equations or adjustments I need to do to convert ECI to ECEF.
Otherwise, if anyone knows of any canned conversions on Astropy or something similar that would be even better. (I haven't seen ECI as an option on Astro Py or Space Py).
Here is the code I am using to generate my orbit and get the position and velocity vectors.
from scipy.constants import kilo
import orbital
from orbital import earth, KeplerianElements, Maneuver, plot, utilities
from orbital.utilities import Position, Velocity
import matplotlib.pyplot as plt
import numpy as np
orbitPineapple = KeplerianElements.with_period(5760, body=earth,
e=0.05, i=(np.deg2rad(0)), arg_pe=(np.deg2rad(30)))
plot(orbitPineapple)
plt.show()
print(orbitPineapple.r)
print(orbitPineapple.v)
Out: Position(x=5713846.540659178, y=3298890.8383577876, z=0.0) Velocity(x=-3982.305479346745, y=6897.555421488496, z=0.0)