🛰️航天仿真算法库 SpaceAST 0.0.1
载入中...
搜索中...
未找到
BaseOrbitDesigner.hpp
浏览该文件的文档.
1
20
21#pragma once
22
23#include "AstGlobal.h"
24#include "AstCore/OrbitElement.hpp"
25#include "AstCore/Frame.hpp"
26#include "AstCore/CelestialBody.hpp"
27#include "AstCore/TimePoint.hpp"
28#include "AstUtil/SharedPtr.hpp"
29
30
31AST_NAMESPACE_BEGIN
32
39class AST_CORE_API IOrbitDesigner
40{
41public:
42 IOrbitDesigner() = default;
43 ~IOrbitDesigner() = default;
44
45 virtual errc_t getOrbitEpoch(TimePoint& orbitEpoch) const = 0;
46
50 virtual errc_t getOrbitState(ModOrbElem &orbElem) const = 0;
51
56 virtual errc_t getCoordFrame(bool& useCoordEpoch, TimePoint& coordEpoch, SharedPtr<Frame>& coordFrame) const = 0;
57};
58
59
61class AST_CORE_API BaseOrbitDesigner: public IOrbitDesigner
62{
63public:
66 ~BaseOrbitDesigner() = default;
67
68 using IOrbitDesigner::getOrbitState;
69
70 static CelestialBody* getDefaultCelestialBody();
71
73 CelestialBody* getCelestialBody() const { return celestialBody_.get(); }
74
76 double getGM() const { return celestialBody_?celestialBody_->getGM(): 0; }
77
79 double getJ2() const {return celestialBody_?celestialBody_->getJ2():0; }
80
82 double getBodyRadius() const { return celestialBody_?celestialBody_->getRadius():0; }
83
85 errc_t getOrbitEpoch(TimePoint& orbitEpoch) const final{ orbitEpoch = orbitEpoch_; return 0; };
86
89 errc_t getOrbitState(CartState &cartState) const;
90
93 errc_t getOrbitState(OrbElem &orbElem) const;
94
95 errc_t getCoordFrame(bool& useCoordEpoch, TimePoint& coordEpoch, SharedPtr<Frame>& coordFrame) const override;
96protected:
98 TimePoint orbitEpoch_{};
99};
100
101
104AST_NAMESPACE_END
轨道设计器基类
定义 BaseOrbitDesigner.hpp:62
double getJ2() const
获取J2项
定义 BaseOrbitDesigner.hpp:79
CelestialBody * getCelestialBody() const
获取天体
定义 BaseOrbitDesigner.hpp:73
errc_t getOrbitEpoch(TimePoint &orbitEpoch) const final
获取轨道历元
定义 BaseOrbitDesigner.hpp:85
double getBodyRadius() const
获取天体半径
定义 BaseOrbitDesigner.hpp:82
SharedPtr< CelestialBody > celestialBody_
天体
定义 BaseOrbitDesigner.hpp:97
double getGM() const
获取引力参数
定义 BaseOrbitDesigner.hpp:76
直角坐标
定义 OrbitElement.hpp:46
天体
定义 CelestialBody.hpp:52
轨道设计器接口
定义 BaseOrbitDesigner.hpp:40
virtual errc_t getOrbitState(ModOrbElem &orbElem) const =0
获取轨道状态
virtual errc_t getCoordFrame(bool &useCoordEpoch, TimePoint &coordEpoch, SharedPtr< Frame > &coordFrame) const =0
获取坐标系定义
修正轨道根数
定义 OrbitElement.hpp:127
经典轨道根数
定义 OrbitElement.hpp:85
共享指针
定义 SharedPtr.hpp:33
绝对时间点
定义 TimePoint.hpp:106