Incidence And Airspeed — Robotics/Flight Parameters
Robotics/Flight_Parameters/Incidence_And_Airspeed · 1 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.
Incidence & Airspeed
Robotics / Flight Parameters
The longitudinal pair of a body-axis velocity:
α = atan2(w, u) and V = √(u² + w²)
α is the angle of attack and V the airspeed in the aircraft's plane of symmetry. Sideways motion does not enter either – for that, and for the sideslip angle, use Incidence, Sideslip & Airspeed.
Ports
- uw – the longitudinal velocity pair, a [2,1] column [u w]’. ⚠ Two elements, not three: Simulink's own block splits a three-element input unevenly and computes on pairs, so the size is checked here rather than tolerated.
- α – the angle of attack in radians, a [1,1] scalar, four-quadrant.
- V – the airspeed, a [1,1] scalar, never negative.
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: the velocity pair is all the block takes.
Code export
All ten targets: Python, MATLAB, Java, Rust, C, C++, VHDL, Verilog, SystemVerilog and PLC Structured Text.
The three HDL targets are simulation-only: a square root and an
arctangent, neither of which exists in a Q16.16 datapath, so the values convert
at the port boundary and evaluate in real.
At zero velocity α is atan2(0,0) = 0 in every target
– including VHDL, whose math_real would otherwise assert
rather than answer.
Simulink bridge
Import and export, mapped to Aerospace Blockset's
aerolibasang/Incidence & Airspeed. 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. It defines
no SampleTime either, so the rate stays on the ICore
side.
⚠ The library block's own name carries an embedded newline between Incidence and & Airspeed, and the bridge writes it that way: a path with a space instead resolves to nothing, silently.
Notes
- Algebraic and stateless: the outputs depend on this sample alone.
- The same arithmetic as Cartesian To Polar, whose r and θ are this block's V and α – but that block takes two separate scalar ports and answers in the other order, so neither can stand in for the other's Simulink mapping.
- Not linear, so the block carries no state space and model reduction correctly reports it as unmergeable.
- Verified against R2026a: at [50 7]’ both this block and the Simulink one answer 0.13909594148207133 and 50.487622245457352.
Code facts#
| Fact | Value |
|---|---|
| registered type | Robotics/Flight_Parameters/Incidence_And_Airspeed |
| family | Robotics/Flight_Parameters |
| solver environment class | ICoreBlock_0_Robotics_1_Flight_Parameters_2_Incidence_And_Airspeed |
| source | src/ICoreBlocks/ICoreBlockLibrary/Blocks/Robotics/Flight_Parameters/Incidence_And_Airspeed/ICoreBlock_0_Robotics_1_Flight_Parameters_2_Incidence_And_Airspeed.cpp |
| header | src/ICoreBlocks/ICoreBlockLibrary/Blocks/Robotics/Flight_Parameters/Incidence_And_Airspeed/ICoreBlock_0_Robotics_1_Flight_Parameters_2_Incidence_And_Airspeed.h |
| default size on canvas | 120 × 76 px |
| ports at insert | 1 in, 2 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 | uw |
| 2 | out | ICoreDouble | alpha |
| 3 | out | ICoreDouble | V |
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/Incidence \n& Airspeed |
| 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: one [2,1] longitudinal pair in, alpha and V out in that order. 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).
Incidence & Airspeed -- alpha and V from the LONGITUDINAL pair alpha = atan2(w, u) the angle of attack V = sqrt(u^2+w^2) the airspeed in the plane of symmetry
⚠ THE INPUT IS A PAIR, NOT A THREE-VECTOR, and that is measured rather than assumed: fed three elements, Aerospace Blockset's own block warns "Nonuniform distribution of output to dynamically sized inputs in block .../Demux" and computes on pairs. This is the longitudinal block; the three-axis one is Incidence, Sideslip & Airspeed, which takes [u v w]' and answers a sideslip as well.
MEASURED AGAINST R2026a: at [50 7]' it answers 0.13909594148207133 and 50.487622245457352, which are atan2(7,50) and hypot(50,7). NO dialog parameters at all, and no SampleTime.
The same arithmetic lives in Robotics/Coordinate_Transforms/Cartesian_To_Polar -- r and theta ARE V and alpha -- but from two SEPARATE scalar ports and in the other output order, so it cannot carry this block's bridge: the Simulink counterpart has one vector port and answers alpha first. "Can be wired to do it" is not the same as having it.
⚠ THE THREE HDL TARGETS ARE SIMULATION-ONLY: a root and an arctangent, neither of which exists in a Q16.16 datapath.
Sample results#
No stimulus produced a sampled output in this rig — Invalid input size at Incidence & Airspeed block: ICore Blocks/Home/Incidence And Airspeed. 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__Incidence_And_Airspeed.json