Dynamic Pressure — Robotics/Flight Parameters
Robotics/Flight_Parameters/Dynamic_Pressure · 2 input / 1 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.
Dynamic Pressure
Robotics / Flight Parameters
The pressure a moving fluid exerts by being brought to rest:
q = ½·ρ·(V·V)
with V·V = u² + v² + w², the velocity vector's own dot product. It is the whole vector's speed that counts, not one component: fed a single axis the answer is short by the other two terms and still looks like a pressure.
Ports
- V – the velocity in body axes, a [3,1] column [u v w]’. Any units, as long as they match ρ's.
- ρ – the fluid density, a [1,1] scalar. It is not required to be positive – the block computes rather than judges – but a negative density gives a negative pressure.
- q – the dynamic pressure, a [1,1] scalar. In SI, m/s and kg/m³ give pascals.
Parameters
- Sampling Time (s) – zero or less inherits the solver's rate; a positive value runs the block at that period.
There are no others, and that is the block: both quantities arrive on ports.
Code export
All ten targets: Python, MATLAB, Java, Rust, C, C++, VHDL, Verilog, SystemVerilog and PLC Structured Text.
The three HDL targets are genuinely synthesizable Q16.16: three multiplies, two adds and one more multiply, with no root, division or transcendental anywhere. Mind the datapath's range rather than its precision – the dot product SQUARES the velocity, so an airspeed of 180 in those units already puts q past the ±32767 a Q16.16 word holds, and a fixed-point core wants its velocity scaled before it arrives.
Simulink bridge
Import and export, mapped to Aerospace Blockset's
aerolibasang/Dynamic Pressure. That block has no dialog
parameters at all – measured in R2026a – so nothing is mapped and
the add_block carrying nothing is itself the assertion, exactly as
Data Type Scaling Strip's is. It defines no SampleTime
either, so the rate stays on the ICore side and a block given an explicit
positive period reports that it did not cross.
Notes
- Algebraic and stateless: the output depends on this sample alone.
- Not linear – a product of two inputs, and a square – so the block carries no state space and model reduction correctly reports it as unmergeable.
- Verified against R2026a: at V = [50 3 7]’ and ρ = 1.225 both this block and the Simulink one answer 1566.775.
Code facts#
| Fact | Value |
|---|---|
| registered type | Robotics/Flight_Parameters/Dynamic_Pressure |
| family | Robotics/Flight_Parameters |
| solver environment class | ICoreBlock_0_Robotics_1_Flight_Parameters_2_Dynamic_Pressure |
| source | src/ICoreBlocks/ICoreBlockLibrary/Blocks/Robotics/Flight_Parameters/Dynamic_Pressure/ICoreBlock_0_Robotics_1_Flight_Parameters_2_Dynamic_Pressure.cpp |
| header | src/ICoreBlocks/ICoreBlockLibrary/Blocks/Robotics/Flight_Parameters/Dynamic_Pressure/ICoreBlock_0_Robotics_1_Flight_Parameters_2_Dynamic_Pressure.h |
| default size on canvas | 108 × 72 px |
| ports at insert | 2 in, 1 out |
| code generators implemented | Python, MATLAB, Java, Rust, C, C++, VHDL, Verilog, SystemVerilog, PLC Structured Text |
Ports#
| # | Direction | Signal type | Description label |
|---|---|---|---|
| 1 | in | ICoreDouble | V |
| 2 | in | ICoreDouble | rho |
| 3 | out | ICoreDouble | q |
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#
No config variable beyond the Sampling Time (s) every block carries.
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.
Simulink bridge#
| support | Support::Both |
| Simulink path | aerolibasang/Dynamic Pressure |
| port-count rule | PortsParam::None |
SampleTime parameter | no — the counterpart defines none; the rate stays on the ICore side |
Caveat (shown to the user): the Simulink block carries no dialog parameters and no SampleTime, so the whole mapping is the library path and the port list: V on the first port, rho on the second. 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:
B0every 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).
Dynamic Pressure -- q = 1/2 * rho * (V . V) The pressure a moving fluid exerts by being brought to rest, from a body-axis velocity vector and a density. One dot product, one multiply, no state, no configuration.
MEASURED AGAINST R2026a rather than asserted: at V = [50 3 7]' and rho = 1.225, Aerospace Blockset's aerolibasang/Dynamic Pressure answers 1566.775, and 0.5*1.225*(2500+9+49) is 1566.775. The block carries NO dialog parameters at all and no SampleTime, so its whole bridge is the library path and the port list -- an add_block carrying nothing is the assertion, exactly as Data Type Scaling Strip's is.
⚠ IT IS THE VECTOR'S OWN DOT PRODUCT. Fed one component instead of three the answer is short by the other two terms and still looks like a pressure, which is why the rig's shaper gives the three components distinct magnitudes and mixed signs.
Sample results#
No stimulus produced a sampled output in this rig — Invalid input size at Dynamic Pressure block: ICore Blocks/Home/Dynamic Pressure. 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 7a92e77df807c552be6236159919fcefe95c17d3 · produced by docsSample --out <folder> --blocks Dynamic_Pressure Mach_Number Incidence_And_Airspeed Incidence_Sideslip_And_Airspeed --steps 60
Sample data: docs/generated/samples/Robotics__Flight_Parameters__Dynamic_Pressure.json