inert2rot
- ssapy.utils.inert2rot(x, y, xe, ye, xs=0, ys=0)[source][source]
Transform inertial coordinates to rotated coordinates relative to the Earth.
This function calculates the rotated coordinates of a point (x, y) relative to the Earth, which is assumed to be located at a fixed position (-1, 0) in the rotated frame. The rotation is performed based on the relative position of the Earth (xe, ye) and an optional reference point (xs, ys).
Parameters:
x (float): The x-coordinate of the point in the inertial frame. y (float): The y-coordinate of the point in the inertial frame. xe (float): The x-coordinate of the Earth in the inertial frame. ye (float): The y-coordinate of the Earth in the inertial frame. xs (float, optional): The x-coordinate of the reference point (default is 0). ys (float, optional): The y-coordinate of the reference point (default is 0).
Returns:
- tuple:
xrot (float): The x-coordinate of the point in the rotated frame.
yrot (float): The y-coordinate of the point in the rotated frame.
Example:
inert2rot(2, 3, -1, 0) -> (-3.0, -3.605551275463989)