Generated reference › Aerodynamic Forces And Moments — Robotics/Aerodynamics
kind: generated#block#robotics-aerodynamics

Aerodynamic Forces And Moments — Robotics/Aerodynamics

Robotics/Aerodynamics/Aerodynamic_Forces_And_Moments · 4 input / 2 output port(s) at insert · exports to Python, MATLAB, Java, Rust, C, C++, VHDL, Verilog, SystemVerilog, PLC Structured Text

Description#

The block's own DESCRIPTION_HTML, rendered verbatim — the same text the config dialog's info panel and the library navigator show. Fix a wrong sentence in the block's .cpp (R-D9), never here.

Aerodynamic Forces and Moments

Robotics / Aerodynamics

Turns non-dimensional aerodynamic coefficients into body-axis forces and moments about the centre of gravity:

F = q̄·S·[CX; CY; CZ]
M = q̄·S·[b·Cl; c̄·Cm; b·Cn] + F × (CG − CP)

The coefficients are taken about the centre of pressure CP; the cross product carries the moment over to the centre of gravity CG, which is where the equations of motion want it. The order is F × d with d = CG − CP – the other order negates the whole transfer term.

Ports

  • C – the six coefficients, a [6,1] column [CX; CY; CZ; Cl; Cm; Cn]: three force coefficients then three moment coefficients, all in body axes.
  • qbar – the dynamic pressure q̄, [1,1]. A Dynamic Pressure block makes it from the velocity and density.
  • CG – the centre of gravity, [3,1], in body axes.
  • CP – the centre of pressure, [3,1], in the same axes and units as CG.
  • F – the forces, [3,1], body axes.
  • M – the moments about CG, [3,1], body axes.

Parameters

  • Reference Area – S, the wing reference area.
  • Reference Span – b, which scales the rolling and yawing moments Cl and Cn.
  • Reference Length – c̄, the mean aerodynamic chord, which scales the pitching moment Cm.
  • Sampling Time (s) – zero or less inherits the solver's rate; a positive value runs the block at that period.

Any consistent unit system works: S in m² with q̄ in Pa gives newtons, and so on. The block computes rather than judges, so a negative q̄ or reference value is used as given.

Code export

All ten targets: Python, MATLAB, Java, Rust, C, C++, VHDL, Verilog, SystemVerilog and PLC Structured Text. S, b and c̄ are inlined as constants.

The three HDL targets are genuinely synthesizable Q16.16: multiplies and adds only. Mind the range: q̄·S is the scale of every force, and a full-size aircraft's forces in newtons leave the ±32767 a Q16.16 word holds, so scale them before they arrive.

Simulink bridge

Import and export, mapped to Aerospace Blockset's aerolibadyn/Aerodynamic Forces and Moments (drawn on two lines, and its library name ends in a space – the path carries both). Reference Area → S, Reference Span → b, Reference Length → c̄ (cbar). The three axis settings are fixed at Body (inputAxes, outputForceAxes, outputMomentAxes): any other choice gives the Simulink block a fifth input port, the body velocity, which this block does not have, so such a block is reported on import rather than brought in with the wrong ports. The Simulink block defines no SampleTime (measured), so a positive Sampling Time (s) stays on this side and is reported.

Notes

  • Algebraic and stateless: every output depends on this sample alone.
  • Not linear – products of two inputs – so there is no state space, and model reduction correctly declines to merge it.
  • Verified against R2026a: at C = [0.3 −0.2 0.5 0.04 −0.07 0.02], q̄ = 1234.5, CG = [0.4 −0.1 0.2], CP = [0.9 0.05 −0.15], S = 2.5, b = 3.1, c̄ = 0.7, both blocks give F = [925.875 −617.25 1543.125] and M = [398.12625 −1246.845 −256.15875].

Code facts#

FactValue
registered typeRobotics/Aerodynamics/Aerodynamic_Forces_And_Moments
familyRobotics/Aerodynamics
solver environment classICoreBlock_0_Robotics_1_Aerodynamics_2_Aerodynamic_Forces_And_Moments
sourcesrc/ICoreBlocks/ICoreBlockLibrary/Blocks/Robotics/Aerodynamics/Aerodynamic_Forces_And_Moments/ICoreBlock_0_Robotics_1_Aerodynamics_2_Aerodynamic_Forces_And_Moments.cpp
headersrc/ICoreBlocks/ICoreBlockLibrary/Blocks/Robotics/Aerodynamics/Aerodynamic_Forces_And_Moments/ICoreBlock_0_Robotics_1_Aerodynamics_2_Aerodynamic_Forces_And_Moments.h
default size on canvas150 × 110 px
ports at insert4 in, 2 out
code generators implementedPython, MATLAB, Java, Rust, C, C++, VHDL, Verilog, SystemVerilog, PLC Structured Text

Ports#

#DirectionSignal typeDescription label
1inICoreDoubleC
2inICoreDoubleqbar
3inICoreDoubleCG
4inICoreDoubleCP
5outICoreDoubleF
6outICoreDoubleM

Ports the constructor creates. A block whose port list changes with its configuration adds or removes ports at load time; the count above is the one a freshly inserted block has.

Configuration variables#

Config variableDefaultSimulink parameter
Reference Area1S
Reference Span1b
Reference Length1cbar

Every block also carries Sampling Time (s) from ICoreBlockSolverEnvironment: zero or less inherits the solver's rate, a positive value runs the block at that period.

supportSupport::Both
Simulink pathaerolibadyn/Aerodynamic\nForces and Moments
port-count rulePortsParam::None
SampleTime parameterno — the counterpart defines none; the rate stays on the ICore side
always setinputAxes = Body, outputForceAxes = Body, outputMomentAxes = Body
ICore configSimulink parameterValue translation
Reference AreaSpasses through
Reference Spanbpasses through
Reference Lengthcbarpasses through

Caveat (shown to the user): C, qbar, CG and CP are the four ports in Simulink's order. The three axis settings are fixed at Body: any other choice adds a fifth input port (the body velocity) that this block does not have, so such a block is reported on import. The Simulink block defines no SampleTime (measured), so the rate stays on the ICore side

Catalog contract: src/ICoreBlocks/ICoreCoder/ICoreCommandSystem/SimulinkBridge/ICoreSimulinkBlockCatalog.h

Description vs code#

The checker has a blind spot here — it could not resolve something (a grouped port bullet, a computed config name), which is reported and never counted as a pass. A reader has to settle it:

  • B0 no sample under docs/generated/samples/ — nothing to cross-check (P8.1)

The verdict above is tools/docs/check_block_descriptions.py (P7.1), which compares LISTS. It cannot read a sentence: "stateless" on a block with a state, an initial-value semantic the recursion does not implement, a "not synthesizable" caveat the HDL banner contradicts. That is the agent audit (P7.3) on BLOCK_DESCRIPTION_AUDIT.md, and this tool's green is not a substitute for one.

File banner (developer view)#

The top comment of the block's .cpp — the maths, the realization and the export strategy, addressed to whoever changes it. It must not contradict the description above (P7.5).

Aerodynamic Forces and Moments -- coefficients to body-axis forces and moments F = qbar*S * [CX; CY; CZ] M = qbar*S * [b*Cl; cbar*Cm; b*Cn] + F x (CG - CP)

Aerospace Blockset's aerolibadyn/Aerodynamic Forces and Moments, read out of the masked subsystem: the coefficient vector is split 3 + 3; the first three go through a coefAdjust Gain of [1 1 1] (Body axes) and are scaled by qbar*S; the last three are scaled by qbar*S*[b; cbar; b]; and a 3x3 Cross Product with A = the forces and B = CG - CP adds the moment transfer from the centre of pressure to the centre of gravity.

MEASURED AGAINST R2026a: with coefficients [0.3 -0.2 0.5 0.04 -0.07 0.02], qbar = 1234.5, CG = [0.4 -0.1 0.2], CP = [0.9 0.05 -0.15], S = 2.5, b = 3.1, cbar = 0.7, the block answers F = [925.875 -617.25 1543.125] and M = [398.12625 -1246.845 -256.15875], and the two expressions above reproduce both by hand -- which is what pins the ORDER of the cross product (F x d, not d x F: the other order negates the whole transfer term).

⚠ ALL-BODY ONLY. Any of the mask's three axis settings at Stability or Wind gives the Simulink block a FIFTH input (the body velocity, for alpha and beta) -- measured, 4 -> 5 ports on every such combination -- and the bridge has no way to say that a parameter moves a port. The three settings are pinned to Body as fixed parameters instead, so an import using another arrangement is reported rather than brought in with the wrong port list.

Sample results#

No sample run is committed for this block. Samples come from the headless harness (DOCS_PLAN.md P8.1) into docs/generated/samples/; until one exists this block's behaviour is witnessed by the parity and export-verification suites, not by a plot here.