Fixed Wing Point Mass — Robotics/Equations Of Motion
Robotics/Equations_Of_Motion/Fixed_Wing_Point_Mass · 8 input / 9 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.
Fixed Wing Point Mass
Robotics / Equations Of Motion
A point-mass model of a fixed-wing aircraft in coordinated flight, with its forces resolved inside and a wind input. The states are the airspeed V, the flight-path angle γa and the heading χa relative to the air mass, and the position Xe relative to Earth. With B = L + T·sin α:
- V' = (T·cos α − D − W·sin γin)/m
- γa' = (B·cos μ − W·cos γin)/(m·V)
- χa' = B·sin μ/(m·V·cos γa)
- Xe' = Ve = Va + Vwind, with Va = V·[cos γa cos χa; cos γa sin χa; −sin γa] in North-East-Down (the last entry +sin γa in East-North-Up).
γin is the flight-path angle arriving on the gamma_a input: the weight is resolved with it, and the heading rate with the state.
Ports
- L – the lift, a scalar [1,1].
- D – the drag, a scalar [1,1].
- W – the weight, a scalar [1,1].
- T – the thrust, a scalar [1,1].
- gamma_a (input) – γin, the flight-path angle the weight is resolved with, in radians, [1,1].
- mu – the bank angle μ in radians, [1,1].
- alpha – the angle of attack α in radians, [1,1].
- Vwind – the wind velocity, three elements [3,1] (a [1,3] row is accepted too), in the frame the Reference Frame parameter names.
- V – the airspeed, [1,1].
- G – the ground speed, the length of the horizontal part of Ve, [1,1].
- Va – the velocity relative to the air mass, [3,1].
- Ve – the velocity relative to Earth, Va + Vwind, [3,1].
- Xe – the position relative to Earth, [3,1].
- gamma_a (output) – the flight-path angle relative to the air mass, [1,1].
- gamma – the flight-path angle relative to Earth, atan2(climb rate, G), [1,1].
- chi_a – the heading relative to the air mass, [1,1].
- chi – the heading relative to Earth, atan2(Ve,2, Ve,1), [1,1].
Parameters
- Units – the unit system:
- Metric (MKS) (the default) and English (velocity in ft/s) – the same arithmetic, so the choice only names the units.
- English (velocity in kts) – velocities in knots and positions in feet: the acceleration is divided by k = 1.68781 ft/s per knot, the two angle rates use k·V and the position integrates k·Ve.
- Reference Frame – North East Down (the default) or East North Up: the order and sign of every three-element port. In both, the heading turns from the first axis toward the second.
- Initial Downrange – the initial North position. Defaults to 0.
- Initial Crossrange – the initial East position. Defaults to 0.
- Initial Altitude – the initial altitude (positive up in both frames). Defaults to 0.
- Initial Airspeed – V0, a nonzero scalar. Defaults to 50.
- Initial Flight Path Angle – γa0 in radians. Defaults to 0.
- Initial Heading Angle – χa0 in radians. Defaults to 0.
- Mass – m, a scalar > 0. Defaults to 10.
- Integration Substeps – M, how many fourth-order Runge-Kutta steps a sample is integrated with on the discrete solver and in exported code, a whole number of 1 or more. Defaults to 100. No Simulink counterpart.
- 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. A core holds the six states, publishes the outputs from them and the present wind, and integrates one sample with the inputs held and M Runge-Kutta substeps – with M = 100, the same computation as Simulink's fixed-step ode4 at one hundredth of the sample time. The mass, the unit scale, the frame and the substep are folded to constants.
The three HDL targets are simulation-only real
arithmetic, quantized at the port: a sine of a state, a square root and a division
by one have no Q16.16 form. The cores simulate correctly and are not offered as
synthesizable.
Simulink bridge
Import and export, mapped to Aerospace Blockset's
aerolibptmass/Fixed-Wing Point Mass: Units →
units (all three values 1:1), Reference Frame →
frame (North East Down ↔ [North East Down], East North Up ↔
[East North Up]), Initial Downrange → north, Initial
Crossrange → east, Initial Altitude →
altitude, Initial Airspeed → airspeed,
Initial Flight Path Angle → gamma, Initial Heading
Angle → chi and Mass → mass.
order is always written as 6th Order (Coordinated Flight): the 4th-order
setting removes the two heading outputs from the Simulink block, and an imported one
is reported. "Sampling Time (s)" does not cross: the Simulink block is
continuous and defines no SampleTime.
Notes
- Stateful, continuous and nonlinear: six continuous states.
- Direct feedthrough: Ve, G, γ and χ read the wind at the same instant. A wire from any output back into an input – the gamma_a output into the gamma_a input, say – is therefore an algebraic loop here, where Simulink resolves it port by port; compute the weight-resolution angle upstream, or put a delay in that wire.
- The airspeed and cos γa divide, so the model is undefined as V reaches 0 or the flight path goes vertical.
Code facts#
| Fact | Value |
|---|---|
| registered type | Robotics/Equations_Of_Motion/Fixed_Wing_Point_Mass |
| family | Robotics/Equations_Of_Motion |
| solver environment class | ICoreBlock_0_Robotics_1_Equations_Of_Motion_2_Fixed_Wing_Point_Mass |
| source | src/ICoreBlocks/ICoreBlockLibrary/Blocks/Robotics/Equations_Of_Motion/Fixed_Wing_Point_Mass/ICoreBlock_0_Robotics_1_Equations_Of_Motion_2_Fixed_Wing_Point_Mass.cpp |
| header | src/ICoreBlocks/ICoreBlockLibrary/Blocks/Robotics/Equations_Of_Motion/Fixed_Wing_Point_Mass/ICoreBlock_0_Robotics_1_Equations_Of_Motion_2_Fixed_Wing_Point_Mass.h |
| default size on canvas | 140 × 190 px |
| ports at insert | 8 in, 9 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 | L |
| 2 | in | ICoreDouble | D |
| 3 | in | ICoreDouble | W |
| 4 | in | ICoreDouble | T |
| 5 | in | ICoreDouble | gamma_a |
| 6 | in | ICoreDouble | mu |
| 7 | in | ICoreDouble | alpha |
| 8 | in | ICoreDouble | Vwind |
| 9 | out | ICoreDouble | V |
| 10 | out | ICoreDouble | G |
| 11 | out | ICoreDouble | Va |
| 12 | out | ICoreDouble | Ve |
| 13 | out | ICoreDouble | Xe |
| 14 | out | ICoreDouble | gamma_a |
| 15 | out | ICoreDouble | gamma |
| 16 | out | ICoreDouble | chi_a |
| 17 | out | ICoreDouble | chi |
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 variable | Default | Simulink parameter |
|---|---|---|
Units | Metric (MKS)%~%English (velocity in ft/s)%~%English (velo… | units |
Reference Frame | North East Down%~%East North Up~~North East Down | frame |
Initial Downrange | 0 | north |
Initial Crossrange | 0 | east |
Initial Altitude | 0 | altitude |
Initial Airspeed | 50 | airspeed |
Initial Flight Path Angle | 0 | gamma |
Initial Heading Angle | 0 | chi |
Mass | 10 | mass |
Integration Substeps | 100 | not crossed |
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 | aerolibptmass/Fixed-Wing Point Mass |
| port-count rule | PortsParam::None |
SampleTime parameter | no — the counterpart defines none; the rate stays on the ICore side |
| deliberately not crossed | Integration Substeps |
| always set | order = 6th Order (Coordinated Flight) |
| ICore config | Simulink parameter | Value translation |
|---|---|---|
Units | units | Metric (MKS) → Metric (MKS), English (velocity in ft/s) → English (velocity in ft/s), English (velocity in kts) → English (velocity in kts) |
Reference Frame | frame | North East Down → [North East Down], East North Up → [East North Up] |
Initial Downrange | north | passes through |
Initial Crossrange | east | passes through |
Initial Altitude | altitude | passes through |
Initial Airspeed | airspeed | passes through |
Initial Flight Path Angle | gamma | passes through |
Initial Heading Angle | chi | passes through |
Mass | mass | passes through |
Caveat (shown to the user): aerolibptmass/Fixed-Wing Point Mass is a continuous RefPointMass block and has NO SampleTime parameter (verified against the R2026a block dialog). order is pinned to the 6th-order form because the 4th-order one removes two output ports; "Integration Substeps" is how this block integrates a sample and has no counterpart
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).
Fixed-Wing Point Mass -- the point-mass airframe with its force resolution and a wind input State [V gamma_a chi_a X1 X2 X3]: the airspeed, the flight-path and heading angles relative to the air mass, and the position relative to Earth. Inputs L, D, W, T, gamma_in, mu, alpha and the wind Vw (3 elements, in the output frame). With B = L + T*sin(alpha) and k = 1 (k = the knot in ft/s under the kts unit system):
V' = ((T*cos(alpha) - D - W*sin(gamma_in))/m) / k gamma_a' = (B*cos(mu) - W*cos(gamma_in)) / (m*(k*V)) chi_a' = (B*sin(mu)) / ((m*(k*V))cos(gamma_a)) Xe' = (Va + Vw)*k, Va = V[cos(gamma_a)cos(chi_a); cos(gamma_a)sin(chi_a); -/+sin(gamma_a)]
⚠ MEASURED AGAINST R2026a, and the block cannot be read: aerolibptmass/Fixed-Wing Point Mass is a compiled RefPointMass block with no mask. Driven by eight constants (every one distinct and nonzero), ode4 at 1e-4 for 0.5 s, these equations reproduce all nine outputs to 1.5e-13 in both frames and under all three unit systems. What the measurement settled:
- The WEIGHT is resolved with the flight-path angle from the INPUT port, not the state -- the
state instead was out by 0.27 in V -- while the heading's cos(gamma_a) is the STATE (the input there was out by 3e-5). So the gamma_a input port is the block's weight-resolution angle.
- Outputs V, G, Va, Ve, Xe, gamma_a, gamma, chi_a, chi in that order. Ve = Va + Vw (the wind is
added to the air-relative velocity in the SAME frame); G = |[Ve1 Ve2]|; gamma = atan2(up, G); chi = atan2(Ve2, Ve1).
- NED: Xe0 = [north; east; -altitude], Va's third component is -V*sin(gamma_a). ENU: Xe0 =
[east; north; altitude], Va's third is +V*sin(gamma_a), and the heading still rotates from the FIRST axis toward the second (so from East toward North). Va's first two components are the same numbers in both frames.
- Metric and English (velocity in ft/s) are the same arithmetic (weight is an input, so no
gravity constant inside). English (velocity in kts) keeps velocities in knots and position in feet: V' is the ft/s^2 acceleration divided by k, the two angle rates see k*V, and the position integrates k*Ve, with k = 1852/0.3048/3600 exactly.
- Ve, G, gamma and chi depend on the wind at the same instant, so the block feeds through.
The 4th Order (Longitudinal) setting drops the two heading outputs -- a parameter that moves Simulink's port list -- so the block is the 6th Order (Coordinated Flight) form, pinned.
V and cos(gamma_a) divide, so the model is undefined as the airspeed reaches zero or the path goes vertical. Continuous, with the discrete path and every exported core running the family's shared RK4 map, which at M = 100 substeps is Simulink's fixed-step ode4 at Ts/100.
Sample results#
No stimulus produced a sampled output in this rig — Invalid input size at Fixed Wing Point Mass block: ICore Blocks/Home/Fixed Wing Point Mass. 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 23d8841c6561ca4bb64cd9b5b64da9638de12629 · produced by docsSample --out <folder> --blocks Fixed_Wing_Point_Mass Kernel_Classifier_Predictor Kernel_Regression_Predictor Rotor Rotor_With_Flap_Effects Multirotor Multirotor_With_Flap_Effects Dynamic_Inflow_3_State Kurtogram Empirical_Mode_Decomposition Modal_FRF Order_Spectrum --steps 60
Sample data: docs/generated/samples/Robotics__Equations_Of_Motion__Fixed_Wing_Point_Mass.json