🛰️航天仿真算法库 SpaceAST 0.4.0
载入中...
搜索中...
未找到
HPOP.hpp
浏览该文件的文档.
1
20
21#pragma once
22
23#include "AstGlobal.h"
24#include "AstUtil/Constants.hpp"
25#include "AstUtil/ScopedPtr.hpp"
26#include "AstUtil/Object.hpp"
27#include "AstUtil/ObjectNamed.hpp"
28#include "AstMath/ODEIntegrator.hpp"
29#include "AstCore/CelestialBody.hpp"
30#include "AstCore/StateMapper.hpp"
31#include "AstCore/OrbitElement.hpp"
32#include "AstCore/HPOPForceModel.hpp"
33#include "AstCore/SpacecraftParam.hpp"
34#include "AstCore/EventDetector.hpp"
35#include "AstCore/Frame.hpp"
36#include "AstCore/HPOPEquation.hpp"
37#include <string>
38#include <vector>
39
40
41AST_NAMESPACE_BEGIN
42
48class HPOPStateMapper;
49
62class AST_CORE_API HPOP: public ObjectNamed
63{
64public:
65 AST_OBJECT(HPOP)
66
67 HPOP();
68 ~HPOP();
69public:
71 errc_t setForceModel(HPOPForceModel&& forcemodel);
72 errc_t setForceModel(const HPOPForceModel& forcemodel);
73
75 const HPOPForceModel& forceModel() const;
76
77 void setSpacecraftParam(const SpacecraftParam& spacecraftParam);
78
80 const SpacecraftParam& spacecraftParam() const;
81
83 Frame* propagationFrame() const;
84
86 errc_t setPropagationFrame(Frame* frame);
87
89 void setIntegrator(ODEIntegrator* integrator);
90
92 ODEIntegrator* getIntegrator() const;
93
101 errc_t propagate(const TimePoint& startTime, TimePoint& targetTime, Vector3d& position, Vector3d& velocity);
102 errc_t propagate(const TimePoint& startTime, TimePoint& targetTime, CartState& state){return propagate(startTime, targetTime, state.position(), state.velocity());}
103
104
112 errc_t propagate(const TimePoint& startTime, TimePoint& targetTime, CartState& state, Matrix6d& stm);
113
126 errc_t propagate(const TimePoint& startTime, TimePoint& targetTime,
127 CartState& state, Matrix6d& stm,
128 Vector6d& stateSensWrtDrag, Vector6d& stateSensWrtSRP);
129
131 errc_t initialize();
132
134 StateMapper* stateMapper() const;
135
138 void addEventDetector(EventDetector* eventDetector);
139
143 template<typename Func>
144 typename std::enable_if<!std::is_base_of<EventDetector, typename std::remove_pointer<Func>::type>::value, EventDetector*>::type
146 {
147 EventDetector* detector = new EventDetectorGeneric<Func>(func);
148 addEventDetector(detector);
149 return detector;
150 }
151
153 void clearEventDetectors();
154
156 HPOPEquation* equation() const{return equation_.get();}
157
159 HPOPEquation* ensureEquation() const;
160private:
166 errc_t integrateState(const TimePoint& startTime, TimePoint& targetTime, double* y);
167
169 HPOPStateMapper* stateMapperImpl() const;
170
171private:
172 HPOPForceModel forceModel_{};
173 SpacecraftParam spacecraftParam_{};
174 HFrame propagationFrame_{};
175
176 mutable ScopedPtr<HPOPEquation> equation_{};
177 mutable SharedPtr<ODEIntegrator> integrator_{};
178 ScopedPtr<StateMapper> stateMapper_{};
179};
180
181
184AST_NAMESPACE_END
直角坐标
定义 OrbitElement.hpp:53
泛型事件检测器
定义 EventDetector.hpp:110
事件检测基类 事件检测基类,用于检测事件是否发生。 参考orekit的EventDetector类
定义 EventDetector.hpp:39
坐标系抽象基类
定义 Frame.hpp:74
高精度轨道预报方程
定义 HPOPEquation.hpp:49
高精度轨道预报力模型
定义 HPOPForceModel.hpp:49
定义 HPOP.cpp:37
高精度轨道预报器
定义 HPOP.hpp:63
std::enable_if<!std::is_base_of< EventDetector, typenamestd::remove_pointer< Func >::type >::value, EventDetector * >::type addEventDetector(Func func)
添加事件检测器(泛型模板)
定义 HPOP.hpp:145
HPOPEquation * equation() const
获取高精度轨道预报方程(可能为 nullptr)
定义 HPOP.hpp:156
ODE 积分器
定义 ODEIntegrator.hpp:88
命名对象
定义 ObjectNamed.hpp:36
航天器参数
定义 SpacecraftParam.hpp:34
状态映射器
定义 StateMapper.hpp:39
绝对时间点
定义 TimePoint.hpp:109
SharedPtr< Frame > HFrame
坐标系句柄(handle to frame)
定义 Frame.hpp:182