近心点坐标系的相关知识总结

转换代码如下:

import numpy as np

def rotate_z(angle):
    """Rotation matrix around z-axis by angle (in radians)."""
    return np.array([
        [np.cos(angle), -np.sin(angle), 0],
        [np.sin(angle), np.cos(angle), 0],
        [0, 0, 1]
    ])

def rotate_x(angle):
    """Rotation matrix around x-axis by angle (in radians)."""
    return np.array([
        [1, 0, 0],
        [0, np.cos(angle), -np.sin(angle)],
        [0, np.sin(angle), np.cos(angle)]
    ])

def orbital_to_inertial(r, nu, Omega, i, omega):
    """
    Convert from perifocal (orbital) coordinates to inertial coordinates.
    
    Parameters:
    r - radial distance
    nu - true anomaly (in radians)
    Omega - right ascension of the ascending node (in radians)
    i - inclination (in radians)
    omega - argument of periapsis (in radians)
    
    Returns:
    (x, y, z) - inertial coordinates
    """
    # Perifocal coordinates
    x_prime = r * np.cos(nu)
    y_prime = r * np.sin(nu)
    z_prime = 0
    
    # Rotation matrices
    R_z_Omega = rotate_z(-Omega)
    R_x_i = rotate_x(-i)
    R_z_omega = rotate_z(-omega)
    
    # Combined rotation matrix
    R = R_z_Omega @ R_x_i @ R_z_omega
    
    # Perifocal position vector
    r_prime = np.array([x_prime, y_prime, z_prime])
    
    # Inertial position vector
    r_inertial = R @ r_prime
    
    return r_inertial

# Example usage
r = 7000  # Example radial distance in km
nu = np.radians(45)  # Example true anomaly in radians
Omega = np.radians(30)  # Example RAAN in radians
i = np.radians(45)  # Example inclination in radians
omega = np.radians(60)  # Example argument of periapsis in radians

inertial_coords = orbital_to_inertial(r, nu, Omega, i, omega)
print(f"Inertial coordinates: x = {inertial_coords[0]:.2f} km, y = {inertial_coords[1]:.2f} km, z = {inertial_coords[2]:.2f} km")

通过六根数我们可以得到航天器在近心点下的坐标和速度,由近心点下的状态可 推导航天器在惯性系下的状态,由惯性系下的状态可得轨道六根数。

参考:轨道动力学知识点(二)----近焦点坐标系 - 哔哩哔哩 (bilibili.com)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值