🛰️航天仿真算法库 SpaceAST 0.3.1
载入中...
搜索中...
未找到
EphemerisVinti.hpp
浏览该文件的文档.
1
20
21#pragma once
22
23#include "AstGlobal.h"
24#include "AstCore/Ephemeris.hpp"
25#include "AstCore/TimePoint.hpp"
26#include "AstCore/BuiltinFrame.hpp"
27#include "AstCore/OrbitElement.hpp"
28#include "AstMath/Vector.hpp"
29
30AST_NAMESPACE_BEGIN
31
41class AST_CORE_API EphemerisVinti final: public Ephemeris
42{
43public:
44 static EphemerisVinti* New(Frame* frame, const TimePoint& epoch, const CartState& initstate);
45 static EphemerisVinti* New(Frame* frame, double gm, double j2, double j3, double re, const TimePoint& epoch, const CartState& initstate);
46
48 EphemerisVinti(Frame* frame, double gm, double j2, double j3, double re, const TimePoint& epoch, const CartState& initstate);
49 ~EphemerisVinti() override = default;
50 void setFrame(Frame* frame){ frame_ = frame; }
51 void setGM(double gm){ gm_ = gm; }
52 void setJ2(double j2){ j2_ = j2; }
53 void setJ3(double j3){ j3_ = j3; }
54 void setRe(double re){ re_ = re; }
55 double getGM() const{ return gm_; }
56 double getJ2() const{ return j2_; }
57 double getJ3() const{ return j3_; }
58 double getRe() const{ return re_; }
59 void setEpoch(const TimePoint& epoch){ epoch_ = epoch; }
60 const TimePoint& getEpoch() const{ return epoch_; }
61 void setInitialState(const CartState& initstate){ initstate_ = initstate; }
62 void getInitialState(CartState& initstate) const{ initstate = initstate_; }
63public:
64 Frame* getFrame() const override;
65 errc_t getPos(const TimePoint& tp, Vector3d& pos) const override;
66 errc_t getPosVel(const TimePoint& tp, Vector3d& pos, Vector3d& vel) const override;
67 errc_t getInterval(TimeInterval& interval) const override;
68protected:
70 double gm_{0.0};
71 double j2_{0.0};
72 double j3_{0.0};
73 double re_{0.0};
74 TimePoint epoch_{};
75 CartState initstate_{};
76};
77
80AST_NAMESPACE_END
直角坐标
定义 OrbitElement.hpp:53
Vinti 解析解星历(含 J2 / J3 扁率项)
定义 EphemerisVinti.hpp:42
坐标系抽象基类
定义 Frame.hpp:74
点抽象基类
定义 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
Frame * aFrameECI()
地球惯性系
定义 BuiltinFrame.cpp:28