Generated reference › Non Standard Day 310 — Robotics/Atmosphere
kind: generated#block#robotics-atmosphere

Non Standard Day 310 — Robotics/Atmosphere

310

Robotics/Atmosphere/Non_Standard_Day_310 · 1 input / 4 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.

Non-Standard Day 310

Robotics / Atmosphere

The MIL-HDBK-310 worldwide climatic atmosphere: a geopotential altitude in, and the atmosphere's temperature, speed of sound, static pressure and density out. The standard tabulates a temperature and a density against geometric altitude for each climatic extreme, so the block converts first and then interpolates inside the interval the altitude falls in:

  • hgm = h·RE/(RE − h), with RE = 6371010 m
  • f = (hgm − Ak)/(Ak+1 − Ak), then T = Tk + f(Tk+1 − Tk) – linear in temperature
  • ρ = ρk(ρk+1/ρk)f – logarithmic in density
  • then P = ρ·(RsT) and a = √(γTRs), with Rs = R*/M = 287.05307204706463

Neither pressure nor the speed of sound is tabulated anywhere: both follow from the interpolated pair. Nothing clamps at either end – below the first breakpoint and above the last, both axes are extrapolated.

Ports

  • h – the geopotential altitude, in metres. Any size [m,n]; the block works entry by entry.
  • T – the temperature, in kelvin. Same size as the input.
  • a – the speed of sound, in m/s. Same size as the input.
  • P – the static pressure, in pascals. Same size as the input.
  • rho – the density, in kg/m³. Same size as the input.

Parameters

  • Atmospheric Model Type – which half of the standard is read.
    • Profile – a realistic atmosphere whose extreme occurs at one chosen altitude; for a vehicle traversing the atmosphere vertically.
    • Envelope – the extreme value at every altitude; for a vehicle staying near one altitude.
  • Profile Extreme Parameter – which quantity is extreme in the profile tables: High temperature, Low temperature, High density or Low density. Read only when the model type is Profile.
  • Profile Frequency Of Occurrence – how often the profile's extreme is met or exceeded: 1% or 10% of the time.
  • Profile Altitude Of Extreme Value – the geometric altitude the profile's extreme sits at: 5, 10, 20, 30 or 40 km. The rest of the profile is the atmosphere that goes with that extreme, so this moves the whole table rather than one point.
  • Envelope Extreme Parameter – the envelope's extreme quantity: High temperature, Low temperature, High density or Low density. Read only when the model type is Envelope.
  • Envelope Frequency Of Occurrence – Extreme values (the worst case recorded) or 1%. The 5%, 10% and 20% envelopes are not offered, and neither are the two pressure parameters – see Notes.
  • 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 selected table is unrolled into a comparison chain at export time rather than shipped as an array: which interval an altitude falls in is a chain of comparisons, and each branch carries only its own four constants – the breakpoint, the interval width, the temperature step and the density ratio. Each of those three combinations is one rounded operation on the table's own values, printed at 17 significant digits, so every backend computes with the same doubles as the block's own simulation. A generated program therefore carries one of the 48 tables and no search.

The three hardware targets are simulation-only: a fractional power and a square root have no Q16.16 form, so values convert at the port boundary and the arithmetic runs in floating point. And a sea-level pressure does not fit a fixed-point port at all – Q16.16 saturates past about 32767, while this atmosphere reaches 1.1×10⁵ Pa at sea level – so a hardware export is for the thin atmosphere above roughly 9 km.

Simulink bridge

Import and export, mapped to Aerospace Blockset's aerolibatmos2/Non-Standard Day 310. Six configuration values cross one for one: Atmospheric Model Type → model, Profile Extreme Parameter → profile_var, Profile Frequency Of Occurrence → profile_percent, Profile Altitude Of Extreme Value → profile_alt, Envelope Extreme Parameter → envelope_var and Envelope Frequency Of Occurrence → envelope_percent.

Two Simulink parameters are always implied: units is always Metric (MKS), this block being metric throughout, and action is always None, that parameter only choosing whether Simulink warns when an altitude leaves the table. spec is MIL-HDBK-310 and is not cosmetic: the same Simulink block serves the COESA Atmosphere Model and Non-Standard Day 210C library entries at a different spec, so naming the standard is what says which atmosphere crossed. The Simulink block defines no SampleTime parameter, measured, so the rate stays on the ICore side.

Notes

  • Algebraic and stateless: the outputs depend on this sample alone.
  • Not linear, so the block carries no state space and model reduction correctly reports it as unmergeable.
  • The altitude is GEOPOTENTIAL, not geometric, and the tables are geometric: the block converts on the way in, as the reference does. At 20 km the two differ by about 63 m, which is a third of a table interval.
  • Nothing clamps – below the bottom breakpoint and above the top one the two axes are extrapolated, linearly in temperature and logarithmically in density. Verified against R2026a from −10 km to 150 km.
  • The 5%, 10% and 20% envelopes are not offered, and neither are the High pressure and Low pressure envelopes. The standard tabulates only the extreme quantity for those, so Simulink's block shows a single output port there – a port list that moves with a parameter, which this block's fixed four outputs cannot follow.
  • A non-positive temperature answers zero on all four outputs, which the reference does not do. Only a long extrapolation above the table reaches it, and the speed of sound would otherwise take the square root of a negative number, which VHDL's SQRT asserts on rather than answering.
  • MIL-HDBK-310 is MIL-STD-210C with nine tables changed, measured: 61 of the 70 tables the two standards share are byte-identical, and the nine that differ do so at one or two points each. Non-Standard Day 210C is the same block over the other set.
  • Verified against R2026a over all 48 tables – 779 altitudes each, 148 thousand answers – where temperature and the speed of sound are bit-exact and density and pressure sit within one unit in the last place.

Code facts#

FactValue
registered typeRobotics/Atmosphere/Non_Standard_Day_310
familyRobotics/Atmosphere
solver environment classICoreBlock_0_Robotics_1_Atmosphere_2_Non_Standard_Day_310
sourcesrc/ICoreBlocks/ICoreBlockLibrary/Blocks/Robotics/Atmosphere/Non_Standard_Day_310/ICoreBlock_0_Robotics_1_Atmosphere_2_Non_Standard_Day_310.cpp
headersrc/ICoreBlocks/ICoreBlockLibrary/Blocks/Robotics/Atmosphere/Non_Standard_Day_310/ICoreBlock_0_Robotics_1_Atmosphere_2_Non_Standard_Day_310.h
default size on canvas170 × 120 px
ports at insert1 in, 4 out
code generators implementedPython, MATLAB, Java, Rust, C, C++, VHDL, Verilog, SystemVerilog, PLC Structured Text

Ports#

#DirectionSignal typeDescription label
1inICoreDoubleh
2outICoreDoubleT
3outICoreDoublea
4outICoreDoubleP
5outICoreDoublerho

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
Atmospheric Model TypeProfile%~%Envelope~~Profilemodel
Profile Extreme ParameterHigh temperature%~%Low temperature%~%High density%~%Low d…profile_var
Profile Frequency Of Occurrence1%%~%10%~~1%profile_percent
Profile Altitude Of Extreme Value5 km (16404 ft)%~%10 km (32808 ft)%~%20 km (65617 ft)%~%3…profile_alt
Envelope Extreme ParameterHigh temperature%~%Low temperature%~%High density%~%Low d…envelope_var
Envelope Frequency Of OccurrenceExtreme values%~%1%~~1%envelope_percent

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 pathaerolibatmos2/Non-Standard Day 310
port-count rulePortsParam::None
SampleTime parameterno — the counterpart defines none; the rate stays on the ICore side
always setunits = Metric (MKS), spec = MIL-HDBK-310, action = None
ICore configSimulink parameterValue translation
Atmospheric Model Typemodelpasses through
Profile Extreme Parameterprofile_varpasses through
Profile Frequency Of Occurrenceprofile_percentpasses through
Profile Altitude Of Extreme Valueprofile_altpasses through
Envelope Extreme Parameterenvelope_varHigh temperature → High temperature, Low temperature → Low temperature, High density → High density, Low density → Low density
Envelope Frequency Of Occurrenceenvelope_percentExtreme values → Extreme values, 1% → 1%

Caveat (shown to the user): the altitude is GEOPOTENTIAL and in metres while the standard's tables are GEOMETRIC (the block converts on the way in), and the four outputs are kelvin, m/s, pascals and kg/m^3. 'spec' is always written, and that is not cosmetic: the same Simulink block serves the COESA Atmosphere Model and Non-Standard Day 210C entries at a different 'spec', so naming the standard is what says which atmosphere crossed. 'units' is always Metric (MKS) and 'action' always None, that parameter only choosing whether Simulink warns when an altitude leaves the table. The 5%, 10% and 20% envelope frequencies and the two pressure parameters are NOT offered here: Simulink's block shows a single output port for them, which a fixed four-port list cannot follow. 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 lists agree. check_block_descriptions.py finds no disagreement between the description's Ports, Parameters, Code export and Simulink bridge lists and the code's.

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

Non-Standard Day 310 -- the MIL-HDBK-310 climatic atmosphere, forty-eight tables h_gm = h * R_EARTH / (R_EARTH - h) the tables are GEOMETRIC, the port is not T = T[k] + f * (T[k+1] - T[k]) linear in temperature rho = rho[k] * (rho[k+1] / rho[k])^f logarithmic in density P = rho * ((R*/M) * T) the perfect-gas relation a = sqrt(gamma * T * (R*/M))

The arithmetic is in ICoreNonStandardDaySupport, shared with Non-Standard Day 210C, which is the same block over the MIL-STD-210C tables -- and measured, 61 of the 70 tables the two standards share are BYTE-IDENTICAL, the nine that differ doing so at one or two points each. The tables themselves are generated from the reference implementation that ships with R2026a, so no digit was typed by hand.

⚠ VERIFIED AGAINST R2026a OVER EVERY TABLE, not a sample: 779 altitudes from -10 km to 150 km on each of the 48 configurations, 148 thousand answers. Temperature and the speed of sound are BIT-EXACT on all of them; density and pressure differ by one unit in the last place on about 3% of them, which is the platform's pow against the MathWorks one -- MATLAB's own ^ reproduces the reference exactly, and the exported MATLAB core is what the Simulink parity suite compares.

⚠ NOTHING CLAMPS AT EITHER END: both axes extrapolate, measured, and the reference's own "hold values outside the table" branch cannot be reached (its test is (h > bottom) || (h < top), true for every finite altitude).

⚠ ONLY THE FOUR-OUTPUT CONFIGURATIONS ARE OFFERED. Simulink's block shows ONE output port at the 5%, 10% and 20% envelope frequencies and for both pressure parameters, because the standard tabulates only the extreme quantity there.

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

Sample results#

Non Standard Day 310 — Repeating Sequence Stair: [-2 -1 -0.5 0 0.5 1 2 3], one entry per sampleNon Standard Day 310 — Repeating Sequence Stair: [-2 -1 -0.5 0 0.5 1 2 3], one entry per sample05e41e5012345t (s)in ICoreDouble-Out-0out ICoreDouble-Out-0out ICoreDouble-Out-1out ICoreDouble-Out-2
tin ICoreDouble-Out-0out ICoreDouble-Out-0out ICoreDouble-Out-1out ICoreDouble-Out-2
0-2290.1341.51.012e5
0.40.5290.2341.51.012e5
0.8-2290.1341.51.012e5
1.20.5290.2341.51.012e5
1.6-2290.1341.51.012e5
20.5290.2341.51.012e5
2.4-2290.1341.51.012e5
2.80.5290.2341.51.012e5
3.2-2290.1341.51.012e5
3.60.5290.2341.51.012e5
4-2290.1341.51.012e5
4.40.5290.2341.51.012e5
4.8-2290.1341.51.012e5
5.20.5290.2341.51.012e5

Every 4th of 60 samples, from the table stimulus.

The same rig also ran:

StimulusWhat it isOutput range
impulseImpulse: one sample of 1 at k = 5, 0 elsewhere (Repeating Sequence Stair)290.1 … 290.2
rampRamp: slope 1 from t = 0290.1 … 290.2
sineSine Wave: amplitude 1, 2 rad/s, no phase, no bias290.1 … 290.2
stepStep: 0 -> 1 at t = 1 s290.1 … 290.2

Plotted: table — Repeating Sequence Stair: [-2 -1 -0.5 0 0.5 1 2 3], one entry per sample

Category static · sample time 0.1 · 60 steps · commit a55bc1b8b7225bbf7fc0bfb1bc0db9ae1a46c34e · produced by docsSample --out <folder> --blocks Non_Standard_Day_310 --steps 60 · data docs/generated/samples/Robotics__Atmosphere__Non_Standard_Day_310.json · the SVG is generated from those numbers by tools/docs/plot_svg.py, so it is a run and not a drawing (R-D10).