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;
61 const std::string&
getName()
const override {
return name_; }
62 void setName(
StringView name) { name_ = std::string(name); }
66 void setJplSpiceId(
int id) { jplSpiceId_ = id; }
70 void setJplIndex(
int index);
73 std::string getDirpath()
const;
83 const std::string&
getGravityModel()
const{
return gravityField_.getModelName(); }
94 double getGM()
const {
return gm_; }
103 double getJ2()
const {
return getJn(2); }
106 double getJ3()
const {
return getJn(3); }
109 double getJ4()
const {
return getJn(4); }
112 double getJ5()
const {
return getJn(5); }
115 double getJ6()
const {
return getJn(6); }
124 errc_t getPosICRF(
const TimePoint& tp, Vector3d& pos)
const;
132 errc_t getPosVelICRF(
const TimePoint& tp, Vector3d& pos, Vector3d& vel)
const;
137 errc_t getPos(const
TimePoint& tp, Vector3d& pos) const final;
138 errc_t getPosVel(const
TimePoint& tp, Vector3d& pos, Vector3d& vel) const final;
143 BodyShape* getShape()
const {
return shape_.get(); }
237 HFrame makeFrameInertial()
const;
240 HFrame makeFrameFixed()
const;
243 HFrame makeFrameMOD()
const;
246 HFrame makeFrameTOD()
const;
249 HFrame makeFrameJ2000()
const;
252 HFrame makeFrameICRF()
const;
255 Axes* getEpochAxesReference()
const;
258 double getJn(
int n)
const {
return gravityField_.getJn(n); }
266 errc_t loadAstroDefinition(
BKVParser& parser);
272 errc_t loadEphemerisData(
BKVParser& parser);
281 errc_t loadMeanEarthDefinition(
BKVParser& parser);
289 double systemGM_{0.0};
315 eSolarSystemBarycenter = 0,
316 eMercuryBarycenter = 1,
317 eVenusBarycenter = 2,
318 eEarthBarycenter = 3,
320 eJupiterBarycenter = 5,
321 eSaturnBarycenter = 6,
322 eUranusBarycenter = 7,
323 eNeptuneBarycenter = 8,
324 ePlutoBarycenter = 9,
键值对解析器(BlockKeyValueParser)
定义 BKVParser.hpp:45
天体星历接口
定义 BodyEphemeris.hpp:38
天体姿态/指向
定义 BodyOrientation.hpp:38
天体形状基类
定义 BodyShape.hpp:30
天体
定义 CelestialBody.hpp:52
GravityField gravityField_
重力场
定义 CelestialBody.hpp:293
int getJplIndex() const
获取JPL索引
定义 CelestialBody.hpp:69
double getJ3() const
获取J3项
定义 CelestialBody.hpp:106
SharedPtr< AxesBodyMOD > axesMOD_
天体MOD轴
定义 CelestialBody.hpp:300
HAxes makeEpochAxes(Axes *sourceAxes, const TimePoint &tp, Axes *reference) const
创建新的历元轴系
定义 CelestialBody.hpp:183
double getJn(int n) const
获取Jn项
定义 CelestialBody.hpp:258
const std::string & getGravityModel() const
获取重力模型名称
定义 CelestialBody.hpp:83
SharedPtr< AxesBodyTOD > axesTOD_
天体TOD轴
定义 CelestialBody.hpp:301
SharedPtr< AxesBodyFixed > axesFixed_
天体固定轴
定义 CelestialBody.hpp:299
double getJ4() const
获取J4项
定义 CelestialBody.hpp:109
BodyEphemeris * getEphemeris() const
获取天体星历
定义 CelestialBody.hpp:149
ScopedPtr< BodyOrientation > orientation_
天体姿态
定义 CelestialBody.hpp:295
CelestialBody * getParent() const
获取父天体
定义 CelestialBody.hpp:79
double getJ2() const
获取J2项
定义 CelestialBody.hpp:103
Axes * getAxesTOD() const
获取天体TOD轴系
定义 CelestialBody.hpp:169
double getGM() const
获取引力常数
定义 CelestialBody.hpp:94
HAxes makeEpochAxes(Axes *sourceAxes, EventTime *time, Axes *reference) const
创建新的历元轴系
定义 CelestialBody.hpp:190
Axes * getAxesMOD() const
获取天体MOD轴系
定义 CelestialBody.hpp:166
Point * getPointCenter() const
获取天体中心
定义 CelestialBody.hpp:157
Axes * getAxesFixed() const
获取天体固定轴系
定义 CelestialBody.hpp:163
double getSystemGM() const
获取系统引力常数
定义 CelestialBody.hpp:97
ScopedPtr< BodyShape > shape_
天体形状
定义 CelestialBody.hpp:294
double getRadius() const
获取天体半径
定义 CelestialBody.hpp:91
WeakPtr< SolarSystem > solarSystem_
太阳系指针
定义 CelestialBody.hpp:285
std::string name_
天体名称
定义 CelestialBody.hpp:287
SharedPtr< AxesBodyInertial > axesInertial_
天体惯性轴
定义 CelestialBody.hpp:298
bool isEarth() const
是否为地球
定义 CelestialBody.hpp:118
BodyOrientation * getOrientation() const
获取天体姿态
定义 CelestialBody.hpp:152
const std::string & getName() const override
获取天体名称
定义 CelestialBody.hpp:61
const GravityField & getGravityField() const
获取天体重力场
定义 CelestialBody.hpp:146
double getJ6() const
获取J6项
定义 CelestialBody.hpp:115
Axes * getAxesInertial() const
获取天体惯性轴系
定义 CelestialBody.hpp:160
SharedPtr< CelestialBody > parent_
父天体
定义 CelestialBody.hpp:286
ScopedPtr< BodyEphemeris > ephemeris_
天体星历
定义 CelestialBody.hpp:296
int getJplSpiceId() const
获取JPL SPICE ID
定义 CelestialBody.hpp:65
double getJ5() const
获取J5项
定义 CelestialBody.hpp:112
重力场系数
定义 GravityField.hpp:63
@ eEarth
地球
定义 JplDe.hpp:48
virtual Frame * getFrame() const =0
获取点所在的参考坐标系
绝对时间点
定义 TimePoint.hpp:106
ESpiceId
SPICE 天体ID
定义 CelestialBody.hpp:314
HAxes aMakeEpochAxes(Axes *sourceAxes, const TimePoint &tp, Axes *referenceAxes)
创建一个历元轴系
定义 AxesAPI.cpp:27