🛰️航天仿真算法库 SpaceAST 0.0.1
载入中...
搜索中...
未找到
SpaceWeather.hpp
浏览该文件的文档.
1
20
21#pragma once
22
23#include "AstGlobal.h"
24#include "AstUtil/StringView.hpp"
26#include <vector>
27
28AST_NAMESPACE_BEGIN
29
39class AST_CORE_API SpaceWeather: public SpaceWeatherProvider
40{
41public:
43 struct Entry{
44 int mjd;
45 int BSRN;
46 int ND;
47 int Kp[8];
48 int KpSum;
49 int Ap[8];
50 int ApAvg;
51 double Cp;
52 int C9;
53 int ISN;
54 int fluxQualifier;
55 double F10p7Adj;
56 double F10p7AdjCtr81;
57 double F10p7AdjLst81;
58 double F10p7Obs;
59 double F10p7ObsCtr81;
60 double F10p7ObsLst81;
61 };
62 SpaceWeather() = default;
63 ~SpaceWeather() = default;
64
67 errc_t loadDefault();
68
72 errc_t load(StringView filepath);
73
75 size_t size() const { return data_.size(); }
76
81 const Entry* getEntry(int mjd) const;
82
87 errc_t setEntry(int mjd, const Entry& entry);
88
89public:
93 double getApDaily(const TimePoint& tp) const override;
94
98 double getApDaily_UTCMJD(double mjdUTC) const;
99
105 int getAp3HourlyList(const TimePoint& tp, double* apList, int maxLookback) const override;
106
110 double getKpDaily(const TimePoint& tp) const override;
111
115 double getKpDaily_UTCMJD(double mjdUTC) const;
116
117
121 double getF10p7Daily(const TimePoint& tp) const override;
122
126 double getF10p7Daily_UTCMJD(double mjdUTC) const;
127
128
132 double getF10p7Average(const TimePoint& tp) const override;
133
137 double getF10p7Average_UTCMJD(double mjdUTC) const;
138
143 static errc_t load(StringView filepath, std::vector<Entry>& data);
144
145protected:
146 void findEntryIndex(double mjdUTC, int& index, double& frac) const;
147
148 void findFluxIndex(double mjdUTC, int& index, double& frac) const;
149
150protected:
151 std::vector<Entry> data_;
152 int startMJD_ = 0;
153 int endMJD_ = 0;
154};
155
158AST_NAMESPACE_END
空间天气数据提供者抽象接口
空间天气数据提供者抽象接口
定义 SpaceWeatherProvider.hpp:43
virtual double getKpDaily(const TimePoint &tp) const =0
获取指定时间的Kp日平均值
virtual double getApDaily(const TimePoint &tp) const =0
获取指定时间的Ap日平均值
virtual double getF10p7Average(const TimePoint &tp) const =0
获取指定时间的F10.7平均观测值
virtual int getAp3HourlyList(const TimePoint &tp, double *apList, int maxLookback) const
获取从指定时间向前回溯的连续3小时间隔Ap值列表
定义 SpaceWeatherProvider.hpp:73
virtual double getF10p7Daily(const TimePoint &tp) const =0
获取指定时间的F10.7单日观测值
空间天气数据
定义 SpaceWeather.hpp:40
size_t size() const
获取数据大小
定义 SpaceWeather.hpp:75
绝对时间点
定义 TimePoint.hpp:107
空间天气数据条目
定义 SpaceWeather.hpp:43