🛰️航天仿真算法库 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
28
AST_NAMESPACE_BEGIN
29
38
class
AST_CORE_API
JplSpk
39
{
40
public
:
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
;
107
protected
:
108
std::string spkfile_{};
109
int
handle_{0};
110
mutable
std::map<int, TimeInterval> intervalCache_{};
111
};
112
115
AST_NAMESPACE_END
ast::JplSpk
JPL SPK文件
定义
JplSpk.hpp:39
ast::JplSpk::handle
int handle() const
获取SPK文件句柄(CSPICE库返回的文件句柄)
定义
JplSpk.hpp:64
ast::JplSpk::getFilePath
const std::string & getFilePath() const
获取SPK文件路径
定义
JplSpk.hpp:60
ast::JplSpk::isOpen
bool isOpen() const
检查SPK文件是否已打开
定义
JplSpk.hpp:52
ast::StringViewBasic< char >
ast::TimeInterval
时间区间
定义
TimeInterval.hpp:64
ast::TimePoint
绝对时间点
定义
TimePoint.hpp:109
src
AstCore
Data
JplSpk.hpp
制作者
1.12.0