EOM 6DOF Simple Variable Mass Euler Angles — Robotics/Equations Of Motion
Robotics/Equations_Of_Motion/EOM_6DOF_Simple_Variable_Mass_Euler_Angles · 3 input / 7 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.
EOM 6DOF Simple Variable Mass Euler Angles
Robotics / Equations Of Motion
The six-degree-of-freedom equations of motion of a rigid body that burns fuel, carried in body axes with the attitude as Euler angles (the 3-2-1 sequence). The mass is a state driven by the mass flow rate and held between the empty and full masses; the inertia tensor follows it linearly between its empty and full values:
- Vb' = F/m − ω × Vb
- ω' = I−1(M − ω × (Iω) − dI/dt·ω)
- I(m) = Ie + (m − me)/(mf − me)·(If − Ie), dI/dt = m'·(If − Ie)/(mf − me)
- m' = dm/dt, except zero while the tank is empty and draining or full and filling
- the Euler-angle kinematics of EOM 6DOF Euler Angles, singular at θ = ±90°
- Xe' = DCMbeT Vb
Ports
- F – the applied force in body axes, [3,1].
- M – the applied moment about the centre of gravity in body axes, [3,1].
- m_dot – the mass flow rate dm/dt (negative while burning), a scalar [1,1].
- Ve – the velocity in the flat-earth frame, DCMbeT Vb, [3,1].
- Xe – the position in the flat-earth frame, [3,1].
- Euler – the Euler angles [φ; θ; ψ] in radians, [3,1].
- DCMbe – the direction cosine matrix from the flat-earth frame to body axes, [3,3].
- Vb – the velocity in body axes [u; v; w], [3,1].
- wb – the body rates [p; q; r] in rad/s, [3,1].
- Fuel – the fuel tank status: 1 full (m ≥ mf), −1 empty (m ≤ me), 0 otherwise, [1,1].
Parameters
- Units – Metric (MKS) (the default) or English (velocity in ft/s). The two are the same arithmetic, so the choice only says which units the numbers are in.
- Initial Position [Xe Ye Ze] – three values. Defaults to [0 0 0].
- Initial Velocity [U V W] – the initial body velocity, three values. Defaults to [0 0 0].
- Initial Euler Angles [phi theta psi] – in radians, three values, with |θ| below 90°. Defaults to [0 0 0].
- Initial Body Rates [p q r] – in rad/s, three values. Defaults to [0 0 0].
- Initial Mass – m0, from the empty to the full mass. Defaults to 1.
- Empty Mass – me, the lower limit. Defaults to 0.5.
- Full Mass – mf, the upper limit, greater than the empty mass. Defaults to 3.
- Empty Inertia – Ie, the invertible [3,3] tensor at the empty mass. Defaults to eye(3).
- Full Inertia – If, the invertible [3,3] tensor at the full mass. Defaults to 2*eye(3).
- 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 13 states, publishes the outputs from them, 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 fuel limit applied at every stage and the mass clamped after every substep exactly as the Simulink block does it. The inertia is inverted in closed form at every derivative evaluation.
The three HDL targets are simulation-only real arithmetic, quantized at the port: a sine of a state has no Q16.16 form. The cores simulate correctly and are not offered as synthesizable.
Simulink bridge
Import and export, mapped to Aerospace Blockset's aerolib6dof2/Simple Variable Mass 6DOF (Euler Angles): Units → units (the two offered values 1:1), Initial Position [Xe Ye Ze] → xme_0, Initial Velocity [U V W] → Vm_0, Initial Euler Angles [phi theta psi] → eul_0, Initial Body Rates [p q r] → pm_0, Initial Mass → mass_0, Empty Mass → mass_e, Full Mass → mass_f, Empty Inertia → inertia_e and Full Inertia → inertia_f. Always emitted with mtype = Simple Variable and vre_flag and mass_flag off: each of those moves that block's port list, and this block has one. The knots unit system is not offered – it converts velocities inside the integration – and an imported one is reported. The dialog's inertia is not read at this mass type (measured) and is not offered. "Sampling Time (s)" does not cross: the Simulink block is continuous and defines no SampleTime.
Notes
- Stateful, continuous and nonlinear: 13 continuous states. The outputs are states or functions of them, so the block has no direct feedthrough and a loop through it is not an algebraic loop.
- At a limit the mass stops and the inertia rate with it. On the continuous solver the mass is held by the zero rate alone and can overshoot a limit by one solver step; the discrete solver and every exported core also clamp it, as Simulink does.
- θ = ±90° is the Euler kinematics' singularity, as in the fixed-mass block.
Code facts#
| Fact | Value |
|---|---|
| registered type | Robotics/Equations_Of_Motion/EOM_6DOF_Simple_Variable_Mass_Euler_Angles |
| family | Robotics/Equations_Of_Motion |
| solver environment class | ICoreBlock_0_Robotics_1_Equations_Of_Motion_2_EOM_6DOF_Simple_Variable_Mass_Euler_Angles |
| source | src/ICoreBlocks/ICoreBlockLibrary/Blocks/Robotics/Equations_Of_Motion/EOM_6DOF_Simple_Variable_Mass_Euler_Angles/ICoreBlock_0_Robotics_1_Equations_Of_Motion_2_EOM_6DOF_Simple_Variable_Mass_Euler_Angles.cpp |
| header | src/ICoreBlocks/ICoreBlockLibrary/Blocks/Robotics/Equations_Of_Motion/EOM_6DOF_Simple_Variable_Mass_Euler_Angles/ICoreBlock_0_Robotics_1_Equations_Of_Motion_2_EOM_6DOF_Simple_Variable_Mass_Euler_Angles.h |
| default size on canvas | 160 × 170 px |
| ports at insert | 3 in, 7 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 | F |
| 2 | in | ICoreDouble | M |
| 3 | in | ICoreDouble | m_dot |
| 4 | out | ICoreDouble | Ve |
| 5 | out | ICoreDouble | Xe |
| 6 | out | ICoreDouble | Euler |
| 7 | out | ICoreDouble | DCMbe |
| 8 | out | ICoreDouble | Vb |
| 9 | out | ICoreDouble | wb |
| 10 | out | ICoreDouble | Fuel |
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)~~Metric (MKS) | units |
Initial Position [Xe Ye Ze] | [0 0 0] | xme_0 |
Initial Velocity [U V W] | [0 0 0] | Vm_0 |
Initial Euler Angles [phi theta psi] | [0 0 0] | eul_0 |
Initial Body Rates [p q r] | [0 0 0] | pm_0 |
Initial Mass | 1.0 | mass_0 |
Empty Mass | 0.5 | mass_e |
Full Mass | 3.0 | mass_f |
Empty Inertia | [1 0 0; 0 1 0; 0 0 1] | inertia_e |
Full Inertia | [2 0 0; 0 2 0; 0 0 2] | inertia_f |
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 | aerolib6dof2/Simple Variable Mass 6DOF (Euler Angles) |
| 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 | mtype = Simple Variable, vre_flag = off, mass_flag = off |
| ICore config | Simulink parameter | Value translation |
|---|---|---|
Units | units | Metric (MKS) → Metric (MKS), English (velocity in ft/s) → English (velocity in ft/s) |
Initial Position [Xe Ye Ze] | xme_0 | passes through |
Initial Velocity [U V W] | Vm_0 | passes through |
Initial Euler Angles [phi theta psi] | eul_0 | passes through |
Initial Body Rates [p q r] | pm_0 | passes through |
Initial Mass | mass_0 | passes through |
Empty Mass | mass_e | passes through |
Full Mass | mass_f | passes through |
Empty Inertia | inertia_e | passes through |
Full Inertia | inertia_f | passes through |
Caveat (shown to the user): aerolib6dof2/Simple Variable Mass 6DOF (Euler Angles) is continuous and has NO SampleTime parameter (verified against the R2026a block dialog). mtype, vre_flag and mass_flag are pinned because each moves that block's port list; the kts unit system is not offered because it converts velocities inside the integration; the dialog's inertia is not read at this mass type (measured); "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).
Simple Variable Mass 6DOF (Euler Angles) -- rigid-body equations of motion, simple variable mass The fixed-mass 6DOF (Euler Angles) block's state and outputs, plus the mass as a limited state.
Vb' = F/m - omega x Vb omega' = I^-1 (M - omega x (I omega) - Idot omega) I(m) = I_e + ((m - m_e)/(m_f - m_e)) (I_f - I_e), Idot = ((I_f - I_e)/(m_f - m_e)) m' m' = dm/dt, except 0 while m <= m_e with dm/dt < 0 or m >= m_f with dm/dt > 0, tested at EVERY Runge-Kutta stage on the raw stage mass; m clamped after the step
⚠ MEASURED AGAINST R2026a (a compiled EOM6DOFBodyEuler block at mtype = Simple Variable): ode4 at 1e-4 for 0.5 s from a state with every component nonzero, under constant, distinct inputs, the equations above reproduce Vb and omega to every printed digit inside the limits AND through a crossing in either direction (the tank emptied at dm/dt = -3, filled at +3) -- the 3dof Simple Variable Mass blocks' limit rule, unchanged. The dialog's
inertiais NOT read at this mass type (a diag(7,8,9) there changed nothing). The last output is the fuel tank status.I^-1 is the ADJUGATE over the determinant, formed at every derivative evaluation from I(m) entries, where the Simulink block solves; the two agree to rounding. Units, the pins and the ode4 equivalence are the fixed-mass 6DOF (Euler Angles) block's.
Sample results#
No stimulus produced a sampled output in this rig — Invalid input size at EOM 6DOF Simple Variable Mass Euler Angles block: ICore Blocks/Home/EOM 6DOF Simple Variable Mass Euler Angles. 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 07cc682bf · produced by docsSample --out <folder> --blocks EOM_6DOF_Custom_Variable_Mass_Euler_Angles EOM_6DOF_Custom_Variable_Mass_Quaternion EOM_6DOF_Simple_Variable_Mass_Euler_Angles EOM_6DOF_Simple_Variable_Mass_Quaternion --steps 60
Sample data: docs/generated/samples/Robotics__Equations_Of_Motion__EOM_6DOF_Simple_Variable_Mass_Euler_Angles.json