24#include "AstMath/ODEEventDetector.hpp"
25#include "AstUtil/ObjectNamed.hpp"
32class ODEEventDetector;
43 AST_PROPERT(repeatCount)
44 AST_PROPERT(threshold)
63 virtual bool isAngle()
const {
return false;}
73 EDirection direction()
const {
return direction_;}
74 void setDirection(EDirection dir) {direction_ = dir;}
78 bool active()
const {
return active_;}
79 void setActive(
bool active) {active_ = active;}
81 int repeatCount()
const {
return repeatCount_;}
82 void setRepeatCount(
int count) {repeatCount_ = count;}
85 double threshold()
const {
return threshold_;}
86 void setThreshold(
double threshold) {threshold_ = threshold;}
88 double goal()
const {
return goal_;}
89 void setGoal(
double goal) {goal_ = goal;}
94 EDirection direction_{EDirection::eBoth};
95 double threshold_{1e-10};
102template<
typename Func>
107 : func_(std::move(func))
111 return func_(state, t);
泛型事件检测器
定义 EventDetector.hpp:104
double getValue(const SpacecraftState &state, double t) const override
获取事件检测开关函数的值
定义 EventDetector.hpp:110
事件检测基类 事件检测基类,用于检测事件是否发生。 参考orekit的EventDetector类
定义 EventDetector.hpp:38
virtual double getValue(const SpacecraftState &state, double t) const =0
获取事件检测开关函数的值
virtual bool isAngle() const
是否为角度事件检测器
定义 EventDetector.hpp:63
virtual double getDifference(const SpacecraftState &state, double t) const
获取事件检测开关函数与目标值的差值
定义 EventDetector.hpp:53
ODE积分的事件检测器
定义 ODEEventDetector.hpp:36
EDirection
事件检测开关函数的条件
定义 ODEEventDetector.hpp:40
命名对象
定义 ObjectNamed.hpp:36
航天器状态,包含轨道状态、质量、面积、阻力系数、光压、密度、压力、温度等属性
定义 SpacecraftState.hpp:38