🛰️航天仿真算法库 SpaceAST 0.3.1
载入中...
搜索中...
未找到
BlockDrag.hpp
浏览该文件的文档.
1
20
21#pragma once
22
23#include "AstGlobal.h"
24#include "AstCore/BlockDerivative.hpp"
25#include "AstCore/Atmosphere.hpp"
26#include "AstMath/Vector.hpp"
27
28AST_NAMESPACE_BEGIN
29
56class AST_CORE_API BlockDrag: public BlockDerivative
57{
58public:
59 BlockDrag();
60
61 BlockDrag(const BlockDrag&) = delete;
62 BlockDrag& operator=(const BlockDrag&) = delete;
63
64 BlockDrag(Atmosphere* atmosphere, double dragCoefficient, double dragArea, Frame* propagationFrame);
65
66 ~BlockDrag() override;
67
68 errc_t run(const SimTime& simTime) override;
69public:
71 void setCoefficient(double cd){dragCoefficient_ = cd;};
73 double coefficient() const { return dragCoefficient_; }
74protected:
75 Vector3d* position_{&vectorBuffer_};
76 Vector3d* velocity_{&vectorBuffer_};
77 Vector3d* accDrag_{&vectorBuffer_};
78 Vector3d* velocityDerivative_{&vectorBuffer_};
79 double* mass_{&doubleBuffer_};
80 double doubleBuffer_{};
81 Vector3d vectorBuffer_{};
82protected:
83 Atmosphere* atmosphere_{};
84 double dragCoefficient_{};
85 double dragArea_{};
86 Frame* propagationFrame_{};
87};
88
89
90AST_NAMESPACE_END
大气模型基类
定义 Atmosphere.hpp:48
导数函数块
定义 BlockDerivative.hpp:46
大气阻力函数块
定义 BlockDrag.hpp:57
void setCoefficient(double cd)
设置阻力系数
定义 BlockDrag.hpp:71
double coefficient() const
获取阻力系数
定义 BlockDrag.hpp:73
坐标系抽象基类
定义 Frame.hpp:74
virtual errc_t run(const SimTime &simTime)=0
计算函数块
仿真时间
定义 SimTime.hpp:30