🛰️航天仿真算法库 SpaceAST 0.3.1
载入中...
搜索中...
未找到
StateSpherical.hpp
浏览该文件的文档.
1
20
21#pragma once
22
23#include "AstGlobal.h"
24#include "AstCore/State.hpp"
25#include "AstCore/OrbitElement.hpp"
26
27AST_NAMESPACE_BEGIN
28
33class StateSpherical;
34using PStateSpherical = StateSpherical*;
35using HStateSpherical = SharedPtr<StateSpherical>;
36
43class AST_CORE_API StateSpherical final: public State
44{
45public:
46 AST_OBJECT(StateSpherical)
47 AST_PROPERT(RA)
48 AST_PROPERT(Dec)
49 AST_PROPERT(Radius)
50 AST_PROPERT(FltPathAng)
51 AST_PROPERT(FltPathAzi)
52 AST_PROPERT(Vel)
53 static PStateSpherical New();
55 static PStateSpherical New(const SphericalElem& sphericalElem);
56 static HStateSpherical MakeShared(const SphericalElem& sphericalElem);
57
58 StateSpherical() = default;
59 StateSpherical(const SphericalElem& sphericalElem);
60 StateSpherical(const State& state);
61 ~StateSpherical() override = default;
62public:
63 EStateType getStateType() const override { return EStateType::eSpherical; }
64 errc_t getState(CartState& state) const override;
65 errc_t getState(ModOrbElem& orbElem) const override;
66 errc_t setState(const CartState& state) override;
67 errc_t setState(const ModOrbElem& orbElem) override;
68public:
71 void getState(SphericalElem& sphericalElem) const { sphericalElem = sphericalElem_; }
72
76 errc_t setState(const SphericalElem& sphericalElem);
77PROPERTIES:
79 angle_d getRA() const { return sphericalElem_.ra_; }
81 void setRA(angle_d ra) { sphericalElem_.ra_ = ra; }
82
84 angle_d getDec() const { return sphericalElem_.dec_; }
86 void setDec(angle_d dec) { sphericalElem_.dec_ = dec; }
87
89 length_d getRadius() const { return sphericalElem_.r_; }
91 void setRadius(length_d r) { sphericalElem_.r_ = r; }
92
94 angle_d getFltPathAng() const { return sphericalElem_.fpa_; }
96 void setFltPathAng(angle_d fpa) { sphericalElem_.fpa_ = fpa; }
97
99 angle_d getFltPathAzi() const { return sphericalElem_.azi_; }
101 void setFltPathAzi(angle_d azi) { sphericalElem_.azi_ = azi; }
102
104 speed_d getVel() const { return sphericalElem_.v_; }
106 void setVel(speed_d v) { sphericalElem_.v_ = v; }
107protected:
108 SphericalElem sphericalElem_{};
109};
110
111
112
115AST_NAMESPACE_END
直角坐标
定义 OrbitElement.hpp:53
修正轨道根数
定义 OrbitElement.hpp:154
共享指针
定义 SharedPtr.hpp:33
球坐标轨道根数
定义 OrbitElement.hpp:386
球坐标状态
定义 StateSpherical.hpp:44
speed_d getVel() const
获取速度大小
定义 StateSpherical.hpp:104
void setRadius(length_d r)
设置地心距
定义 StateSpherical.hpp:91
void setVel(speed_d v)
设置速度大小
定义 StateSpherical.hpp:106
void setRA(angle_d ra)
设置赤经
定义 StateSpherical.hpp:81
angle_d getFltPathAng() const
获取航迹角
定义 StateSpherical.hpp:94
angle_d getFltPathAzi() const
获取航迹方位角
定义 StateSpherical.hpp:99
void setFltPathAng(angle_d fpa)
设置航迹角
定义 StateSpherical.hpp:96
length_d getRadius() const
获取地心距
定义 StateSpherical.hpp:89
void setDec(angle_d dec)
设置赤纬
定义 StateSpherical.hpp:86
EStateType getStateType() const override
获取状态类型
定义 StateSpherical.hpp:63
angle_d getDec() const
获取赤纬
定义 StateSpherical.hpp:84
void setFltPathAzi(angle_d azi)
设置航迹方位角
定义 StateSpherical.hpp:101
void getState(SphericalElem &sphericalElem) const
获取球坐标根数
定义 StateSpherical.hpp:71
航天器状态
定义 State.hpp:57
static HState MakeShared(EStateType type)
创建状态
定义 State.cpp:46
virtual errc_t getState(CartState &state) const =0
获取状态
virtual errc_t setState(const CartState &state)=0
设置状态
static PState New(EStateType type)
创建状态
定义 State.cpp:56
EStateType
状态类型
定义 State.hpp:39
@ eSpherical
球坐标状态