🛰️航天仿真算法库 SpaceAST 0.3.1
载入中...
搜索中...
未找到
Platform.hpp
浏览该文件的文档.
1
20
21#pragma once
22
23#include "AstGlobal.h"
24#include "AstCore/Point.hpp"
25#include "AstCore/Axes.hpp"
26
27AST_NAMESPACE_BEGIN
28
39class AST_SIM_API Platform : public Point
40{
41public:
42 AST_OBJECT(Platform)
43 Platform();
44 Platform(Point* location, Axes* orientation);
45 ~Platform() = default;
46public:
47 Frame* getFrame() const override;
48 errc_t getPos(const TimePoint& tp, Vector3d& pos) const override;
49 errc_t getPosVel(const TimePoint& tp, Vector3d& pos, Vector3d& vel) const override;
50 errc_t getInterval(TimeInterval& interval) const override;
51public:
52 Point* location() const {return location_.get();}
53 Axes* orientation() const {return orientation_.get();}
54 void setLocation(Point* location);
55 void setOrientation(Axes* orientation);
56public:
57 Frame& bodyFrame() const {return *bodyFrame_;}
58 Axes& bodyAxes() const {return *bodyAxes_;}
59private:
60 SharedPtr<Point> location_{};
61 SharedPtr<Axes> orientation_{};
62private:
63 SharedPtr<Frame> bodyFrame_{};
64 SharedPtr<Axes> bodyAxes_{};
65};
66
67
68
71AST_NAMESPACE_END
轴系抽象基类
定义 Axes.hpp:86
坐标系抽象基类
定义 Frame.hpp:74
通用平台类,用于表示空间中的平台对象,例如卫星、飞机、地面站等,具有位置、姿态两个属性
定义 Platform.hpp:40
点抽象基类
定义 Point.hpp:42
virtual Frame * getFrame() const =0
获取点所在的参考坐标系
virtual errc_t getPosVel(const TimePoint &tp, Vector3d &pos, Vector3d &vel) const =0
获取点在指定时间点的位置和速度,相对于点的参考坐标系
virtual errc_t getInterval(TimeInterval &interval) const
获取点的时段,表示点在空间中的存在时间范围
定义 Point.cpp:38
virtual errc_t getPos(const TimePoint &tp, Vector3d &pos) const =0
获取点在指定时间点的位置,相对于点的参考坐标系
共享指针
定义 SharedPtr.hpp:33
时间区间
定义 TimeInterval.hpp:64
绝对时间点
定义 TimePoint.hpp:108