🛰️航天仿真算法库 SpaceAST 0.0.1
载入中...
搜索中...
未找到
ast::BlockTwoBodyPartial类 参考

#include <BlockTwoBodyPartial.hpp>

+ 类 ast::BlockTwoBodyPartial 继承关系图:

Public 成员函数

 BlockTwoBodyPartial (const BlockTwoBodyPartial &)=delete
 
BlockTwoBodyPartialoperator= (const BlockTwoBodyPartial &)=delete
 
 BlockTwoBodyPartial (double twoBodyGM)
 
errc_t run (const SimTime &simTime) override
 
- Public 成员函数 继承自 ast::BlockTwoBody
 BlockTwoBody (const BlockTwoBody &)=delete
 
BlockTwoBodyoperator= (const BlockTwoBody &)=delete
 
 BlockTwoBody (double twoBodyGM)
 
- Public 成员函数 继承自 ast::BlockDerivative
 ~BlockDerivative () override=default
 
const std::vector< DataPort > & getDerivativePorts () const
 
std::vector< DataPort > & getDerivativePorts ()
 
- Public 成员函数 继承自 ast::FuncBlock
const std::vector< DataPort > & getInputPorts () const
 
std::vector< DataPort > & getInputPorts ()
 
const std::vector< DataPort > & getOutputPorts () const
 
std::vector< DataPort > & getOutputPorts ()
 
size_t getNumInputPorts () const
 
size_t getNumOutputPorts () const
 
DataPortgetInputPort (StringView portName)
 
DataPortgetOutputPort (StringView portName)
 
DataPortgetInputPort (size_t portIndex)
 
DataPortgetOutputPort (size_t portIndex)
 
DataPort::EValueType getInputPortDataType (size_t portIndex)
 
DataPort::EValueType getOutputPortDataType (size_t portIndex)
 
void * getInputPortSignal (size_t portIndex)
 
void * getOutputPortSignal (size_t portIndex)
 
double * getInputPortRealSignal (size_t portIndex)
 
double * getOutputPortRealSignal (size_t portIndex)
 
int getInputPortWidth (size_t portIndex)
 
int getOutputPortWidth (size_t portIndex)
 

额外继承的成员函数

- 静态 Public 成员函数 继承自 ast::FuncBlock
static errc_t connect (FuncBlock *src, StringView srcPortName, FuncBlock *dst, StringView dstPortName)
 
static errc_t connect (FuncBlock *src, size_t srcPortIndex, FuncBlock *dst, size_t dstPortIndex)
 
- Protected 属性 继承自 ast::BlockTwoBody
Vector3d * posCBI
 
Vector3d * accTwoBody
 
Vector3d * velocityDerivative_ {&vectorBuffer}
 
Vector3d vectorBuffer
 
AST_PROPERTIES : double twoBodyGM_
 
- Protected 属性 继承自 ast::BlockDerivative
std::vector< DataPortderivativePorts_ {}
 
- Protected 属性 继承自 ast::FuncBlock
std::vector< DataPortinputPorts_ {}
 
std::vector< DataPortoutputPorts_ {}
 

详细描述

二体引力偏导数(梯度)函数块

继承 BlockTwoBody,在其基础上增加点质量引力梯度计算。 重写 run():计算二体引力加速度的同时计算梯度张量, 将 ∂a_2body/∂r 累加到 A 矩阵的 bottom-left 3×3 位置。

A 矩阵布局(6×6,行优先): ┌ ┐ │ 0 I │ rows 0-2: 位置运动学 │ ∂a/∂r 0 │ rows 3-5: 加速度偏导数 └ ┘ ↑ 本块写入 ∂a/∂r (rows 3-5, cols 0-2) 二体引力与速度无关,∂a/∂v = 0

点质量引力梯度张量: ∂a/∂r = GM · (3·r·rᵀ/r⁵ − I/r³)

输入端口(继承):

  • "Pos":位置向量(3维,继承自 BlockTwoBody)

输出端口(继承 + 新增):

  • "AccTwoBody":二体引力加速度(3维,继承自 BlockTwoBody)
  • "AMatrix":动力学雅可比矩阵 A(t)(36维,新增,本块累加 ∂a/∂r 分量)

导数端口(继承):

  • "Vel":速度导数(3维),累加二体引力加速度
注解
可替换 BlockTwoBody 使用,提供梯度计算的同时保持原有加速度输出
参见
BlockTwoBody, BlockStateTransitionMatrix

成员函数说明

◆ run()

errc_t ast::BlockTwoBodyPartial::run ( const SimTime & simTime)
overridevirtual

计算函数块

参数
simTime仿真时间
返回
错误码

重载 ast::BlockTwoBody .


该类的文档由以下文件生成: