🛰️航天仿真算法库 SpaceAST 0.0.1
载入中...
搜索中...
未找到
JplSpk.hpp
浏览该文件的文档.
1
20
21#pragma once
22
23#include "AstGlobal.h"
24#include "AstCore/TimeInterval.hpp"
25#include <string>
26
27AST_NAMESPACE_BEGIN
28
37class AST_CORE_API JplSpk
38{
39public:
40 JplSpk();
41 JplSpk(StringView spkfile);
42 ~JplSpk();
43
47 errc_t open(StringView spkfile);
48
51 bool isOpen() const {return handle_ != 0;}
52
55 errc_t close();
56
59 const std::string& getFilePath() const {return spkfile_;}
60
63 int handle() const{return handle_;}
64
66 static errc_t getPosICRF(
67 const TimePoint& tp,
68 int target,
69 int referenceBody,
70 Vector3d& pos
71 );
72
74 static errc_t getPosVelICRF(
75 const TimePoint& tp,
76 int target,
77 int referenceBody,
78 Vector3d& pos,
79 Vector3d& vel
80 );
81
85 static std::string getBodyName(int id);
86
88 errc_t getInterval(
89 int target,
90 TimeInterval& interval
91 ) const;
92
96 errc_t getBodyNames(
97 std::vector<std::string>& names
98 ) const;
99
103 errc_t getBodyIds(
104 std::vector<int>& ids
105 ) const;
106protected:
107 std::string spkfile_;
108 int handle_{0};
109 mutable bool isIntervalCached_{false};
110 mutable TimeInterval intervalCache_{};
111};
112
115AST_NAMESPACE_END
JPL SPK文件
定义 JplSpk.hpp:38
int handle() const
获取SPK文件句柄(CSPICE库返回的文件句柄)
定义 JplSpk.hpp:63
std::string spkfile_
SPK文件路径
定义 JplSpk.hpp:107
const std::string & getFilePath() const
获取SPK文件路径
定义 JplSpk.hpp:59
bool isOpen() const
检查SPK文件是否已打开
定义 JplSpk.hpp:51
时间区间
定义 TimeInterval.hpp:59
绝对时间点
定义 TimePoint.hpp:106