🛰️航天仿真算法库 SpaceAST 0.0.1
载入中...
搜索中...
未找到
PointBodyCenter.hpp
浏览该文件的文档.
1
20
21#pragma once
22
23#include "AstGlobal.h"
24#include "AstCore/Point.hpp"
25
26AST_NAMESPACE_BEGIN
27
33class CelestialBody;
34
36class AST_CORE_API PointBodyCenter final: public Point
37{
38public:
39 PointBodyCenter() = default;
40
41 PointBodyCenter(const PointBodyCenter&) = delete;
42 PointBodyCenter& operator=(const PointBodyCenter&) = delete;
43
44 explicit PointBodyCenter(CelestialBody* body);
45 ~PointBodyCenter() = default;
46 CelestialBody* getBody() const{ return body_; }
47 void setBody(CelestialBody* body){ body_ = body; }
48 Frame* getFrame() const override;
49 errc_t getPos(const TimePoint& tp, Vector3d& pos) const override;
50 errc_t getPosVel(const TimePoint& tp, Vector3d& pos, Vector3d& vel) const override;
51protected:
52 CelestialBody* body_{nullptr};
53};
54
55
58AST_NAMESPACE_END
天体
定义 CelestialBody.hpp:72
坐标系抽象基类
定义 Frame.hpp:62
天体的中心点
定义 PointBodyCenter.hpp:37
点抽象基类
定义 Point.hpp:41
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
获取点在指定时间点的位置,相对于点的参考坐标系
绝对时间点
定义 TimePoint.hpp:108