🛰️航天仿真算法库 SpaceAST 0.0.1
载入中...
搜索中...
未找到
Propagate.hpp
浏览该文件的文档.
1
20
21#pragma once
22
23#include "AstGlobal.h"
24#include "MissionCommand.hpp"
25#include "Segment.hpp"
26#include "AstCore/HPOP.hpp"
27#include "AstCore/EventDetector.hpp"
28
29
30AST_NAMESPACE_BEGIN
31
38class AST_CORE_API Propagate: public Segment
39{
40public:
41 AST_OBJECT(Propagate)
42 AST_PROPERT(minPropTime)
43 AST_PROPERT(maxPropTime)
44 AST_PROPERT(useMaxPropTime)
45 AST_PROPERT(useMaxPropTimeWarn)
46 AST_PROPERT(overrideMaxPropTime)
47 Propagate();
48 ~Propagate() = default;
49
52 {
53 eBackward = -1,
54 eAuto = 0,
55 eForward = 1,
56 };
57public:
58 errc_t execute() override;
59public:
60 HPOP* propagator() const { return propagator_.get(); }
61 void setPropagator(HPOP* propagator) { propagator_ = propagator; }
62 void addEventDetector(EventDetector* eventDetector) { eventDetectors_.push_back(eventDetector); }
63 EventDetector* getEventDetector(StringView name) const;
64 const std::vector<SharedPtr<EventDetector>>& eventDetectors() const { return eventDetectors_; }
65 void setEventDetectors(const std::vector<SharedPtr<EventDetector>>& eventDetectors) { eventDetectors_ = eventDetectors; }
66
67 EDirection direction() const { return direction_; }
68 void setDirection(EDirection direction) { direction_ = direction; }
69PROPERTIES:
70 double minPropTime() const { return minPropTime_; }
71 void setMinPropTime(double minPropTime) { minPropTime_ = minPropTime; }
72
73 double maxPropTime() const { return maxPropTime_; }
74 void setMaxPropTime(double maxPropTime) { maxPropTime_ = maxPropTime; }
75
76 bool useMaxPropTime() const { return useMaxPropTime_; }
77 void setUseMaxPropTime(bool useMaxPropTime) { useMaxPropTime_ = useMaxPropTime; }
78
79 bool useMaxPropTimeWarn() const { return useMaxPropTimeWarn_; }
80 void setUseMaxPropTimeWarn(bool useMaxPropTimeWarn) { useMaxPropTimeWarn_ = useMaxPropTimeWarn; }
81
82 bool overrideMaxPropTime() const { return overrideMaxPropTime_; }
83 void setOverrideMaxPropTime(bool overrideMaxPropTime) { overrideMaxPropTime_ = overrideMaxPropTime; }
84private:
85 WeakPtr<HPOP> propagator_;
86 std::vector<SharedPtr<EventDetector>> eventDetectors_;
87 double minPropTime_{0};
88 double maxPropTime_{8640000};
89 bool useMaxPropTime_{true};
90 bool useMaxPropTimeWarn_{true};
91 bool overrideMaxPropTime_{true};
92 EDirection direction_{eAuto};
93};
94
95
96
97
100AST_NAMESPACE_END
高精度轨道预报器
定义 HPOP.hpp:47
预报段,用于建模任务序列(MissionCommand)中的轨道预报
定义 Propagate.hpp:39
EDirection
预报方向
定义 Propagate.hpp:52
轨道段(虚基类),用于描述任务序列中的轨道段,例如初始状态段、轨道机动段、轨道预报段等
定义 Segment.hpp:45
virtual errc_t execute() override=0
执行任务