🛰️航天仿真算法库 SpaceAST 0.0.1
载入中...
搜索中...
未找到
StateKeplerian.hpp
浏览该文件的文档.
1
20
21#pragma once
22
23#include "AstGlobal.h"
24#include "AstCore/State.hpp"
25#include "AstCore/OrbitElement.hpp"
26#include "AstCore/TimePoint.hpp"
27
28AST_NAMESPACE_BEGIN
29
34class StateKeplerian;
35using PStateKeplerian = StateKeplerian*;
36using HStateKeplerian = SharedPtr<StateKeplerian>;
37
38
40enum class ESizeType
41{
42 eSMA,
43 eApoAlt,
44 eApoRad,
45 ePeriAlt,
46 ePeriRad,
47 ePeriod,
49};
50
52enum class EShapeType
53{
54 eEcc,
55 eApoAlt,
56 eApoRad,
57 ePeriAlt,
58 ePeriRad,
59};
60
63{
64 eRAAN,
65 eLAN,
66};
67
80
81
82
83
85class AST_CORE_API StateKeplerian final: public State
86{
87public:
88 AST_OBJECT(StateKeplerian)
89 AST_PROPERT(SMA)
90 AST_PROPERT(Period)
91 AST_PROPERT(MeanMotion)
92 AST_PROPERT(ApoRadForSize)
93 AST_PROPERT(ApoAltForSize)
94 AST_PROPERT(PeriRadForSize)
95 AST_PROPERT(PeriAltForSize)
96 AST_PROPERT(Ecc)
97 AST_PROPERT(ApoRadForShape)
98 AST_PROPERT(ApoAltForShape)
99 AST_PROPERT(PeriRadForShape)
100 AST_PROPERT(PeriAltForShape)
101 AST_PROPERT(Inc)
102 AST_PROPERT(RAAN)
103 AST_PROPERT(LAN)
104 AST_PROPERT(ArgPeri)
105 AST_PROPERT(TrueAnomaly)
106 AST_PROPERT(MeanAnomaly)
107 AST_PROPERT(EccAnomaly)
108 AST_PROPERT(ArgLat)
109 AST_PROPERT(TimePastPeri)
110 AST_PROPERT(TimePastAscNode)
111 static PStateKeplerian New();
113 static PStateKeplerian New(const ModOrbElem& modOrbElem);
114 static HStateKeplerian MakeShared(const ModOrbElem& modOrbElem);
115
117 StateKeplerian(const ModOrbElem& modOrbElem);
118 StateKeplerian(const State& state);
119 ~StateKeplerian() override = default;
120public:
121 EStateType getStateType() const override { return EStateType::eKeplerian; }
122 errc_t getState(CartState& state) const override;
123 errc_t setState(const CartState& state) override;
124public:
125 void setState(OrbElem& orbElem);
126 void getState(OrbElem& orbElem) const;
127 void setState(const ModOrbElem& modOrbElem){ modOrbElem_ = modOrbElem; }
128 void getState(ModOrbElem& modOrbElem) const { modOrbElem = modOrbElem_; }
129public:
131 void getInnerRepresentationState(array6d& stateInRepresentation) const;
133 void getStateInRepresentation(
134 ESizeType sizeType, EShapeType shapeType,
135 EOrientationType orientationType, EPositionType positionType,
136 array6d& stateInRepresentation
137 ) const;
138 double getStateParam(int index);
139 void setStateParam(int index, double value);
141 double getSizeParam() const;
142 double getSizeParam(ESizeType sizeType) const;
143 void setSizeParam(double sizeParam, ESizeType sizeType);
144 void setSizeParam(double sizeParam);
145 void setSizeType(ESizeType sizeType);
147 double getShapeParam() const;
148 double getShapeParam(EShapeType shapeType) const;
149 void setShapeParam(double shapeParam, EShapeType shapeType);
150 void setShapeParam(double shapeParam);
151 void setShapeType(EShapeType shapeType);
153 double getOrientationParam() const;
154 double getOrientationParam(EOrientationType orientationType) const;
155 void setOrientationParam(double orientationParam, EOrientationType orientationType);
156 void setOrientationParam(double orientationParam);
157 void setOrientationType(EOrientationType orientationType);
159 double getPositionParam() const;
160 double getPositionParam(EPositionType positionType) const;
161 void setPositionParam(double positionParam, EPositionType positionType);
162 void setPositionParam(double positionParam);
163 void setPositionType(EPositionType positionType);
164public:
166 double getApoAlt() const;
167
169 double getApoRad() const;
170
172 double getPeriAlt() const;
173
175 double getPeriRad() const;
176
178 ESizeType getSizeType() const{return sizeType_;}
179
181 EShapeType getShapeType() const{return shapeType_;}
182
184 EOrientationType getOrientationType() const{return orientationType_;}
185
187 EPositionType getPositionType() const{return positionType_;}
188PROPERTIES:
190 length_d getSMA() const;
192 void setSMA(length_d sma);
193
195 time_d getPeriod() const;
197 void setPeriod(time_d period);
198
200 angvel_d getMeanMotion() const;
202 void setMeanMotion(angvel_d meanMotion);
203
204 length_d getApoRadForSize() const{return getApoRad();}
206 void setApoRadForSize(length_d apoRad);
207
208 length_d getApoAltForSize() const{return getApoAlt();}
210 void setApoAltForSize(length_d apoAlt);
211
212 length_d getPeriRadForSize() const{return getPeriRad();}
214 void setPeriRadForSize(length_d periRad);
215
216 length_d getPeriAltForSize() const{return getPeriAlt();}
218 void setPeriAltForSize(length_d periAlt);
219
221 double getEcc() const;
223 void setEcc(double ecc);
224
225 length_d getApoRadForShape() const{return getApoRad();}
227 void setApoRadForShape(length_d apoRad);
228
229 length_d getApoAltForShape() const{return getApoAlt();}
231 void setApoAltForShape(length_d apoAlt);
232
233 length_d getPeriRadForShape() const{return getPeriRad();}
235 void setPeriRadForShape(length_d periRad);
236
237 length_d getPeriAltForShape() const{return getPeriAlt();}
239 void setPeriAltForShape(length_d periAlt);
240
242 angle_d getInc() const;
244 void setInc(angle_d inc);
245
247 angle_d getRAAN() const;
249 void setRAAN(angle_d raan);
250
252 angle_d getLAN() const;
254 void setLAN(angle_d lan);
255
257 angle_d getArgPeri() const;
259 void setArgPeri(double argPeri);
260
262 angle_d getTrueAnomaly() const;
264 void setTrueAnomaly(angle_d trueAnomaly);
265
267 angle_d getMeanAnomaly() const;
269 void setMeanAnomaly(angle_d meanAnomaly);
270
272 angle_d getEccAnomaly() const;
274 void setEccAnomaly(angle_d eccAnomaly);
275
277 angle_d getArgLat() const;
279 void setArgLat(angle_d argLat);
280
282 time_d getTimePastPeri() const;
284 void setTimePastPeri(time_d timePastPeri);
285
287 time_d getTimePastAscNode() const;
289 void setTimePastAscNode(time_d timePastAscNode);
290
291public:
293 void getTimeOfPeriPassage(TimePoint& tp) const;
295 TimePoint getTimeOfPeriPassage() const;
297 void setTimeOfPeriPassage(const TimePoint& tp);
299 void setTimeOfPeriPassage(double epochsecond);
300
302 void getTimeOfAscNodePassage(TimePoint& tp) const;
304 TimePoint getTimeOfAscNodePassage() const;
306 void setTimeOfAscNodePassage(const TimePoint& tp);
308 void setTimeOfAscNodePassage(double epochsecond);
309private:
310 void changeEccHoldingOthers(double ecc, const ModOrbElem& originalElem);
311 void changePeriRadHoldingOthers(double periRad, const ModOrbElem& originalElem);
312 void changeArgPeriHoldingOthers(double argPeri, const ModOrbElem& originalElem);
313private:
314 void holdLAN(const ModOrbElem& originalElem);
315 void holdMeanAnomaly(const ModOrbElem& originalElem);
316 void holdEccAnomaly(const ModOrbElem& originalElem);
317 void holdArgLat(const ModOrbElem& originalElem);
318 void holdTimePastAscNode(const ModOrbElem& originalElem);
319 void holdTimePastPeri(const ModOrbElem& originalElem);
320protected:
321 ModOrbElem modOrbElem_{};
322 ESizeType sizeType_{ESizeType::eSMA};
323 EShapeType shapeType_{EShapeType::eEcc};
324 EOrientationType orientationType_{EOrientationType::eRAAN};
325 EPositionType positionType_{EPositionType::eTrueAnomaly};
326};
327
330AST_NAMESPACE_END
直角坐标
定义 OrbitElement.hpp:46
修正轨道根数
定义 OrbitElement.hpp:127
经典轨道根数
定义 OrbitElement.hpp:85
共享指针
定义 SharedPtr.hpp:33
开普勒轨道根数状态
定义 StateKeplerian.hpp:86
ESizeType getSizeType() const
获取轨道大小的定义方式
定义 StateKeplerian.hpp:178
EStateType getStateType() const override
获取状态类型
定义 StateKeplerian.hpp:121
EOrientationType getOrientationType() const
获取轨道面方向的定义方式
定义 StateKeplerian.hpp:184
EShapeType getShapeType() const
获取轨道形状的定义方式
定义 StateKeplerian.hpp:181
EPositionType getPositionType() const
获取轨道位置的定义方式
定义 StateKeplerian.hpp:187
航天器状态
定义 State.hpp:53
static HState MakeShared(EStateType type)
创建状态
定义 State.cpp:34
virtual errc_t getState(CartState &state) const =0
获取状态
virtual errc_t setState(const CartState &state)=0
设置状态
static PState New(EStateType type)
创建状态
定义 State.cpp:44
ESizeType
轨道大小描述方式
定义 StateKeplerian.hpp:41
@ eApoAlt
远地点高度
@ eApoRad
远地点半径
@ eSMA
半长轴
@ ePeriAlt
近地点高度
@ eMeanMotion
平均角速度
@ ePeriRad
近地点半径
EShapeType
轨道形状描述方式
定义 StateKeplerian.hpp:53
@ eEcc
偏心率
EPositionType
轨道位置描述方式
定义 StateKeplerian.hpp:70
@ eTimeOfAscNodePassage
过升交点时刻
@ eTrueAnomaly
真近点角
@ eTimePastAscNode
过升交点后经过的时间
@ eTimeOfPeriPassage
过近地点时刻
@ eEccAnomaly
偏近点角
@ eTimePastPeri
过近地点后经过的时间
@ eMeanAnomaly
平近点角
@ eArgLat
纬度幅角
EStateType
状态类型
定义 State.hpp:39
@ eKeplerian
开普勒状态
EOrientationType
轨道面方向描述方式
定义 StateKeplerian.hpp:63
@ eLAN
升交点经度
@ eRAAN
升交点赤经