🛰️航天仿真算法库 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 Mover() = default;
43 ~Mover() override = default;
44
45public:
47 void setName(StringView name) { name_ = std::string(name); }
48
50 const std::string& getName() const { return name_; }
51
52public:
55 MotionProfile* getMotionProfile() const { return motionProfile_.get(); }
56
57 ScopedPtr<MotionProfile>& getMotionProfileHandle() { return motionProfile_; }
58
60 void setMotionProfile(MotionProfile* profile) { motionProfile_ = profile; }
61
64 AttitudeProfile* getAttitudeProfile() const { return attitudeProfile_.get(); }
65
67 void setAttitudeProfile(AttitudeProfile* profile) { attitudeProfile_ = profile; }
68
71 Ephemeris* getEphemeris() const { return ephemeris_.get(); }
72
75 ScopedPtr<Ephemeris>& getEphemerisHandle() { return ephemeris_; }
76public:
79 errc_t generateEphemeris();
80
81public: // 从Point继承重写的函数
82 Frame* getFrame() const final;
83 errc_t getPos(const TimePoint& tp, Vector3d& pos) const final;
84 errc_t getPosVel(const TimePoint& tp, Vector3d& pos, Vector3d& vel) const final;
85protected:
86 std::string name_;
87 ScopedPtr<MotionProfile> motionProfile_;
88 ScopedPtr<AttitudeProfile> attitudeProfile_;
89 ScopedPtr<Ephemeris> ephemeris_;
90};
91
94AST_NAMESPACE_END
姿态定义接口
定义 AttitudeProfile.hpp:35
星历接口
定义 Ephemeris.hpp:43
坐标系类
定义 Frame.hpp:59
运动定义接口
定义 MotionProfile.hpp:46
运动对象
定义 Mover.hpp:40
AttitudeProfile * getAttitudeProfile() const
获取姿态定义
定义 Mover.hpp:64
void setMotionProfile(MotionProfile *profile)
设置运动定义
定义 Mover.hpp:60
Ephemeris * getEphemeris() const
获取星历
定义 Mover.hpp:71
void setAttitudeProfile(AttitudeProfile *profile)
设置姿态定义
定义 Mover.hpp:67
const std::string & getName() const
获取名称
定义 Mover.hpp:50
void setName(StringView name)
设置名称
定义 Mover.hpp:47
ScopedPtr< Ephemeris > & getEphemerisHandle()
获取星历句柄
定义 Mover.hpp:75
MotionProfile * getMotionProfile() const
获取运动定义
定义 Mover.hpp:55
定义 Point.hpp:37
virtual Frame * getFrame() const =0
获取点所在的参考坐标系
定义 ScopedPtr.hpp:59
绝对时间点
定义 TimePoint.hpp:106