🛰️航天仿真算法库 SpaceAST 0.0.1
载入中...
搜索中...
未找到
Mover.hpp
浏览该文件的文档.
1
20
21#pragma once
22
23#include "AstGlobal.h"
24#include "AstCore/Object.hpp"
25#include "AstCore/Point.hpp"
26#include "AstSim/AttitudeProfile.hpp"
27#include "AstSim/MotionProfile.hpp"
28#include "AstCore/Ephemeris.hpp"
29#include "AstUtil/StringView.hpp"
30
31AST_NAMESPACE_BEGIN
32
39class AST_SIM_API Mover: public Point
40{
41public:
42 AST_OBJECT(Mover)
43 AST_PROPERT(MotionProfile)
44 AST_PROPERT(AttitudeProfile)
45 AST_PROPERT(Ephemeris)
46 Mover() = default;
47 ~Mover() override = default;
48
49public:
51 void setName(StringView name) override { name_ = std::string(name); }
52
54 const std::string& getName() const override { return name_; }
55
56public:
57 // ScopedPtr<MotionProfile>& getMotionProfileHandle() { return motionProfile_; }
58
61 ScopedPtr<Ephemeris>& getEphemerisHandle() { return ephemeris_; }
62public:
65 errc_t generateEphemeris();
66
67 errc_t generateEphemerisSimple();
68
69 errc_t generateEphemerisSpec();
70
73 Body* getBody() const;
74
75public: // 从Point继承重写的函数
76 Frame* getFrame() const final;
77 errc_t getPos(const TimePoint& tp, Vector3d& pos) const final;
78 errc_t getPosVel(const TimePoint& tp, Vector3d& pos, Vector3d& vel) const final;
79PROPERTIES:
82 MotionProfile* getMotionProfile() const { return motionProfile_.get(); }
85 void setMotionProfile(MotionProfile* profile);
88 AttitudeProfile* getAttitudeProfile() const { return attitudeProfile_.get(); }
91 void setAttitudeProfile(AttitudeProfile* profile) { attitudeProfile_ = profile; }
94 Ephemeris* getEphemeris() const { return ephemeris_.get(); }
97 void setEphemeris(Ephemeris* ephemeris) { ephemeris_ = ephemeris; }
98public:
99
103 State* getInitialState() const;
104
105protected:
106 std::string name_;
110};
111
114AST_NAMESPACE_END
姿态定义接口
定义 AttitudeProfile.hpp:36
天体
定义 CelestialBody.hpp:72
星历接口
定义 Ephemeris.hpp:44
坐标系类
定义 Frame.hpp:60
运动定义接口
定义 MotionProfile.hpp:51
运动对象
定义 Mover.hpp:40
AttitudeProfile * getAttitudeProfile() const
获取姿态定义
定义 Mover.hpp:88
WeakPtr< AttitudeProfile > attitudeProfile_
姿态定义
定义 Mover.hpp:108
ScopedPtr< Ephemeris > ephemeris_
星历
定义 Mover.hpp:109
void setName(StringView name) override
设置名称
定义 Mover.hpp:51
std::string name_
名称
定义 Mover.hpp:106
Ephemeris * getEphemeris() const
获取星历
定义 Mover.hpp:94
void setAttitudeProfile(AttitudeProfile *profile)
设置姿态定义
定义 Mover.hpp:91
WeakPtr< MotionProfile > motionProfile_
运动定义
定义 Mover.hpp:107
void setEphemeris(Ephemeris *ephemeris)
设置星历
定义 Mover.hpp:97
ScopedPtr< Ephemeris > & getEphemerisHandle()
获取星历句柄
定义 Mover.hpp:61
const std::string & getName() const override
获取名称
定义 Mover.hpp:54
定义 Point.hpp:38
virtual Frame * getFrame() const =0
获取点所在的参考坐标系
作用域指针类
定义 ScopedPtr.hpp:65
航天器状态
定义 State.hpp:53
绝对时间点
定义 TimePoint.hpp:107
弱引用指针
定义 WeakPtr.hpp:35