🛰️航天仿真算法库 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
69 Body* getBody() const;
70
71public: // 从Point继承重写的函数
72 Frame* getFrame() const final;
73 errc_t getPos(const TimePoint& tp, Vector3d& pos) const final;
74 errc_t getPosVel(const TimePoint& tp, Vector3d& pos, Vector3d& vel) const final;
75PROPERTIES:
78 MotionProfile* getMotionProfile() const { return motionProfile_.get(); }
81 void setMotionProfile(MotionProfile* profile);
84 AttitudeProfile* getAttitudeProfile() const { return attitudeProfile_.get(); }
87 void setAttitudeProfile(AttitudeProfile* profile) { attitudeProfile_ = profile; }
90 Ephemeris* getEphemeris() const { return ephemeris_.get(); }
93 void setEphemeris(Ephemeris* ephemeris) { ephemeris_ = ephemeris; }
94public:
95
99 State* getInitialState() const;
100
101protected:
102 std::string name_;
106};
107
110AST_NAMESPACE_END
姿态定义接口
定义 AttitudeProfile.hpp:36
天体
定义 CelestialBody.hpp:52
星历接口
定义 Ephemeris.hpp:44
坐标系类
定义 Frame.hpp:60
运动定义接口
定义 MotionProfile.hpp:51
运动对象
定义 Mover.hpp:40
AttitudeProfile * getAttitudeProfile() const
获取姿态定义
定义 Mover.hpp:84
WeakPtr< AttitudeProfile > attitudeProfile_
姿态定义
定义 Mover.hpp:104
ScopedPtr< Ephemeris > ephemeris_
星历
定义 Mover.hpp:105
void setName(StringView name) override
设置名称
定义 Mover.hpp:51
std::string name_
名称
定义 Mover.hpp:102
Ephemeris * getEphemeris() const
获取星历
定义 Mover.hpp:90
void setAttitudeProfile(AttitudeProfile *profile)
设置姿态定义
定义 Mover.hpp:87
WeakPtr< MotionProfile > motionProfile_
运动定义
定义 Mover.hpp:103
void setEphemeris(Ephemeris *ephemeris)
设置星历
定义 Mover.hpp:93
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:106
弱引用指针
定义 WeakPtr.hpp:35