🛰️航天仿真算法库 SpaceAST 0.3.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 "AstCore/AttitudeProfile.hpp"
27#include "AstCore/Ephemeris.hpp"
28#include "AstSim/MotionProfile.hpp"
29#include "AstSim/Platform.hpp"
30#include "AstUtil/StringView.hpp"
31
32AST_NAMESPACE_BEGIN
33
40class AST_SIM_API Mover: public Platform
41{
42public:
43 AST_OBJECT(Mover)
44 AST_PROPERT(MotionProfile)
45 AST_PROPERT(AttitudeProfile)
46 AST_PROPERT(Ephemeris)
47 Mover() = default;
48 ~Mover() override = default;
49
50public:
53 errc_t generateEphemeris();
54
55 errc_t generateEphemerisSimple();
56
57 errc_t generateEphemerisSpec();
58
61 Body* getBody() const;
62
63public: // 从Point继承重写的函数
64 Frame* getFrame() const final;
65 errc_t getPos(const TimePoint& tp, Vector3d& pos) const final;
66 errc_t getPosVel(const TimePoint& tp, Vector3d& pos, Vector3d& vel) const final;
67PROPERTIES:
70 MotionProfile* getMotionProfile() const { return motionProfile_.get(); }
73 void setMotionProfile(MotionProfile* profile);
78 AttitudeProfile* getAttitudeProfile() const;
81 void setAttitudeProfile(AttitudeProfile* profile) { setOrientation(profile); }
84 Ephemeris* getEphemeris() const { return location(); }
87 void setEphemeris(Ephemeris* ephemeris) { setLocation(ephemeris); }
88public:
89
93 State* getInitialState() const;
94
95private:
96 WeakPtr<MotionProfile> motionProfile_{};
97};
98
101AST_NAMESPACE_END
轴系抽象基类
定义 Axes.hpp:86
天体
定义 CelestialBody.hpp:72
坐标系抽象基类
定义 Frame.hpp:74
运动定义接口
定义 MotionProfile.hpp:51
运动对象
定义 Mover.hpp:41
Ephemeris * getEphemeris() const
获取星历
定义 Mover.hpp:84
void setAttitudeProfile(AttitudeProfile *profile)
设置姿态定义
定义 Mover.hpp:81
void setEphemeris(Ephemeris *ephemeris)
设置星历
定义 Mover.hpp:87
通用平台类,用于表示空间中的平台对象,例如卫星、飞机、地面站等,具有位置、姿态两个属性
定义 Platform.hpp:40
errc_t getPos(const TimePoint &tp, Vector3d &pos) const override
获取点在指定时间点的位置,相对于点的参考坐标系
定义 Platform.cpp:50
Frame * getFrame() const override
获取点所在的参考坐标系
定义 Platform.cpp:42
errc_t getPosVel(const TimePoint &tp, Vector3d &pos, Vector3d &vel) const override
获取点在指定时间点的位置和速度,相对于点的参考坐标系
定义 Platform.cpp:58
点抽象基类
定义 Point.hpp:42
航天器状态
定义 State.hpp:57
绝对时间点
定义 TimePoint.hpp:108
弱引用指针
定义 WeakPtr.hpp:35