🛰️航天仿真算法库 SpaceAST 0.3.1
载入中...
搜索中...
未找到
Point.hpp
浏览该文件的文档.
1
20
21#pragma once
22
23#include "AstGlobal.h"
24#include "AstUtil/Object.hpp"
25#include "AstUtil/ObjectNamed.hpp"
26#include <vector>
27
28AST_NAMESPACE_BEGIN
29
35class Frame;
36class CelestialBody;
37
41class AST_CORE_API Point: public ObjectNamed
42{
43public:
44 AST_OBJECT(Point)
45
46 Point() = default;
47 ~Point() override = default;
48
51 CelestialBody* toBody() const;
52
55 virtual Frame* getFrame() const = 0;
56
61 virtual errc_t getPos(const TimePoint& tp, Vector3d& pos) const = 0;
62
68 virtual errc_t getPosVel(const TimePoint& tp, Vector3d& pos, Vector3d& vel) const = 0;
69
77 virtual errc_t getPosVelAcc(const TimePoint& tp, Vector3d& pos, Vector3d& vel, Vector3d& acc) const;
78
82 virtual errc_t getInterval(TimeInterval& interval) const;
83
89 errc_t getPosIn(Frame* frame, const TimePoint& tp, Vector3d& pos) const;
90 errc_t getPosIn(Frame& frame, const TimePoint& tp, Vector3d& pos) const;
91
98 errc_t getPosVelIn(Frame* frame, const TimePoint& tp, Vector3d& pos, Vector3d& vel) const;
99 errc_t getPosVelIn(Frame& frame, const TimePoint& tp, Vector3d& pos, Vector3d& vel) const;
100
108 errc_t getPosVelAccIn(Frame* frame, const TimePoint& tp, Vector3d& pos, Vector3d& vel, Vector3d& acc) const;
109 errc_t getPosVelAccIn(Frame& frame, const TimePoint& tp, Vector3d& pos, Vector3d& vel, Vector3d& acc) const;
110
116 errc_t getPosIn(Frame* frame, const TimePointRange& range, std::vector<Vector3d>& posList) const;
117
124 errc_t getPosVelIn(Frame* frame, const TimePointRange& range, std::vector<Vector3d>& posList, std::vector<Vector3d>& velList) const;
125
126};
127
128using PPoint = Point*;
130
133AST_NAMESPACE_END
天体
定义 CelestialBody.hpp:72
坐标系抽象基类
定义 Frame.hpp:74
命名对象
定义 ObjectNamed.hpp:36
点抽象基类
定义 Point.hpp:42
virtual Frame * getFrame() const =0
获取点所在的参考坐标系
virtual errc_t getPosVel(const TimePoint &tp, Vector3d &pos, Vector3d &vel) const =0
获取点在指定时间点的位置和速度,相对于点的参考坐标系
virtual errc_t getPos(const TimePoint &tp, Vector3d &pos) const =0
获取点在指定时间点的位置,相对于点的参考坐标系
共享指针
定义 SharedPtr.hpp:33
时间区间
定义 TimeInterval.hpp:64
按步长采样的时间点范围(惰性可迭代)
定义 TimePointRange.hpp:43
绝对时间点
定义 TimePoint.hpp:108