🛰️航天仿真算法库 SpaceAST 0.4.0
载入中...
搜索中...
未找到
MSISBase.hpp
浏览该文件的文档.
1
20
21#pragma once
22
23#include "AstGlobal.h"
24#include "AtmosphereBase.hpp"
25#include "AstCore/ConstantSpaceWeather.hpp"
26#include "AstUtil/ScopedPtr.hpp"
27#include <type_traits>
28#include <array>
29
30
31typedef struct msisrecord msistype;
32typedef struct lpolyrecord lpolytype;
33typedef struct fitrecord fittype;
34typedef struct lsqvrecord lsqvtype;
35
36
37
38AST_NAMESPACE_BEGIN
39
46class AST_CORE_API MSISBase : public AtmosphereBase
47{
48public:
49 class WorkSpace;
50 using ApArray = std::array<double, 7>;
51
52 MSISBase(Frame* frame, BodyShape* bodyShape, double f107Daily, double f107Average, double ap);
53 MSISBase(Frame* frame, BodyShape* bodyShape, SpaceWeatherProvider* spaceWeather);
54 ~MSISBase();
55
56 A_DISABLE_COPY(MSISBase)
57
58 void setSpaceWeatherProvider(SpaceWeatherProvider* spaceWeather);
59 void setConstantSpaceWeather(double f107Daily, double f107Average, double ap);
60 bool useDailyAp() const { return useDailyAp_; }
61 void setUseDailyAp(bool useDailyAp);
62
63 static SpaceWeatherProvider* NewConstantSpaceWeather(double f107Daily, double f107Average, double ap);
64protected:
65 WorkSpace& workSpace() const { return *reinterpret_cast<WorkSpace*>(&storage_); }
66 msistype& msis() const;
67 lpolytype& lpoly() const;
68 fittype& fit() const;
69 lsqvtype& lsqv() const;
70protected:
71 struct MSISParam
72 {
73 int dayOfYear;
74 double secOfDay;
75 double lst;
76 double alt; // [km]
77 double lat; // [deg]
78 double lon; // [deg]
79 double f107A;
80 double f107;
81 ApArray ap;
82 static constexpr int mass = 48;
83 };
84 static void getTimeParam(const TimePoint& tp, double lon, int& dayOfYear, double& secOfDay, double& lst);
85 void getMSISParam(const TimePoint& tp, const Vector3d& posInBodyFixed, MSISParam& param) const;
86 void getSpaceWeather(const TimePoint& tp, double& f107, double& f107Average, ApArray& aparray) const;
87protected:
89private:
90 mutable std::aligned_storage<57000>::type storage_{};
91 bool useDailyAp_{true};
92};
93
96AST_NAMESPACE_END
定义 AtmosphereBase.hpp:37
天体形状基类
定义 BodyShape.hpp:33
坐标系抽象基类
定义 Frame.hpp:74
定义 MSISBase.cpp:34
MSIS86大气模型基类
定义 MSISBase.hpp:47
ScopedPtr< SpaceWeatherProvider > spaceWeather_
空间天气数据源
定义 MSISBase.hpp:88
作用域指针类
定义 ScopedPtr.hpp:65
空间天气数据提供者抽象接口
定义 SpaceWeatherProvider.hpp:43
绝对时间点
定义 TimePoint.hpp:109
定义 MSISBase.hpp:72
定义 MSIS_Vers.h:82
定义 MSIS_Vers.h:87
定义 MSIS_Vers.h:76
定义 MSIS_Vers.h:125