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