You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to use keplerian2ecef to get satellite positions,however,it shows error" T0 = [datetime(1980, 1, 6) + timedelta(weeks=week) for week in weeks].
ValueError: cannot convert float NaN to intege"
import georinex as gr
import sys
import georinex.plots as grp
from matplotlib.pyplot import show
from georinex.keplerian import keplerian2ecef
try:
import pymap3d as pm
except ImportError:
pm = None
print(sys.version)
nav = gr.load("./data/BRDC00WRD_R_20221260000_01D_GN.rnx")
# grp.timeseries(nav)
# show()
svs = nav.sv.values
for sv in svs:
if sv[0] == "S":
lat, lon, alt = pm.ecef2geodetic(
nav.sel(sv=sv)["X"].dropna(dim="time", how="all"),
nav.sel(sv=sv)["Y"].dropna(dim="time", how="all"),
nav.sel(sv=sv)["Z"].dropna(dim="time", how="all"),
)
if ((alt < 35.7e6) | (alt > 35.9e6)).any():
logging.warning("unrealistic geostationary satellite altitudes")
if ((lat < -1) | (lat > 1)).any():
logging.warning("unrealistic geostationary satellite latitudes")
elif sv[0] == "R":
lat, lon, alt = pm.ecef2geodetic(
nav.sel(sv=sv)["X"].dropna(dim="time", how="all"),
nav.sel(sv=sv)["Y"].dropna(dim="time", how="all"),
nav.sel(sv=sv)["Z"].dropna(dim="time", how="all"),
)
if ((alt < 19.0e6) | (alt > 19.4e6)).any():
logging.warning("unrealistic GLONASS satellite altitudes")
if ((lat < -67) | (lat > 67)).any():
logging.warning("GLONASS inclination ~ 65 degrees")
elif sv[0] == "G":
ecef = keplerian2ecef(nav.sel(sv=sv))
lat, lon, alt = pm.ecef2geodetic(*ecef)
if ((alt < 19.4e6) | (alt > 21.0e6)).any():
logging.warning("unrealistic GPS satellite altitudes")
if ((lat < -57) | (lat > 57)).any():
logging.warning("GPS inclination ~ 55 degrees")
elif sv[0] == "E":
ecef = keplerian2ecef(nav.sel(sv=sv))
lat, lon, alt = pm.ecef2geodetic(*ecef)
if ((alt < 23e6) | (alt > 24e6)).any():
logging.warning("unrealistic Galileo satellite altitudes")
if ((lat < -57) | (lat > 57)).any():
logging.warning("Galileo inclination ~ 56 degrees")
else:
continue
I want to use keplerian2ecef to get satellite positions,however,it shows error" T0 = [datetime(1980, 1, 6) + timedelta(weeks=week) for week in weeks].
ValueError: cannot convert float NaN to intege"
Ephemeris like this
The text was updated successfully, but these errors were encountered: