24#include "AstCore/Object.hpp"
25#include "AstCore/GravityField.hpp"
26#include "AstCore/JplDe.hpp"
27#include "AstCore/BodyEphemeris.hpp"
28#include "AstCore/BodyOrientation.hpp"
29#include "AstCore/AxesBodyInertial.hpp"
30#include "AstCore/AxesBodyFixed.hpp"
31#include "AstCore/AxesBodyMOD.hpp"
32#include "AstCore/AxesBodyTOD.hpp"
33#include "AstCore/Point.hpp"
34#include "AstCore/Frame.hpp"
35#include "AstCore/AxesAPI.hpp"
36#include "AstCore/BodyShape.hpp"
37#include "AstUtil/SharedPtr.hpp"
38#include "AstUtil/ScopedPtr.hpp"
48using Body = CelestialBody;
67AST_CORE_CAPI errc_t aGetGravityParameter(
const Body& body, StringView gravityModel,
double& gm);
77 AST_PROPERT(Orientation)
87 void setJplSpiceId(
int id) { jplSpiceId_ = id; }
91 void setJplIndex(
int index);
94 std::string getDirpath()
const;
115 double getGM()
const {
return gm_; }
127 double getJ2()
const {
return getJn(2); }
130 double getJ3()
const {
return getJn(3); }
133 double getJ4()
const {
return getJn(4); }
136 double getJ5()
const {
return getJn(5); }
139 double getJ6()
const {
return getJn(6); }
151 errc_t getPosICRF(
const TimePoint& tp, Vector3d& pos)
const;
159 errc_t getPosVelICRF(
const TimePoint& tp, Vector3d& pos, Vector3d& vel)
const;
164 errc_t getPos(const
TimePoint& tp, Vector3d& pos) const final;
165 errc_t getPosVel(const
TimePoint& tp, Vector3d& pos, Vector3d& vel) const final;
170 BodyShape* getShape()
const {
return shape_.get(); }
171 BodyShape* shape()
const {
return shape_.get(); }
181 BodyEphemeris* getEphemeris(EEphemerisSource ephemerisSource)
const;
185 const GravityField& gravityField()
const {
return gravityField_; }
195 Axes* axesInertial()
const {
return axesInertial_.get(); }
199 Axes* axesFixed()
const {
return axesFixed_.get(); }
203 Axes* axesMOD()
const {
return axesMOD_.get(); }
207 Axes* axesTOD()
const {
return axesTOD_.get(); }
213 Axes* getAxes(StringView name)
const;
276 HFrame makeFrameInertial()
const;
279 HFrame makeFrameFixed()
const;
282 HFrame makeFrameMOD()
const;
285 HFrame makeFrameTOD()
const;
288 HFrame makeFrameJ2000()
const;
291 HFrame makeFrameICRF()
const;
294 Frame* getFrameInertial()
const;
295 Frame* frameInertial()
const {
return getFrameInertial();}
298 Frame* getFrameFixed()
const;
299 Frame* frameFixed()
const {
return getFrameFixed();}
301 Frame* getFrameICRF()
const;
303 Frame* getFrameJ2000()
const;
308 Axes* getEpochAxesReference()
const;
311 double getJn(
int n)
const {
return gravityField_.getJn(n); }
319 errc_t loadAstroDefinition(
BKVParser& parser);
325 errc_t loadEphemerisData(
BKVParser& parser);
334 errc_t loadMeanEarthDefinition(
BKVParser& parser);
339 SharedPtr<CelestialBody> parent_{};
341 double systemGM_{0.0};
345 GravityField gravityField_{};
346 SharedPtr<BodyShape> shape_{};
347 SharedPtr<BodyOrientation> orientation_{};
348 SharedPtr<BodyEphemeris> ephemeris_{};
350 SharedPtr<AxesBodyInertial> axesInertial_{};
351 SharedPtr<AxesBodyFixed> axesFixed_{};
352 SharedPtr<AxesBodyMOD> axesMOD_{};
353 SharedPtr<AxesBodyTOD> axesTOD_{};
355 mutable WeakPtr<Frame> frameInertial_{};
356 mutable WeakPtr<Frame> frameFixed_{};
358 mutable SharedPtr<BodyEphemeris> ephemerisDE_{};
359 mutable SharedPtr<BodyEphemeris> ephemerisSpice_{};
360 mutable SharedPtr<BodyEphemeris> ephemerisSpiceBarycenter_{};
键值对解析器(BlockKeyValueParser)
定义 BKVParser.hpp:45
天体星历接口
定义 BodyEphemeris.hpp:38
天体姿态/指向
定义 BodyOrientation.hpp:39
天体形状基类
定义 BodyShape.hpp:33
天体
定义 CelestialBody.hpp:72
int getJplIndex() const
获取JPL索引
定义 CelestialBody.hpp:90
double getJ3() const
获取J3项
定义 CelestialBody.hpp:130
HAxes makeEpochAxes(Axes *sourceAxes, const TimePoint &tp, Axes *reference) const
创建新的历元轴系
定义 CelestialBody.hpp:222
double getJn(int n) const
获取Jn项
定义 CelestialBody.hpp:311
const std::string & getGravityModel() const
获取重力模型名称
定义 CelestialBody.hpp:104
double getJ4() const
获取J4项
定义 CelestialBody.hpp:133
BodyEphemeris * getEphemeris() const
获取天体星历
定义 CelestialBody.hpp:174
CelestialBody * getParent() const
获取父天体
定义 CelestialBody.hpp:100
double getJ2() const
获取J2项
定义 CelestialBody.hpp:127
Axes * getAxesTOD() const
获取天体TOD轴系
定义 CelestialBody.hpp:206
double getGM() const
获取天体的引力常数
定义 CelestialBody.hpp:115
HAxes makeEpochAxes(Axes *sourceAxes, EventTime *time, Axes *reference) const
创建新的历元轴系
定义 CelestialBody.hpp:229
Axes * getAxesMOD() const
获取天体MOD轴系
定义 CelestialBody.hpp:202
Point * getPointCenter() const
获取天体中心
定义 CelestialBody.hpp:190
Axes * getAxesFixed() const
获取天体固定轴系
定义 CelestialBody.hpp:198
double getSystemGM() const
获取天体系引力常数(考虑天体的卫星)
定义 CelestialBody.hpp:118
double getRadius() const
获取天体半径
定义 CelestialBody.hpp:112
double getGravityRefDistance() const
获取重力场参考半径
定义 CelestialBody.hpp:124
bool isEarth() const
是否为地球
定义 CelestialBody.hpp:142
BodyOrientation * getOrientation() const
获取天体姿态
定义 CelestialBody.hpp:178
const GravityField & getGravityField() const
获取天体重力场
定义 CelestialBody.hpp:184
double getJ6() const
获取J6项
定义 CelestialBody.hpp:139
Axes * getAxesInertial() const
获取天体惯性轴系
定义 CelestialBody.hpp:194
int getJplSpiceId() const
获取JPL SPICE ID
定义 CelestialBody.hpp:86
bool isLuna() const
是否为月球
定义 CelestialBody.hpp:145
double getJ5() const
获取J5项
定义 CelestialBody.hpp:136
重力场系数
定义 GravityField.hpp:91
@ eEarth
地球
定义 JplDe.hpp:51
static Object * Resolve(StringView value)
解析字符串
定义 Object.cpp:39
virtual Frame * getFrame() const =0
获取点所在的参考坐标系
绝对时间点
定义 TimePoint.hpp:108
ESpiceId
SPICE 天体ID
定义 CelestialBody.hpp:417
ESpiceId aGetPlanetBarycenterId(ESpiceId planetId)
获取行星系质心ID
定义 CelestialBody.cpp:551
errc_t aBodyOrbitNormalIn(Axes &axes, const Body &body, const TimePoint &tp, Vector3d &normal)
获取天体绕其父天体的轨道法向
定义 CelestialBody.cpp:518
EEphemerisSource
星历来源
定义 CelestialBody.hpp:53
errc_t aBodyOrbitNormalInParentInertial(const Body &body, const TimePoint &tp, Vector3d &normal)
获取天体绕其父天体的轨道法向
定义 CelestialBody.cpp:536
errc_t aBodyOrbitNormalInICRF(const Body &body, const TimePoint &tp, Vector3d &normal)
获取天体绕其父天体的轨道法向
定义 CelestialBody.cpp:546
@ eJupiter
木星
定义 CelestialBody.hpp:443
@ eVenus
金星
定义 CelestialBody.hpp:433
@ ePlutoBarycenter
冥王星系质心
定义 CelestialBody.hpp:427
@ eVenusBarycenter
金星系质心
定义 CelestialBody.hpp:420
@ eMoon
月球
定义 CelestialBody.hpp:436
@ eUranus
天王星
定义 CelestialBody.hpp:488
@ eMercury
水星
定义 CelestialBody.hpp:431
@ eEarthBarycenter
地月系质心
定义 CelestialBody.hpp:421
@ eSaturnBarycenter
土星系质心
定义 CelestialBody.hpp:424
@ eNeptune
海王星
定义 CelestialBody.hpp:506
@ eJupiterBarycenter
木星系质心
定义 CelestialBody.hpp:423
@ eSaturn
土星
定义 CelestialBody.hpp:461
@ eEarth
地球
定义 CelestialBody.hpp:435
@ eMarsBarycenter
火星系质心
定义 CelestialBody.hpp:422
@ eSun
太阳
定义 CelestialBody.hpp:429
@ eMars
火星
定义 CelestialBody.hpp:438
@ ePluto
冥王星
定义 CelestialBody.hpp:516
@ eSolarSystemBarycenter
太阳系质心
定义 CelestialBody.hpp:418
@ eNeptuneBarycenter
海王星系质心
定义 CelestialBody.hpp:426
@ eMercuryBarycenter
水星系质心
定义 CelestialBody.hpp:419
@ eUranusBarycenter
天王星系质心
定义 CelestialBody.hpp:425
@ eJplSpiceBarycenter
JPL SPICE 行星系质心星历
HAxes aMakeEpochAxes(Axes *sourceAxes, const TimePoint &tp, Axes *referenceAxes)
创建一个历元轴系
定义 AxesAPI.cpp:27