🛰️航天仿真算法库 SpaceAST 0.4.0
载入中...
搜索中...
未找到
AtmosphereBase.hpp
浏览该文件的文档.
1
20
21#pragma once
22
23#include "AstGlobal.h"
24#include "Atmosphere.hpp"
25#include "AstUtil/I18n.hpp"
26
27AST_NAMESPACE_BEGIN
28
34constexpr const char* kInfoInvalidHeight = N_("高度低于 %d km, 该模型不适用, 返回无效值");
35
36class AST_CORE_API AtmosphereBase: public Atmosphere
37{
38public:
39 AtmosphereBase(Frame* frame, BodyShape* bodyShape);
40 ~AtmosphereBase() override = default;
41
42 AtmosphereBase(const AtmosphereBase&) = delete;
43 AtmosphereBase& operator=(const AtmosphereBase&) = delete;
44
49 double getDensity(const TimePoint& tp, const Vector3d& posInBodyFixed) const override = 0;
50
52 Frame* getFrame() const override{return frame_;}
53
55 BodyShape* getShape() const override {return bodyShape_;}
56public:
58 bool useApproximateAltitude() const {return useApproximateAltitude_;}
59
61 void setUseApproximateAltitude(bool useApproximateAltitude) {useApproximateAltitude_ = useApproximateAltitude;}
62
68 void getGeodetic(const Vector3d& posInBodyFixed, double& latitude, double& longitude, double& altitude) const;
69
73 double getAltitude(const Vector3d& posInBodyFixed) const;
74protected:
75 Frame* frame_{nullptr};
76 BodyShape* bodyShape_{nullptr};
77 bool useApproximateAltitude_{false};
78};
79
82AST_NAMESPACE_END
定义 AtmosphereBase.hpp:37
BodyShape * getShape() const override
获取大气模型对应天体形状
定义 AtmosphereBase.hpp:55
Frame * getFrame() const override
获取大气模型的参考坐标系
定义 AtmosphereBase.hpp:52
bool useApproximateAltitude() const
是否使用近似高度计算
定义 AtmosphereBase.hpp:58
void setUseApproximateAltitude(bool useApproximateAltitude)
设置是否使用近似高度计算
定义 AtmosphereBase.hpp:61
double getDensity(const TimePoint &tp, const Vector3d &posInBodyFixed) const override=0
获取大气密度
大气模型基类
定义 Atmosphere.hpp:48
天体形状基类
定义 BodyShape.hpp:33
坐标系抽象基类
定义 Frame.hpp:74
绝对时间点
定义 TimePoint.hpp:109