|
🛰️航天仿真算法库 SpaceAST 0.0.1
|
轨道面/轨道路径之间的几何关系计算。
函数 | |
| void | ast::aOrbitPlaneNormal (double inc, double raan, Vector3d &normal) |
| double | ast::aOrbitRadius (double semiMajorAxis, double eccentricity, double trueAnomaly) |
| void | ast::aOrbitPerifocalBasis (const OrbElem &e, Vector3d &p, Vector3d &q) |
| errc_t | ast::aOrbitNodeLineDistances (const OrbElem &orb1, const OrbElem &orb2, double &distPlus, double &distMinus) |
| errc_t | ast::aOrbitPathMinDistance (const OrbElem &orb1, const OrbElem &orb2, double &dist) |
| errc_t | ast::aOrbitPlaneProximityIntervals (const TimePoint &epoch, const OrbElem &orbit, const OrbElem &other, double gm, double threshold, const TimeInterval &window, TimeIntervalList &result) |
| double | ast::aOrbitTrueAnomaly (const TimePoint &epoch, const OrbElem &orbit, double gm, const TimePoint &time) |
| void | ast::aOrbitPosition (const TimePoint &epoch, const OrbElem &orbit, double gm, const TimePoint &time, Vector3d &position) |
| void | ast::aOrbitPosition2 (const TimePoint &epoch, const OrbElem &orbit, double gm, const TimePoint &time, Vector3d &position) |
| void | ast::aOrbitPosition3 (const TimePoint &epoch, const OrbElem &orbit, double gm, const TimePoint &time, Vector3d &position) |
| errc_t | ast::aOrbitPlaneDistance (const TimePoint &epoch, const OrbElem &orbit, const OrbElem &other, double gm, const TimePoint &time, double &dist) |
| AST_CORE_CAPI errc_t ast::aOrbitNodeLineDistances | ( | const OrbElem & | orb1, |
| const OrbElem & | orb2, | ||
| double & | distPlus, | ||
| double & | distMinus ) |
计算两轨道面公共交线对应的两个路径距离 [m]
公共交线方向 L = n1 × n2(n 为轨道面单位法向)。交线在 +L 与 -L 两个方向 上各与两条轨道相交一次,得到两个距离值 distPlus、distMinus。 两轨道路径最短距离 = min(distPlus, distMinus)。 仅使用经典根数 a/e/i/raan/argper,与真近点角及引力常数无关。
| orb1 | 轨道1经典根数 |
| orb2 | 轨道2经典根数 |
| distPlus | 输出:+L 方向两交点距离 [m] |
| distMinus | 输出:-L 方向两交点距离 [m] |
| AST_CORE_CAPI errc_t ast::aOrbitPathMinDistance | ( | const OrbElem & | orb1, |
| const OrbElem & | orb2, | ||
| double & | dist ) |
计算两轨道路径之间的最短距离 [m]
基于公共交线法;共面/近共面退化时改用一维共线假设的数值回退。
| orb1 | 轨道1经典根数 |
| orb2 | 轨道2经典根数 |
| dist | 输出:最短距离 [m] |
| AST_CORE_CAPI void ast::aOrbitPerifocalBasis | ( | const OrbElem & | e, |
| Vector3d & | p, | ||
| Vector3d & | q ) |
计算轨道 perifocal 基向量(近拱点/垂直方向)在惯性系中的表达
perifocal 坐标系(P、Q、W)附着于轨道:P 指向近拱点,Q 在轨道面内 沿运动方向超前 P 90°,W = P × Q 为轨道面法向。 仅使用经典根数 i/raan/argper。
| e | 经典根数 |
| p | 输出:近拱点方向单位向量 P |
| q | 输出:轨道面内超前 P 90° 的单位向量 Q |
| AST_CORE_CAPI errc_t ast::aOrbitPlaneDistance | ( | const TimePoint & | epoch, |
| const OrbElem & | orbit, | ||
| const OrbElem & | other, | ||
| double | gm, | ||
| const TimePoint & | time, | ||
| double & | dist ) |
计算给定时刻本对象到另一对象轨道面的有符号距离 [m]
有符号距离 d = r·n2,为位置矢量在另一对象轨道面单位法向 n2 上的投影。 正值在 +n2 侧,负值在 -n2 侧,绝对值为垂直距离。 由 epoch 处轨道根数经开普勒二体传播得到真近点角,再计算面距。
| epoch | 本对象的轨道历元 |
| orbit | 本对象的轨道根数 |
| other | 另一对象的轨道根数(仅用 i/raan 定义其轨道面,与历元无关) |
| gm | 引力常数 [m^3/s^2] |
| time | 查询时刻 |
| dist | 输出:到轨道面的有符号距离 [m] |
| AST_CORE_CAPI void ast::aOrbitPlaneNormal | ( | double | inc, |
| double | raan, | ||
| Vector3d & | normal ) |
计算轨道面单位法向量(惯性参考系)
由轨道倾角与升交点赤经唯一确定轨道面姿态,法向量为 n = (sin i · sin Ω, -sin i · cos Ω, cos i),即轨道角动量方向。
| inc | 轨道倾角 [rad] |
| raan | 升交点赤经 [rad] |
| normal | 输出:轨道面单位法向量 |
| AST_CORE_CAPI errc_t ast::aOrbitPlaneProximityIntervals | ( | const TimePoint & | epoch, |
| const OrbElem & | orbit, | ||
| const OrbElem & | other, | ||
| double | gm, | ||
| double | threshold, | ||
| const TimeInterval & | window, | ||
| TimeIntervalList & | result ) |
计算本对象相对于另一对象轨道面距离在指定距离阈值内的时间区间
| epoch | 本对象的轨道历元 |
| orbit | 本对象的轨道根数 |
| other | 另一对象的轨道根数(仅用 i/raan 定义其轨道面,与历元无关) |
| gm | 引力常数 [m^3/s^2] |
| threshold | 到轨道面距离阈值 [m] |
| window | 分析窗口:只生成落在窗口内的区间 |
| result | 输出:所有在距离阈值内的时间区间 |
| AST_CORE_CAPI void ast::aOrbitPosition | ( | const TimePoint & | epoch, |
| const OrbElem & | orbit, | ||
| double | gm, | ||
| const TimePoint & | time, | ||
| Vector3d & | position ) |
计算给定时刻的轨道位置
| epoch | 轨道历元 |
| orbit | 轨道根数 |
| gm | 引力常数 [m^3/s^2] |
| time | 查询时刻 |
| position | 输出:查询时刻的轨道位置 |
| AST_CORE_CAPI double ast::aOrbitRadius | ( | double | semiMajorAxis, |
| double | eccentricity, | ||
| double | trueAnomaly ) |
计算真近点角处的轨道半径 [m]
椭圆轨道极坐标方程 r = a(1-e²)/(1 + e·cosν)。 ν=0 为近拱点半径 a(1-e),ν=π 为远拱点半径 a(1+e)。
| semiMajorAxis | 长半轴 [m] |
| eccentricity | 偏心率 |
| trueAnomaly | 真近点角 [rad] |