gcrf_to_itrf
- ssapy.utils.gcrf_to_itrf(r_gcrf, t, v=None)[source][source]
Converts a position vector in the GCRF (Geocentric Celestial Reference Frame) to the ITRF (International Terrestrial Reference Frame) in Cartesian coordinates.
Parameters:
r_gcrf (array-like): The position vector in GCRF coordinates (x, y, z) in meters. t (datetime or float): The time associated with the position vector.
This can be a datetime object or a timestamp in seconds.
- v (array-like, optional): Velocity vector in GCRF coordinates. If provided, the function
will return the velocity transformed to the ITRF frame as well.
Returns:
- tuple:
- If v is not provided:
np.array: A 2D array containing the transformed position vector in ITRF coordinates.
- If v is provided:
np.array: A 2D array containing the transformed position vector in ITRF coordinates.
np.array: The velocity vector transformed to the ITRF frame.
Notes:
The function relies on the groundTrack function from the .compute module to perform the position transformation.
If velocity (v) is provided, the function assumes the existence of a v_from_r function to compute the velocity transformation.