🛰️航天仿真算法库 SpaceAST 0.0.1
载入中...
搜索中...
未找到
ast::CelestialBody类 参考

#include <CelestialBody.hpp>

+ 类 ast::CelestialBody 继承关系图:

Public 成员函数

 CelestialBody (SolarSystem *solarSystem)
 
 CelestialBody (StringView name, SolarSystem *solarSystem=nullptr)
 
const std::string & getName () const override
 
void setName (StringView name)
 
int getJplSpiceId () const
 
void setJplSpiceId (int id)
 
int getJplIndex () const
 
void setJplIndex (int index)
 
std::string getDirpath () const
 
SolarSystemgetSolarSystem () const
 
CelestialBodygetParent () const
 
const std::string & getGravityModel () const
 
errc_t load (StringView filepath)
 
double getRadius () const
 
double getGM () const
 
double getSystemGM () const
 
errc_t setGravityModel (StringView model)
 
double getJ2 () const
 
double getJ3 () const
 
double getJ4 () const
 
double getJ5 () const
 
double getJ6 () const
 
bool isEarth () const
 
errc_t getPosICRF (const TimePoint &tp, Vector3d &pos) const
 
errc_t getPosVelICRF (const TimePoint &tp, Vector3d &pos, Vector3d &vel) const
 
FramegetFrame () const final
 
errc_t getPos (const TimePoint &tp, Vector3d &pos) const final
 
errc_t getPosVel (const TimePoint &tp, Vector3d &pos, Vector3d &vel) const final
 
const GravityFieldgetGravityField () const
 
BodyEphemerisgetEphemeris () const
 
BodyOrientationgetOrientation () const
 
PointgetPointCenter () const
 
AxesgetAxesInertial () const
 
AxesgetAxesFixed () const
 
AxesgetAxesMOD () const
 
AxesgetAxesTOD () const
 
AxesgetAxes (StringView name) const
 
HAxes makeEpochAxes (Axes *sourceAxes, const TimePoint &tp, Axes *reference) const
 
HAxes makeEpochAxes (Axes *sourceAxes, EventTime *time, Axes *reference) const
 
HFrame makeEpochFrame (Axes *sourceAxes, const TimePoint &tp, Axes *reference) const
 
HFrame makeEpochFrame (Axes *sourceAxes, EventTime *time, Axes *reference) const
 
HAxes makeAxesMOE (const TimePoint &tp) const
 
HAxes makeAxesMOE (EventTime *time) const
 
HAxes makeAxesTOE (const TimePoint &tp) const
 
HAxes makeAxesTOE (EventTime *time) const
 
HFrame makeFrameMOE (const TimePoint &tp) const
 
HFrame makeFrameMOE (EventTime *time) const
 
HFrame makeFrameTOE (const TimePoint &tp) const
 
HFrame makeFrameTOE (EventTime *time) const
 
HFrame makeFrame (Axes *axes) const
 
HFrame makeFrameInertial () const
 
HFrame makeFrameFixed () const
 
HFrame makeFrameMOD () const
 
HFrame makeFrameTOD () const
 
HFrame makeFrameJ2000 () const
 
HFrame makeFrameICRF () const
 
- Public 成员函数 继承自 ast::Point
CelestialBodytoBody () const
 
errc_t getPosIn (Frame *frame, const TimePoint &tp, Vector3d &pos) const
 
errc_t getPosVelIn (Frame *frame, const TimePoint &tp, Vector3d &pos, Vector3d &vel) const
 
- Public 成员函数 继承自 ast::Object
 Object (Object *parentScope)
 
 Object (std::nullptr_t)
 
virtual ClassgetType () const
 
errc_t openEditDialog ()
 
Attribute attr (StringView path)
 
errc_t getAttrBool (StringView path, bool &value) const
 
errc_t getAttrInt (StringView path, int &value) const
 
errc_t getAttrDouble (StringView path, double &value) const
 
errc_t getAttrString (StringView path, std::string &value) const
 
double getAttrDouble (StringView path) const
 
int getAttrInt (StringView path) const
 
bool getAttrBool (StringView path) const
 
std::string getAttrString (StringView path) const
 
errc_t setAttrBool (StringView path, bool value)
 
errc_t setAttrInt (StringView path, int value)
 
errc_t setAttrDouble (StringView path, double value)
 
errc_t setAttrString (StringView path, StringView value)
 
Classtype () const
 
PropertygetProperty (StringView fieldName) const
 
uint32_t getID () const
 
errc_t setParentScope (Object *parentScope)
 
ObjectgetParentScope () const
 
uint32_t refCount () const
 
uint32_t weakRefCount () const
 
bool isDestructed () const
 
void destruct ()
 
uint32_t incWeakRef ()
 
uint32_t decWeakRef ()
 
uint32_t incRef ()
 
uint32_t decRef ()
 
uint32_t decRefNoDelete ()
 

Public 属性

AST_PROPERTIES : BodyShape* getShape() const { return shape_.get()
 

Protected 成员函数

AxesgetEpochAxesReference () const
 
double getJn (int n) const
 
errc_t loadGravityModel (StringView model)
 
errc_t loadAstroDefinition (BKVParser &parser)
 
errc_t loadSpinData (BKVParser &parser)
 
errc_t loadEphemerisData (BKVParser &parser)
 
errc_t loadEarth (BKVParser &parser)
 
errc_t loadMoon (BKVParser &parser)
 
errc_t loadMeanEarthDefinition (BKVParser &parser)
 
- Protected 成员函数 继承自 ast::Object
 Object (const Object &obj)
 
Objectoperator= (const Object &obj)
 

Protected 属性

WeakPtr< SolarSystemsolarSystem_
 
SharedPtr< CelestialBodyparent_
 
std::string name_
 
double gm_ {0.0}
 
double systemGM_ {0.0}
 
double radius_ {0.0}
 
int jplSpiceId_ {-1}
 
int jplIndex_ {-1}
 
GravityField gravityField_
 
ScopedPtr< BodyShapeshape_
 
ScopedPtr< BodyOrientationorientation_
 
ScopedPtr< BodyEphemerisephemeris_
 
SharedPtr< AxesBodyInertialaxesInertial_
 
SharedPtr< AxesBodyFixedaxesFixed_
 
SharedPtr< AxesBodyMODaxesMOD_
 
SharedPtr< AxesBodyTODaxesTOD_
 

友元

class SolarSystem
 

额外继承的成员函数

- 静态 Public 成员函数 继承自 ast::Object
static ClassgetStaticType ()
 
- 静态 Public 属性 继承自 ast::Object
static Class staticType
 

详细描述

天体

成员函数说明

◆ getAxes()

Axes * ast::CelestialBody::getAxes ( StringView name) const

获取天体轴系

参数
name- 轴系名称,例如Inertial、Fixed、MOD、TOD等
返回值
-轴系指针
注解
- 如果轴系不存在,则返回nullptr
待办事项
这里考虑使用哈希表来存储映射关系

◆ getFrame()

Frame * ast::CelestialBody::getFrame ( ) const
finalvirtual

获取点所在的参考坐标系

返回
点所在的参考坐标系指针

实现了 ast::Point.

◆ getName()

const std::string & ast::CelestialBody::getName ( ) const
inlineoverridevirtual

获取天体名称

重载 ast::Object .

◆ getPos()

errc_t ast::CelestialBody::getPos ( const TimePoint & tp,
Vector3d & pos ) const
finalvirtual

获取点在指定时间点的位置,相对于点的参考坐标系

参数
tp时间点
pos输出参数,点的位置向量
返回
错误码

实现了 ast::Point.

◆ getPosICRF()

errc_t ast::CelestialBody::getPosICRF ( const TimePoint & tp,
Vector3d & pos ) const

获取天体位置(ICRF)

参数
tp- 时间点
pos- 输出位置(ICRF)
返回值
-错误码

◆ getPosVel()

errc_t ast::CelestialBody::getPosVel ( const TimePoint & tp,
Vector3d & pos,
Vector3d & vel ) const
finalvirtual

获取点在指定时间点的位置和速度,相对于点的参考坐标系

参数
tp时间点
pos输出参数,点的位置向量
vel输出参数,点的速度向量
返回
错误码

实现了 ast::Point.

◆ getPosVelICRF()

errc_t ast::CelestialBody::getPosVelICRF ( const TimePoint & tp,
Vector3d & pos,
Vector3d & vel ) const

获取天体位置和速度(ICRF)

参数
tp- 时间点
pos- 输出位置(ICRF)
vel- 输出速度(ICRF)
返回值
-错误码

◆ load()

errc_t ast::CelestialBody::load ( StringView filepath)

从文件加载天体数据

参数
filepath- 天体数据文件路径
返回值
-错误码

◆ loadAstroDefinition()

errc_t ast::CelestialBody::loadAstroDefinition ( BKVParser & parser)
protected

加载相关的天文参数

Bug
如果model 被恶意写成 ../../../../etc/passwd, 拼接后就成了 /home/user/project/configs/../../../../etc/passwd, 经过路径解析后可能指向 /etc/passwd,从而读取系统关键文件。

◆ makeEpochAxes() [1/2]

HAxes ast::CelestialBody::makeEpochAxes ( Axes * sourceAxes,
const TimePoint & tp,
Axes * reference ) const
inline

创建新的历元轴系

参数
sourceAxes- 源轴系
tp- 时间点
reference- 参考轴系
返回值
-新的历元轴系

◆ makeEpochAxes() [2/2]

HAxes ast::CelestialBody::makeEpochAxes ( Axes * sourceAxes,
EventTime * time,
Axes * reference ) const
inline

创建新的历元轴系

参数
sourceAxes- 源轴系
time- 时间点
reference- 参考轴系
返回值
-新的历元轴系

◆ makeEpochFrame() [1/2]

HFrame ast::CelestialBody::makeEpochFrame ( Axes * sourceAxes,
const TimePoint & tp,
Axes * reference ) const

创建新的历元坐标系

参数
sourceAxes- 源轴系
tp- 时间点
reference- 参考轴系
返回值
-新的历元坐标系

◆ makeEpochFrame() [2/2]

HFrame ast::CelestialBody::makeEpochFrame ( Axes * sourceAxes,
EventTime * time,
Axes * reference ) const

创建新的历元坐标系

参数
sourceAxes- 源轴系
time- 时间点
reference- 参考轴系
返回值
-新的历元坐标系

◆ makeFrame()

HFrame ast::CelestialBody::makeFrame ( Axes * axes) const

创建新的天体坐标系

参数
axes- 轴系

该类的文档由以下文件生成: