🛰️航天仿真算法库 SpaceAST 0.0.1
载入中...
搜索中...
未找到
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 void setSpaceWeatherProvider(SpaceWeatherProvider* spaceWeather);
57 void setConstantSpaceWeather(double f107Daily, double f107Average, double ap);
58 bool useDailyAp() const { return useDailyAp_; }
59 void setUseDailyAp(bool useDailyAp);
60
61 static SpaceWeatherProvider* NewConstantSpaceWeather(double f107Daily, double f107Average, double ap);
62protected:
63 WorkSpace& workSpace() const { return *reinterpret_cast<WorkSpace*>(&storage_); }
64 msistype& msis() const;
65 lpolytype& lpoly() const;
66 fittype& fit() const;
67 lsqvtype& lsqv() const;
68protected:
69 struct MSISParam
70 {
71 int dayOfYear;
72 double secOfDay;
73 double lst;
74 double alt; // [km]
75 double lat; // [deg]
76 double lon; // [deg]
77 double f107A;
78 double f107;
79 ApArray ap;
80 static constexpr int mass = 48;
81 };
82 static void getTimeParam(const TimePoint& tp, double lon, int& dayOfYear, double& secOfDay, double& lst);
83 void getMSISParam(const TimePoint& tp, const Vector3d& posInBodyFixed, MSISParam& param) const;
84 void getSpaceWeather(const TimePoint& tp, double& f107, double& f107Average, ApArray& aparray) const;
85protected:
87private:
88 mutable std::aligned_storage<57000>::type storage_;
89 bool useDailyAp_{false};
90};
91
94AST_NAMESPACE_END
定义 AtmosphereBase.hpp:34
天体形状基类
定义 BodyShape.hpp:33
坐标系类
定义 Frame.hpp:60
定义 MSISBase.cpp:34
MSIS86大气模型基类
定义 MSISBase.hpp:47
ScopedPtr< SpaceWeatherProvider > spaceWeather_
空间天气数据源
定义 MSISBase.hpp:86
作用域指针类
定义 ScopedPtr.hpp:65
空间天气数据提供者抽象接口
定义 SpaceWeatherProvider.hpp:43
绝对时间点
定义 TimePoint.hpp:107
定义 MSISBase.hpp:70
定义 MSIS_Vers.h:82
定义 MSIS_Vers.h:87
定义 MSIS_Vers.h:76
定义 MSIS_Vers.h:125