🛰️航天仿真算法库 SpaceAST 0.0.1
载入中...
搜索中...
未找到
Frame.hpp
浏览该文件的文档.
1
20
21#pragma once
22
23#include "AstGlobal.h"
24#include "AstUtil/Object.hpp"
25
26AST_NAMESPACE_BEGIN
27
33class Transform;
34class KinematicTransform;
35class Frame;
36class Axes;
37class Point;
38
45AST_CORE_API errc_t aFrameTransform(Frame* source, Frame* target, const TimePoint& tp, Transform& transform);
46
53AST_CORE_API errc_t aFrameTransform(Frame* source, Frame* target, const TimePoint& tp, KinematicTransform& transform);
54
55
58class AST_CORE_API Frame: public Object
59{
60public:
61 Frame() = default;
62 ~Frame() override= default;
63
66 CelestialBody* getBody();
67
70 double getGM();
71
74 virtual Frame* getParent() const;
75
80 virtual errc_t getTransform(const TimePoint& tp, Transform& transform) const;
81
86 virtual errc_t getTransform(const TimePoint& tp, KinematicTransform& transform) const;
87
90 virtual Axes* getAxes() const = 0;
91
94 virtual Point* getOrigin() const = 0;
95public:
101 errc_t getTransformTo(Frame* target, const TimePoint& tp, Transform& transform) const
102 {
103 return aFrameTransform(const_cast<Frame*>(this), target, tp, transform);
104 }
105
111 errc_t getTransformTo(Frame* target, const TimePoint& tp, KinematicTransform& transform) const
112 {
113 return aFrameTransform(const_cast<Frame*>(this), target, tp, transform);
114 }
115
121 errc_t getTransformFrom(Frame* source, const TimePoint& tp, Transform& transform) const
122 {
123 return aFrameTransform(source, const_cast<Frame*>(this), tp, transform);
124 }
125
131 errc_t getTransformFrom(Frame* source, const TimePoint& tp, KinematicTransform& transform) const
132 {
133 return aFrameTransform(source, const_cast<Frame*>(this), tp, transform);
134 }
135};
136
137using HFrame = SharedPtr<Frame>;
138using PFrame = Frame*;
139
142AST_NAMESPACE_END
轴系类
定义 Axes.hpp:69
天体
定义 CelestialBody.hpp:52
坐标系类
定义 Frame.hpp:59
errc_t getTransformTo(Frame *target, const TimePoint &tp, KinematicTransform &transform) const
获取当前坐标系到目标坐标系的运动学变换。
定义 Frame.hpp:111
errc_t getTransformFrom(Frame *source, const TimePoint &tp, KinematicTransform &transform) const
获取源坐标系到当前坐标系的运动学变换。
定义 Frame.hpp:131
errc_t getTransformTo(Frame *target, const TimePoint &tp, Transform &transform) const
获取当前坐标系到目标坐标系的变换。
定义 Frame.hpp:101
virtual Point * getOrigin() const =0
获取当前坐标系的原点。
errc_t getTransformFrom(Frame *source, const TimePoint &tp, Transform &transform) const
获取源坐标系到当前坐标系的变换。
定义 Frame.hpp:121
virtual Axes * getAxes() const =0
获取当前坐标系的轴系。
运动学变换
定义 KinematicTransform.hpp:33
对象基类,继承自该类的对象可以使用运行时类型信息相关功能,实现强弱引用计数、运行时元信息(属性访问、序列化等)等基础功能
定义 Object.hpp:81
定义 Point.hpp:37
绝对时间点
定义 TimePoint.hpp:106
坐标系转换类
定义 Transform.hpp:33
errc_t aFrameTransform(Frame *source, Frame *target, const TimePoint &tp, Transform &transform)
计算坐标系之间的变换。
定义 Axes.cpp:157