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

Digital DATCOM Forces And Moments — Robotics/Aerodynamics

Robotics/Aerodynamics/Digital_DATCOM_Forces_And_Moments · 8 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.

Digital DATCOM Forces and Moments

Robotics / Aerodynamics

Reads the stability and control coefficients a USAF Digital DATCOM run printed, looks them up at the flight condition, and turns them into forces and moments about the moment reference centre:

Cs = [CD, CYββ, CL, Clββ, Cm, Cnββ](α, M, h)
Cd = [0, CYpps, CLα̇α̇ + CLqqs, Clpps + Clrrs, Cmqqs + Cmα̇α̇, Cnpps + Cnrrs] · [1, b, c̄, b, c̄, b] / 2|V|
F = R(αV) · q̄S[−C0, C1, −C2], M = R(αV) · q̄S[bC3, c̄C4, bC5], C = Cs + Cd

The coefficients are per degree, so α, β and the rates enter in degrees; ps = p cosαV + r sinαV, qs = q − α̇ and rs = r cosαV − p sinαV are the stability-axis rates, αV the incidence of V and R(αV) the stability-to-body rotation. S, c̄ and b are the file's SREF, CBARR and BLREF. The dynamic part Cd exists only when the case carries the DAMP card.

Ports

  • alpha – the angle of attack α, radians, [1,1].
  • beta – the sideslip angle β, radians, [1,1].
  • Mach – the Mach number M, [1,1].
  • h – the altitude, metres (feet in the English units), [1,1].
  • qbar – the dynamic pressure q̄, pascals (psi in the English units), [1,1].
  • V – the velocity, [3,1], m/s (ft/s or knots): body axes, or wind axes when Force Axes is Wind, when it is first turned into body axes through the α and β inputs.
  • alpha_dot – α̇, rad/s, [1,1]. DAMP cases only.
  • pqr – the body rates [p; q; r], rad/s, [3,1]. DAMP cases only.
  • F – the forces, [3,1], newtons (pounds): body axes, or [Fx; Fy; Fz] in wind axes.
  • M – the moments, [3,1], N·m (ft·lb), always body axes.

The block has eight inputs on a fresh block. A case without the DAMP card takes six: remove the last two input ports, and the block says so if the count and the file disagree.

Parameters

  • DATCOM File – the path of the output file DATCOM wrote (for006.dat), 1976 version. Empty (the default) selects the built-in example: a made-up trainer, three Mach numbers, three altitudes and seven angles of attack, with the DAMP card, in DATCOM's own layout. The file is read the way MATLAB's datcomimport reads it: the breakpoints are the $FLTCON card values (MACH, ALT, ALSCHD) and S, c̄, b the $OPTINS ones; a page counts only under the card Mach and altitude that equal the ones it prints; and every cell no page filled, every blank and every NA reads 99999. Not read, and the block says which: a metric (DIM M) case, a case without $OPTINS, the BUILD, PART, TRIM and SAVE cards, and $GRNDEF.
  • Case – which case of the file, counting from 1 (default 1).
  • Units – the units of the ports:
    • Metric (MKS) (default) – newtons, N·m, metres, m/s, pascals.
    • English (Velocity in ft/s) – pounds, ft·lb, feet, ft/s, psi.
    • English (Velocity in kts) – the same with the velocity in knots.
  • Force Axes – Body (default) or Wind: the axes of F, and of the V input.
  • Interpolation Method – None - flat (default): the table entry at the breakpoint at or below the input (the last one once the input reaches it); Linear: linear along α, then M, then h.
  • Extrapolation Method – None - clip (default) or Linear: whether a Linear lookup continues the end segments past the table.
  • Process Out-of-Range Input – Clip to Range (default) or Linear Extrapolation: whether an input outside the breakpoints is clipped before the lookup.
  • Sampling Time (s) – zero or less inherits the solver's rate; a positive value runs the block at that period.

Code export

All ten targets: Python, MATLAB, Java, Rust, C, C++, VHDL, Verilog, SystemVerilog and PLC Structured Text. The case's tables and every setting are written into the exported code, so an export needs no file. The three HDL targets carry the arithmetic in real: simulation-only, and the forces must stay inside a Q16.16 port's ±32768 to be read from one.

Simulink bridge

Import and export, mapped to Aerospace Blockset's aerolibadyn/Digital DATCOM Forces and Moments (drawn on two lines). DATCOM File and Case cross together as the block's dcase, written as subsref(datcomimport('file',true,0),substruct('{}',{case})) and read back from that form; a dcase naming a workspace variable is reported on import, and the built-in example, having no file, is reported on export. Units → units, Force Axes → fmode, Interpolation Method → imethod, Extrapolation Method → emethod, Process Out-of-Range Input → rmethod, each one for one. action is always None: the Simulink block's warning or error on an out-of-range input has no counterpart here. The Simulink block defines no SampleTime parameter, measured, so the rate stays on the ICore side. The global Sampling Time (s) → SampleTime pair therefore does not cross.

Notes

  • Algebraic and stateless, and not linear, so there is no state space.
  • It reproduces, it does not repair. DATCOM prints a derivative that does not change with α once, on the first row, so CYβ, Cnβ, CLq and Cmq are 99999 at every other angle of attack – and the Simulink block multiplies that in. So does this one. Fill the column in the file to use a constant derivative.
  • Verified against R2026a: the reader against datcomimport, cell for cell, on MathWorks' two example files and nine synthetic ones (twelve cases); the arithmetic against the Simulink block within 1e-11 relative over 21 configurations – every unit system, both axes, both interpolations, every extrapolation pairing, per-degree and per-radian derivatives, one-point axes, inputs exactly on the breakpoints.

Code facts#

FactValue
registered typeRobotics/Aerodynamics/Digital_DATCOM_Forces_And_Moments
familyRobotics/Aerodynamics
solver environment classICoreBlock_0_Robotics_1_Aerodynamics_2_Digital_DATCOM_Forces_And_Moments
sourcesrc/ICoreBlocks/ICoreBlockLibrary/Blocks/Robotics/Aerodynamics/Digital_DATCOM_Forces_And_Moments/ICoreBlock_0_Robotics_1_Aerodynamics_2_Digital_DATCOM_Forces_And_Moments.cpp
headersrc/ICoreBlocks/ICoreBlockLibrary/Blocks/Robotics/Aerodynamics/Digital_DATCOM_Forces_And_Moments/ICoreBlock_0_Robotics_1_Aerodynamics_2_Digital_DATCOM_Forces_And_Moments.h
default size on canvas190 × 170 px
ports at insert8 in, 2 out
code generators implementedPython, MATLAB, Java, Rust, C, C++, VHDL, Verilog, SystemVerilog, PLC Structured Text

Ports#

#DirectionSignal typeDescription label
1inICoreDoubleIN_NAME[k]
2outICoreDoubleF
3outICoreDoubleM

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
DATCOM File—not crossed
Case1not crossed
UnitsMetric (MKS)%~%English (Velocity in ft/s)%~%English (Velo…units
Force AxesBody%~%Wind~~Bodyfmode
Interpolation MethodNone - flat%~%Linear~~None - flatimethod
Extrapolation MethodNone - clip%~%Linear~~None - clipemethod
Process Out-of-Range InputClip to Range%~%Linear Extrapolation~~Clip to Rangermethod

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/Digital DATCOM\nForces and Moments
port-count rulePortsParam::DatcomStructure
SampleTime parameterno — the counterpart defines none; the rate stays on the ICore side
deliberately not crossedDATCOM File, Case
always setaction = None
ICore configSimulink parameterValue translation
UnitsunitsMetric (MKS) → Metric (MKS), English (Velocity in ft/s) → English (Velocity in ft/s), English (Velocity in kts) → English (Velocity in kts)
Force AxesfmodeBody → Body, Wind → Wind
Interpolation MethodimethodNone - flat → None - flat, Linear → Linear
Extrapolation MethodemethodNone - clip → None - clip, Linear → Linear
Process Out-of-Range InputrmethodClip to Range → Clip to Range, Linear Extrapolation → Linear Extrapolation

Caveat (shown to the user): inputs alpha, beta, Mach, altitude, qbar and V, then alpha-dot and [p q r] when the case carries the DAMP card (six inputs without it -- Simulink decides from the struct, so the ICore block must have the matching count); outputs F and M. 'dcase' is written as subsref(datcomimport('<file>',true,0),substruct('{}',{<case>})) from DATCOM File and Case and read back from that form; a dcase naming a workspace variable cannot be read and is reported, and the built-in example (no file) cannot be written and is reported. 'action' is always None. The Simulink block has no SampleTime, 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 every stimulus in the sample errored — cross-checks skipped

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).

Digital DATCOM Forces and Moments -- a DATCOM output file to body forces and moments Aerospace Blockset's aerolibadyn/Digital DATCOM Forces and Moments looks the coefficients of a datcomimport struct up at the flight condition (alpha, Mach, altitude), adds the sideslip and -- with the DAMP card -- the rate derivatives, and turns the result into body forces and moments. ICore has no workspace struct, so this block READS THE FILE ITSELF, the way datcomimport does, and then does what the Simulink block does. Both halves were measured against R2026a and are written up in ICoreDatcomSupport.

Naming no file selects a built-in example (a made-up trainer in DATCOM's own layout), so the block runs at its factory configuration.

ALGEBRAIC and STATELESS, and nonlinear in its inputs, so no state space.

Sample results#

No stimulus produced a sampled output in this rig — Invalid input size at Digital DATCOM Forces and Moments block: ICore Blocks/Home/Digital DATCOM Forces And Moments. That is a fact about the single-block rig, not a verdict on the block: an offline batch fit, a block whose output only appears at onSolverFinish, or one that needs a driven environment cannot be exercised alone.

Category unsampled · sample time 0.1 · 60 steps · commit 0ea09802e · produced by docsSample --out <folder> --blocks Digital_DATCOM_Forces_And_Moments --steps 60

Sample data: docs/generated/samples/Robotics__Aerodynamics__Digital_DATCOM_Forces_And_Moments.json