24#include "AstCore/Vector.hpp"
25#include "AstCore/OrbitParam.hpp"
26#include "AstCore/TimePoint.hpp"
27#include "AstUtil/Constants.h"
55 A_DEF_POD_ITERABLE(
double)
59 const Vector3d& pos()
const {
return pos_;}
60 Vector3d& pos() {
return pos_;}
61 const Vector3d& position()
const {
return pos_;}
62 Vector3d& position() {
return pos_;}
66 const Vector3d&
vel()
const {
return vel_;}
67 Vector3d& vel() {
return vel_;}
68 const Vector3d& velocity()
const {
return vel_;}
69 Vector3d& velocity() {
return vel_;}
71 double& x() {
return pos_.x();}
72 double& y() {
return pos_.y();}
73 double& z() {
return pos_.z();}
74 double& vx() {
return vel_.x();}
75 double& vy() {
return vel_.y();}
76 double& vz() {
return vel_.z();}
78 double x()
const {
return pos_.x();}
79 double y()
const {
return pos_.y();}
80 double z()
const {
return pos_.z();}
81 double vx()
const {
return vel_.x();}
82 double vy()
const {
return vel_.y();}
83 double vz()
const {
return vel_.z();}
87 std::string toString()
const;
106 double getSMA()
const {
return a_;}
108 double getA()
const {
return a_;}
110 double getE()
const {
return e_;}
112 double getI()
const {
return i_;}
114 double getRAAN()
const {
return raan_;}
116 double getArgPer()
const {
return argper_;}
118 double getTrueA()
const {
return trueA_;}
122 std::string toString()
const;
124 A_DEF_POD_ITERABLE(
double)
125 AST_DEF_ACCESS_METHOD(
double, a)
126 AST_DEF_ACCESS_METHOD(
double, e)
127 AST_DEF_ACCESS_METHOD(
double, i)
128 AST_DEF_ACCESS_METHOD(
double, raan)
129 AST_DEF_ACCESS_METHOD(
double, argper)
130 AST_DEF_ACCESS_METHOD(
double, trueA)
147 double getSMA()
const {
return rp_ / (1 - e_);}
165 double getPeriAlt(
double bodyRadius)
const{
return getPeriRad() - bodyRadius;}
206 return stateEpoch - getTimePastAscNode(gm);
212 return aRAANToLAN(getRAAN(), inertialAxes, timeOfAscNodePassage, bodyFixedAxes);
217 double getA()
const {
return getSMA();}
220 double getP()
const {
return rp_ * (1 + e_);}
222 double getE()
const {
return getEcc();}
224 double getI()
const {
return getInc();}
226 double getArgPer()
const {
return getArgPeri();}
228 double getTrueA()
const {
return getTrueAnomaly();}
232 std::string toString()
const;
234 A_DEF_POD_ITERABLE(
double)
235 AST_DEF_ACCESS_METHOD(
double, rp)
236 AST_DEF_ACCESS_METHOD(
double, e)
237 AST_DEF_ACCESS_METHOD(
double, i)
238 AST_DEF_ACCESS_METHOD(
double, raan)
239 AST_DEF_ACCESS_METHOD(
double, argper)
240 AST_DEF_ACCESS_METHOD(
double, trueA)
259 A_DEF_POD_ITERABLE(
double)
260 AST_DEF_ACCESS_METHOD(
double, a)
261 AST_DEF_ACCESS_METHOD(
double, h)
262 AST_DEF_ACCESS_METHOD(
double, k)
263 AST_DEF_ACCESS_METHOD(
double, p)
264 AST_DEF_ACCESS_METHOD(
double, q)
265 AST_DEF_ACCESS_METHOD(
double, lambda)
283 A_DEF_POD_ITERABLE(
double)
284 AST_DEF_ACCESS_METHOD(
double, p)
285 AST_DEF_ACCESS_METHOD(
double, f)
286 AST_DEF_ACCESS_METHOD(
double, g)
287 AST_DEF_ACCESS_METHOD(
double, h)
288 AST_DEF_ACCESS_METHOD(
double, k)
289 AST_DEF_ACCESS_METHOD(
double, L)
313 A_DEF_POD_ITERABLE(
double)
314 AST_DEF_ACCESS_METHOD(
double,
L)
315 AST_DEF_ACCESS_METHOD(
double, G)
316 AST_DEF_ACCESS_METHOD(
double, H)
317 AST_DEF_ACCESS_METHOD(
double, l)
318 AST_DEF_ACCESS_METHOD(
double,
g)
319 AST_DEF_ACCESS_METHOD(
double,
h)
329AST_CORE_CAPI errc_t
coe2rv(
const double* coe,
double gm,
double* pos,
double* vel);
335AST_CORE_CAPI errc_t
coe2mee(
const double* coe,
double* mee);
342AST_CORE_CAPI
void ee2rv(
const double* ee,
double gm,
double* pos,
double* vel);
349AST_CORE_CAPI
void mee2rv(
const double* mee,
double gm,
double* pos,
double* vel);
357AST_CORE_CAPI errc_t
rv2mee(
const double* pos,
const double* vel,
double gm,
double* mee);
363AST_CORE_CAPI errc_t
mee2coe(
const double* mee,
double* coe);
370AST_CORE_CAPI
void rv2ee(
const double* pos,
const double* vel,
double gm,
double* ee);
378AST_CORE_CAPI errc_t
rv2moe(
const double* pos,
const double* vel,
double gm,
double* moe);
386AST_CORE_CAPI errc_t
rv2coe(
const double* pos,
const double* vel,
double gm,
double* coe);
392AST_CORE_CAPI errc_t
ee2moe(
const double* ee,
double* moe);
398AST_CORE_CAPI errc_t
moe2ee(
const double* moe,
double* ee);
403AST_CORE_CAPI errc_t
moe2coe(
const double* moe,
double* coe);
408AST_CORE_CAPI
void coe2moe(
const double* coe,
double* moe);
415AST_CORE_CAPI errc_t
moe2rv(
const double* moe,
double gm,
double* pos,
double* vel);
420AST_CORE_CAPI
void moe2mee(
const double* moe,
double* mee);
425AST_CORE_CAPI
void coe2ee(
const double* coe,
double* ee);
430AST_CORE_CAPI
void ee2coe(
const double* ee,
double* coe);
435AST_CORE_CAPI
void ee2mee(
const double* ee,
double* mee);
440AST_CORE_CAPI
void mee2ee(
const double* mee,
double* ee);
445AST_CORE_CAPI
void mee2moe(
const double* mee,
double* moe);
452AST_CORE_CAPI errc_t
coe2dela(
const double* coe,
double gm,
double* dela);
458AST_CORE_CAPI errc_t
dela2coe(
const double* dela,
double gm,
double* coe);
638AST_DECL_TYPE_ALIAS(CartState)
直角坐标
定义 OrbitElement.hpp:46
Vector3d vel_
速度
定义 OrbitElement.hpp:49
Vector3d pos_
位置
定义 OrbitElement.hpp:48
const Vector3d & vel() const
获取速度
定义 OrbitElement.hpp:66
static CartState Zero()
获取零状态
定义 OrbitElement.hpp:53
德洛奈根数
定义 OrbitElement.hpp:303
春分点根数
定义 OrbitElement.hpp:246
double lambda_
mean longitude = M + RAAN + argper (平经度)
定义 OrbitElement.hpp:254
double k_
e*cos(argper + RAAN)
定义 OrbitElement.hpp:251
double q_
tan(i/2)*cos(RAAN)
定义 OrbitElement.hpp:253
double meanLongitude() const
平经度
定义 OrbitElement.hpp:257
double a_
semimajor axis length (半长轴)
定义 OrbitElement.hpp:249
double p_
tan(i/2)*sin(RAAN)
定义 OrbitElement.hpp:252
double h_
e*sin(argper + RAAN) omegabar=argper + RAAN
定义 OrbitElement.hpp:250
改进春分点轨道根数, 180度奇异
定义 OrbitElement.hpp:270
double h_
h = tan(i/2)*cos(RAAN)
定义 OrbitElement.hpp:276
double k_
k = tan(i/2)*sin(RAAN)
定义 OrbitElement.hpp:277
double trueLongitude() const
真经度
定义 OrbitElement.hpp:281
double L_
L = RAAN + argper + trueA (真经度)
定义 OrbitElement.hpp:278
double g_
g = e*sin(argper + RAAN)
定义 OrbitElement.hpp:275
double f_
f = e*cos(argper + RAAN)
定义 OrbitElement.hpp:274
double p_
p = a(1-e^2) 半通径
定义 OrbitElement.hpp:273
修正轨道根数
定义 OrbitElement.hpp:136
double rp_
近拱点半径
定义 OrbitElement.hpp:139
double getMeanMotion(double gm) const
计算平均角速度
定义 OrbitElement.hpp:150
double getA() const
计算半长轴
定义 OrbitElement.hpp:217
double getLAN(Axes *inertialAxes, const TimePoint &timeOfAscNodePassage, Axes *bodyFixedAxes) const
计算升交点经度
定义 OrbitElement.hpp:210
double trueA_
真近点角
定义 OrbitElement.hpp:144
double getSMA() const
计算半长轴
定义 OrbitElement.hpp:147
double getMeanLongitude() const
计算平均经度
定义 OrbitElement.hpp:195
double getArgLat() const
计算纬度幅角
定义 OrbitElement.hpp:189
double getLongitudeOfPeri() const
计算近拱点经度
定义 OrbitElement.hpp:192
double getEccAnomaly() const
计算偏近点角
定义 OrbitElement.hpp:186
double getRAAN() const
计算升交点赤经
定义 OrbitElement.hpp:174
double getTimePastAscNode(double gm) const
计算过升交点后经过的时间
定义 OrbitElement.hpp:201
double getPeriAlt(double bodyRadius) const
计算近拱点高度
定义 OrbitElement.hpp:165
double getP() const
计算半通径
定义 OrbitElement.hpp:220
double getPeriod(double gm) const
计算周期
定义 OrbitElement.hpp:153
double e_
偏心率
定义 OrbitElement.hpp:140
double getApoRad() const
计算远拱点半径
定义 OrbitElement.hpp:156
double argper_
近拱点角
定义 OrbitElement.hpp:143
double getTimePastPeri(double gm) const
计算过近地点后经过的时间
定义 OrbitElement.hpp:198
double getMeanAnomaly() const
计算平近点角
定义 OrbitElement.hpp:183
double getPeriRad() const
计算近拱点半径
定义 OrbitElement.hpp:162
double getApoAlt(double bodyRadius) const
计算远拱点高度
定义 OrbitElement.hpp:159
double raan_
升交点赤经
定义 OrbitElement.hpp:142
double getEcc() const
计算偏心率
定义 OrbitElement.hpp:168
double getArgPeri() const
计算近拱点幅角
定义 OrbitElement.hpp:177
double getInc() const
计算轨道倾角
定义 OrbitElement.hpp:171
double i_
轨道倾角
定义 OrbitElement.hpp:141
TimePoint getTimeOfAscNodePassage(const TimePoint &stateEpoch, double gm) const
计算过升交点时刻
定义 OrbitElement.hpp:204
double getTrueAnomaly() const
计算真近点角
定义 OrbitElement.hpp:180
经典轨道根数
定义 OrbitElement.hpp:93
double a_
长半轴
定义 OrbitElement.hpp:96
double argper_
近拱点角
定义 OrbitElement.hpp:100
double trueA_
真近点角
定义 OrbitElement.hpp:101
double raan_
升交点赤经
定义 OrbitElement.hpp:99
double i_
轨道倾角
定义 OrbitElement.hpp:98
double getMeanMotion(double gm) const
计算平均角速度变化率
定义 OrbitElement.hpp:104
double e_
偏心率
定义 OrbitElement.hpp:97
绝对时间点
定义 TimePoint.hpp:108
errc_t aCartToModEquinElem(const Vector3d &pos, const Vector3d &vel, double gm, ModEquinElem &mee)
直角坐标转换为改进春分点轨道根数(类引用版本)
定义 OrbitElement.cpp:1036
errc_t moe2rv(const double *moe, double gm, double *pos, double *vel)
修正轨道根数转换为直角坐标
定义 OrbitElement.cpp:680
double aPeriRadToApoRad(double perigeeRad, double eccentricity)
近地点半径转换为远地点半径
定义 OrbitParam.cpp:316
double aPeriRadToMeanMotion(double perigeeRad, double eccentricity, double gm)
近地点半径转换为平均角速度
定义 OrbitParam.cpp:321
void mee2ee(const double *mee, double *ee)
改进春分点轨道根数转换为春分点根数
定义 OrbitElement.cpp:857
double aRAANToLAN(double raan, Axes *inertialAxes, const TimePoint &timeOfAscNodePassage, Axes *bodyFixedAxes)
升交点赤经转换为升交点经度
定义 OrbitParam.cpp:502
errc_t aModOrbToEquinElem(const ModOrbElem &modOrb, EquinElem &equinElem)
修正轨道根数转换为春分点根数(类引用版本)
定义 OrbitElement.cpp:1098
errc_t mee2coe(const double *mee, double *coe)
改进春分点轨道根数转换为经典轨道根数
定义 OrbitElement.cpp:267
void rv2ee(const double *pos, const double *vel, double gm, double *ee)
直角坐标转换为春分点根数
定义 OrbitElement.cpp:329
void coe2moe(const double *coe_, double *moe_)
经典轨道根数转换为修正轨道根数
定义 OrbitElement.cpp:669
double aSMAToMeanMotion(double semiMajorAxis, double gm)
长半轴转换为平均角速度
定义 OrbitParam.cpp:384
errc_t coe2rv(const double *coe, double gm, double *pos, double *vel)
经典轨道根数转换为直角坐标
定义 OrbitElement.cpp:69
errc_t ee2moe(const double *ee, double *moe)
春分点根数转换为修正轨道根数
定义 OrbitElement.cpp:545
errc_t moe2ee(const double *moe, double *ee)
修正轨道根数转换为春分点根数
定义 OrbitElement.cpp:622
double aTrueToMean(double trueAnomaly, double eccentricity)
真近点角转换为平近点角
定义 OrbitParam.cpp:484
errc_t rv2moe(const double *pos, const double *vel, double gm, double *moe)
直角坐标转换为修正轨道根数
定义 OrbitElement.cpp:397
void aModEquinElemToCart(const ModEquinElem &mee, double gm, Vector3d &pos, Vector3d &vel)
改进春分点轨道根数转换为直角坐标(类引用版本)
定义 OrbitElement.cpp:1024
errc_t coe2mee(const double *coe, double *mee)
经典轨道根数转换为改进春分点轨道根数
定义 OrbitElement.cpp:104
errc_t aDelaunayToOrbElem(const DelaunayElem &delaunay, double gm, OrbElem &elem)
修正轨道根数转换为经典轨道根数(类引用版本)
定义 OrbitElement.cpp:1153
A_ALWAYS_INLINE double aArgPeriToLongPeri(double argPeri, double raan)
近地点幅角转换为近地点经度
定义 OrbitParam.hpp:593
errc_t moe2coe(const double *moe_, double *coe_)
修正轨道根数转换为经典轨道根数
定义 OrbitElement.cpp:656
double aTrueToTimePastAscNode(double trueAnomaly, double argPeri, double semiMajorAxis, double eccentricity, double gm)
真近点角转换为过升交点后时间
定义 OrbitParam.cpp:489
errc_t aOrbElemToDelaunay(const OrbElem &elem, double gm, DelaunayElem &delaunay)
经典轨道根数转换为修正轨道根数(类引用版本)
定义 OrbitElement.cpp:1148
void ee2rv(const double *ee, double gm, double *pos, double *vel)
春分点根数转换为直角坐标
定义 OrbitElement.cpp:127
void mee2rv(const double *mee, double gm, double *pos, double *vel)
改进春分点轨道根数转换为直角坐标
定义 OrbitElement.cpp:181
errc_t rv2coe(const double *pos, const double *vel, double gm, double *coe)
直角坐标转换为经典轨道根数
定义 OrbitElement.cpp:461
void aCartToEquinElem(const Vector3d &pos, const Vector3d &vel, double gm, EquinElem &equinElem)
直角坐标转换为春分点根数(类引用版本)
定义 OrbitElement.cpp:1129
void aEquinElemToCart(const EquinElem &equinElem, double gm, Vector3d &pos, Vector3d &vel)
春分点根数转换为直角坐标(类引用版本)
定义 OrbitElement.cpp:1139
void ee2mee(const double *ee, double *mee)
春分点根数转换为改进春分点轨道根数
定义 OrbitElement.cpp:821
errc_t aCartToModOrbElem(const Vector3d &pos, const Vector3d &vel, double gm, ModOrbElem &modOrb)
直角坐标转换为修正轨道根数(类引用版本)
定义 OrbitElement.cpp:1066
errc_t aModEquinElemToOrbElem(const ModEquinElem &mee, OrbElem &elem)
改进春分点轨道根数转换为经典轨道根数(类引用版本)
定义 OrbitElement.cpp:1057
void mee2moe(const double *mee, double *moe)
改进春分点轨道根数转换为修正轨道根数
定义 OrbitElement.cpp:876
errc_t aOrbElemToModEquinElem(const OrbElem &elem, ModEquinElem &mee)
经典轨道根数转换为改进春分点轨道根数(类引用版本)
定义 OrbitElement.cpp:1048
double aTrueToEcc(double f, double e)
真近点角转换为偏近点角
定义 OrbitParam.cpp:457
double aTrueToArgLat(double trueAnomaly, double argPeri)
真近点角转换为纬度幅角
定义 OrbitParam.hpp:653
errc_t aOrbElemToCart(const OrbElem &elem, double gm, Vector3d &pos, Vector3d &vel)
经典轨道根数转换为直角坐标(类引用版本)
定义 OrbitElement.cpp:1118
errc_t aEquinElemToModOrb(const EquinElem &equinElem, ModOrbElem &modOrb)
春分点根数转换为修正轨道根数(类引用版本)
定义 OrbitElement.cpp:1089
errc_t rv2mee(const double *pos_, const double *vel_, double gm, double *mee)
直角坐标转换为改进春分点轨道根数
定义 OrbitElement.cpp:204
errc_t aModOrbElemToCart(const ModOrbElem &modOrb, double gm, Vector3d &pos, Vector3d &vel)
修正轨道根数转换为直角坐标(类引用版本)
定义 OrbitElement.cpp:1107
void coe2ee(const double *coe, double *ee)
经典轨道根数转换为春分点根数
定义 OrbitElement.cpp:730
errc_t aCartToOrbElem(const Vector3d &pos, const Vector3d &vel, double gm, OrbElem &elem)
直角坐标转换为经典轨道根数(类引用版本)
定义 OrbitElement.cpp:1077
void ee2coe(const double *ee, double *coe)
春分点根数转换为经典轨道根数
定义 OrbitElement.cpp:748
double aTrueToTimePastPeri(double trueAnomaly, double semiMajorAxis, double eccentricity, double gm)
真近点角转换为过近心点后时间
定义 OrbitParam.cpp:494
errc_t coe2dela(const double *coeIn, double gm, double *delaOut)
经典轨道根数转换为德洛奈根数
定义 OrbitElement.cpp:931
void moe2mee(const double *moe, double *mee)
修正轨道根数转换为改进春分点轨道根数
定义 OrbitElement.cpp:713
double aPeriRadToApoAlt(double perigeeRad, double eccentricity, double bodyRadius)
近地点半径转换为远地点高度
定义 OrbitParam.cpp:312
errc_t dela2coe(const double *delaIn, double gm, double *coeOut)
德洛奈根数转换为经典轨道根数
定义 OrbitElement.cpp:985
constexpr double kTwoPI
2*PI
定义 Constants.h:54