-
Notifications
You must be signed in to change notification settings - Fork 59
Open
Labels
enhancementquestionGeneral question on CoordinateSharp's usage.General question on CoordinateSharp's usage.
Description
I have some ECI data in .17col format that I need to convert to lat, long, alt. I was able to do this in Python, but that forces me to run a separate conversion outside of our main platform. I would like our C# ingestor to be able to handle this. Is this something CoordinateSharp can do?
This is the python script I'm using to do the actual conversion, if it helps.
from astropy import coordinates as coord
from astropy import units as u
def eci_to_latlong(t, x_eci, y_eci, z_eci):
#compliments of https://stackoverflow.com/questions/46494755/obstime-syntax-for-astropy-python-utc-time-for-coordinate-conversion
xyz = [x_eci,y_eci,z_eci]
cartrep = coord.CartesianRepresentation(*xyz, unit=u.m) #adding units of [m] to xyz
gcrs = coord.GCRS(cartrep, obstime=t)
itrs = gcrs.transform_to(coord.ITRS(obstime=t))
loc = coord.EarthLocation(*itrs.cartesian.xyz)
return loc.lat.value, loc.lon.value, loc.height.value
Metadata
Metadata
Assignees
Labels
enhancementquestionGeneral question on CoordinateSharp's usage.General question on CoordinateSharp's usage.