24#include "AstCore/CelestialBody.hpp"
25#include "AstCore/TimePoint.hpp"
26#include "AstCore/TimeInterval.hpp"
27#include "AstCore/Point.hpp"
28#include "AstCore/Frame.hpp"
49 CelestialBody* getObstruction()
const {
return obstruction_.get(); }
50 const TimePoint& getPenumbraStart()
const {
return penumbraStart_; }
51 const TimePoint& getUmbraStart()
const {
return umbraStart_; }
52 const TimePoint& getUmbraStop()
const {
return umbraStop_; }
53 const TimePoint& getPenumbraStop()
const {
return penumbraStop_; }
54 double getMaxShadowRatio()
const {
return maxShadowRatio_; }
55 const TimePoint& getTimeAtMaxShadow()
const {
return timeAtMaxShadow_; }
56 bool hasUmbra()
const {
return hasUmbra_; }
62 double getUmbraDuration()
const {
return umbraStop_ - umbraStart_; }
64 double getPenumbraDuration()
const {
return (umbraStart_ - penumbraStart_) + (penumbraStop_ - umbraStop_); }
71 return b ? b->
getName() : std::string{};
82 void setPenumbraStart(
const TimePoint& t) { penumbraStart_ = t; }
83 void setUmbraStart(
const TimePoint& t) { umbraStart_ = t; }
84 void setUmbraStop(
const TimePoint& t) { umbraStop_ = t; }
85 void setPenumbraStop(
const TimePoint& t) { penumbraStop_ = t; }
86 void setMaxShadowRatio(
double r) { maxShadowRatio_ = r; }
87 void setTimeAtMaxShadow(
const TimePoint& t) { timeAtMaxShadow_ = t; }
88 void setHasUmbra(
bool b) { hasUmbra_ = b; }
93 TimePoint penumbraStart_{};
94 TimePoint umbraStart_{};
95 TimePoint umbraStop_{};
96 TimePoint penumbraStop_{};
97 double maxShadowRatio_{0.0};
98 TimePoint timeAtMaxShadow_{};
99 bool hasUmbra_{
false};
116 void setPoint(
Point* p) { point_ = p; }
118 void setOccultingBodies(
const std::vector<HCelestialBody>& bodies) { occultingBodies_ = bodies; }
119 void setStepSize(
double s) { stepSize_ =
s; }
128 errc_t find(
const TimeInterval& interval, std::vector<EclipseEvent>& events)
const;
133 std::vector<HCelestialBody> occultingBodies_{};
134 double stepSize_{60.0};
天体
定义 CelestialBody.hpp:72
日食事件求解器
定义 EclipseEventFinder.hpp:106
单个日食事件
定义 EclipseEventFinder.hpp:45
double getMinIntensity() const
最小光照强度 [0,1](= 1 - 最大遮蔽比例)
定义 EclipseEventFinder.hpp:74
std::string getObstructionName() const
遮挡体名称(无遮挡体时为空串)
定义 EclipseEventFinder.hpp:68
double getTotalDuration() const
总遮蔽时长 [s]
定义 EclipseEventFinder.hpp:66
double getPenumbraDuration() const
半影时长 [s](进入段 + 退出段之和;掠影时退化为单段半影)
定义 EclipseEventFinder.hpp:64
const TimePoint & getTimeAtMinIntensity() const
最小光照强度时刻(= 最大遮蔽时刻)
定义 EclipseEventFinder.hpp:76
const std::string & getName() const override
获取对象名称
定义 ObjectNamed.hpp:48
时间区间
定义 TimeInterval.hpp:64
绝对时间点
定义 TimePoint.hpp:108
WCelestialBody WBody
天体弱引用
定义 CelestialBody.hpp:476