Generated reference › Horizontal Wind Model 14 — Robotics/Wind
kind: generated#block#robotics-wind

Horizontal Wind Model 14 — Robotics/Wind

Robotics/Wind/Horizontal_Wind_Model_14 · 3 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.

Horizontal Wind Model 14

Robotics / Wind

The neutral horizontal wind of the Earth's atmosphere from the ground to 500 km, from the U.S. Naval Research Laboratory's empirical Horizontal Wind Model 2014 (HWM14): the meridional (positive northward) and zonal (positive eastward) wind at a geodetic position, a day of year and a UT time.

  • Quiet – the quiet-time climatology: an 800-term vector spherical-harmonic expansion in latitude, longitude, season and local time, whose coefficients vary with altitude on a cubic B-spline over 30 levels.
  • Disturbance – the geomagnetic storm-time wind of the DWM07 model, driven by the Ap index: a 300-term expansion in quasi-dipole magnetic latitude and magnetic local time, faded in above 125 km.
  • Total – the sum of the two.

It is the Aerospace Blockset's Horizontal Wind Model 14 and MATLAB's atmoshwm, with the same coefficient sets.

Ports

  • LLA – [3,1]: geodetic latitude and longitude in degrees, and the altitude – metres in the Metric unit system, feet in both English ones.
  • Day – [1,1]: the day of the year. A fractional part is carried into the seconds.
  • Seconds – [1,1]: the UT seconds of the day.
  • Ap – [1,1], Total and Disturbance only: the 3-hour Ap geomagnetic index. The Quiet model has no fourth input, and the block checks that its input count matches the Model.
  • Output – [2,1]: the meridional and the zonal wind, in m/s, ft/s or knots by the unit system.

Parameters

  • Units – Metric (MKS) (the default: metres, m/s), English (Velocity in ft/s) or English (Velocity in kts) (the altitude in feet for both).
  • Model – Quiet (the default), Total or Disturbance.
  • Sampling Time (s) – zero or less inherits the solver's rate; a positive value runs the block at that period.

Code export

Seven targets: Python, MATLAB, Java, Rust, C, C++ and PLC Structured Text, from one program: the model is written once and rendered per target, the coefficients of each altitude level held as literals inside a branch that runs only when that level carries weight. The generated code is large – about 46000 statements – and Java receives it cut into helper methods, since a Java method is limited to 64 KB.

The three HDL targets (VHDL, Verilog, SystemVerilog) are not offered, and asking for one logs why: the altitude in metres (up to 500000) and the UT seconds (up to 86400) cannot sit on a Q16.16 port, whose range is ±32768, and the model as straight-line real arithmetic is more than an HDL simulator analyzes in reasonable time (measured: GHDL was still analyzing the first core after 15 minutes and 3.6 GB).

Simulink bridge

Import and export, mapped to Aerospace Blockset's aerolibwind2/Horizontal Wind Model 14: Units → units and Model → model, both 1:1. The Simulink block's port list follows model exactly as this one's does, and an import sizes the ports from it. action is fixed at None: out-of-range inputs are held in range, never refused. "Sampling Time (s)" does not cross: the Simulink block defines no SampleTime parameter, measured on R2026a.

Notes

  • Out-of-range inputs are held, not refused (Simulink's action None): an Ap below 0 reads as 0 and above 400 as 400, the altitude is held in [0, 500 km], a latitude past ±90° is folded over the pole (which turns the longitude by 180°) and a longitude past ±180° is wrapped.
  • Verified: the Quiet model agrees with R2026a to about 10−13. MATLAB computes the disturbance winds in single precision; this block computes everything in double, so the Total and Disturbance models agree with Simulink to a few 10−4 m/s, not to the last bit.
  • Stateless: the output depends only on this sample's inputs.

Code facts#

FactValue
registered typeRobotics/Wind/Horizontal_Wind_Model_14
familyRobotics/Wind
solver environment classICoreBlock_0_Robotics_1_Wind_2_Horizontal_Wind_Model_14
sourcesrc/ICoreBlocks/ICoreBlockLibrary/Blocks/Robotics/Wind/Horizontal_Wind_Model_14/ICoreBlock_0_Robotics_1_Wind_2_Horizontal_Wind_Model_14.cpp
headersrc/ICoreBlocks/ICoreBlockLibrary/Blocks/Robotics/Wind/Horizontal_Wind_Model_14/ICoreBlock_0_Robotics_1_Wind_2_Horizontal_Wind_Model_14.h
default size on canvas170 × 110 px
ports at insert3 in, 1 out
code generators implementedPython, MATLAB, Java, Rust, C, C++, VHDL, Verilog, SystemVerilog, PLC Structured Text

Ports#

#DirectionSignal typeDescription label
1inICoreDoubleLLA
2inICoreDoubleDay
3inICoreDoubleSeconds
4outICoreDouble—

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
UnitsMetric (MKS)%~%English (Velocity in ft/s)%~%English (Velo…units
ModelQuiet%~%Total%~%Disturbance~~Quietmodel

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 pathaerolibwind2/Horizontal Wind Model 14
port-count rulePortsParam::HwmModelInputs
SampleTime parameterno — the counterpart defines none; the rate stays on the ICore side
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)
ModelmodelQuiet → Quiet, Total → Total, Disturbance → Disturbance

Caveat (shown to the user): inputs [lat lon alt], day of year, UT seconds and -- in Total and Disturbance only -- Ap; one [2,1] output, meridional and zonal. 'action' is always None: out-of-range inputs are held in range (the Simulink block's Error and Warning only decide whether it complains). 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 Ports lists 5 entries for 4 ports (3 in, 1 out), and the 5 they cover does not reconcile — grouped, or one undocumented? a reader must say
  • 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).

Horizontal Wind Model 14 -- the NRL HWM14 neutral wind, quiet, disturbance or total The arithmetic is ICoreHwm14Support's: NRL's Fortran (hwm14.f90) transcribed as statements against the coefficient sets R2026a ships beside the block, behind atmoshwm's front end -- written once, run by the live simulation and rendered by the seven exports. This file holds the configuration, the ports and the bridge.

⚠ MEASURED AGAINST R2026a before a line was written: the Simulink block is atmoshwm with action 'None' (to 1e-13 on every model and unit system); the transcription reproduces the mex's QUIET model to 1e-13; the mex's disturbance winds are float32, 4e-4 m/s from double.

The three HDL targets are DECLINED with a logged reason (see generateBodyCode_VHDL).

The port list follows the Model, as the Simulink block's does: Quiet has three inputs (LLA, day, seconds), Total and Disturbance a fourth (Ap). The block validates the count against the Model rather than editing its ports underneath the user (Math Function's rule).

Sample results#

No stimulus produced a sampled output in this rig — Invalid input size at: ICore Blocks/Home/Horizontal Wind Model 14. 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 daaa6ac75d · produced by docsSample --out <folder> --blocks Horizontal_Wind_Model_14 --steps 60

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