Generated reference › LLA To ECI Position — Robotics/Axes Transformations
kind: generated#block#robotics-axes-transformations

LLA To ECI Position — Robotics/Axes Transformations

φλh i

Robotics/Axes_Transformations/LLA_To_ECI_Position · 6 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.

LLA To ECI Position

Robotics / Axes Transformations

Takes a geodetic position to the Earth-centred inertial frame: the ellipsoid forward, then the IAU-2000/2006 rotation applied in reverse. With e² = f(2 − f):

  • N = R/√(1 − e²sin²φ), ρ = (N + h)cosφ
  • pECEF = [ρcosλ; ρsinλ; (N(1 − e²) + h)sinφ]
  • pECI = DCM(t)′·pECEF – the same W·R·Q the matrix block computes, transposed, which is its inverse because the matrix is orthogonal

The date is a parameter and only a time increment arrives on a port.

Ports

  • LLA – latitude and longitude in DEGREES and the altitude above the ellipsoid, stacked as one [3,1] – the shape the Simulink block uses. Neither side enforces a range: a latitude past a pole is computed rather than judged.
  • dUT1 – UT1 − UTC in seconds, a scalar [1,1]; it moves the Earth rotation angle.
  • dAT – TAI − UTC in seconds, a scalar [1,1]; it moves terrestrial time, and so the precession and the series.
  • xp_yp – polar motion along x and y in radians, one [2,1].
  • dX_dY – the measured offsets of the Celestial Intermediate Pole in radians, one [2,1].
  • dt – the time increment added to the configured date, a scalar [1,1] in the unit Time Increment names.
  • X_ECI – the inertial position, one [3,1] in R's length unit.

Parameters

  • Reduction – which reduction to run:
    • IAU-2000/2006 (the default) – the CIO based reduction, computed here in full, including the 2941-term series for the pole.
    • IAU-76/FK5 – refused, with the reason: it reads its nutation angles from the JPL DE405 ephemeris, a data file that ships in a separate data package rather than in the toolbox. Selecting it stops the run.
  • Year, Month, Day, Hour, Minutes, Seconds – the UTC instant the rotation is evaluated at. Year, hour and minute are truncated; the seconds keep their fraction. The defaults are the Simulink block's: 2013-January-1, 00:00:00.
  • Time Increment – the unit of the dt port, and so the field it is added to: Day (the default), Hour, Min or Sec.
  • Flattening – the ellipsoid's flattening f, dimensionless. Defaults to 0.0033528106647474805, WGS84's 1/298.257223563. A value of exactly 1 is refused.
  • Equatorial Radius – the ellipsoid's equatorial radius R. Defaults to WGS84's 6378137 metres, and its unit is the unit the positions are read and written in.
  • 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.

Every target carries the whole 2941-term series the rotation needs – 18768 integers – so a generated program for this block is a few hundred kilobytes and evaluates 2941 sines and cosines per sample. The date's whole-day part is folded to one constant at export time; the ellipsoid is inlined.

The three hardware targets are simulation-only real arithmetic: the arithmetic behind the rotation spans from 2×109 microarcseconds down to 10−2, which a fixed-point datapath cannot hold. A Q16.16 port also cannot carry an Earth-sized position – it saturates past about 32767 – so a hardware export of this block is for a small custom body or for lengths in a larger unit, and the xp_yp and dX_dY ports quantize at 1.5×10−5, which is larger than the corrections they carry.

Simulink bridge

Import and export, mapped to Aerospace Blockset's aerolibtransform2/LLA to ECI Position. Reduction → red, the six date parameters → year, month, day, hour, min, sec, Time Increment → deltaT, Flattening → flat and Equatorial Radius → eqradius. Four Simulink parameters are always implied: errorflag None, extraparamflag on, earthmodel Custom and eunits Metric (MKS). The Simulink block defines no SampleTime.

Notes

  • Algebraic and stateless.
  • Not linear, so the block carries no state space.
  • MATLAB reaches its sines through sind/cosd, which are exact at multiples of 90 and cannot be reproduced from a plain sine, so the two sides agree to about a unit in the last place rather than bit for bit – measured against R2026a over 200 samples, 5.3×10−15.
  • It is the exact inverse of ECI Position To LLA up to that geodesy: the rotation is one matrix used both ways.

Code facts#

FactValue
registered typeRobotics/Axes_Transformations/LLA_To_ECI_Position
familyRobotics/Axes_Transformations
solver environment classICoreBlock_0_Robotics_1_Axes_Transformations_2_LLA_To_ECI_Position
sourcesrc/ICoreBlocks/ICoreBlockLibrary/Blocks/Robotics/Axes_Transformations/LLA_To_ECI_Position/ICoreBlock_0_Robotics_1_Axes_Transformations_2_LLA_To_ECI_Position.cpp
headersrc/ICoreBlocks/ICoreBlockLibrary/Blocks/Robotics/Axes_Transformations/LLA_To_ECI_Position/ICoreBlock_0_Robotics_1_Axes_Transformations_2_LLA_To_ECI_Position.h
default size on canvas170 × 130 px
ports at insert6 in, 1 out
code generators implementedPython, MATLAB, Java, Rust, C, C++, VHDL, Verilog, SystemVerilog, PLC Structured Text

Ports#

#DirectionSignal typeDescription label
1inICoreDoubleLLA
2inICoreDoubledUT1
3inICoreDoubledAT
4inICoreDoublexp_yp
5inICoreDoubledX_dY
6inICoreDoubledt
7outICoreDoubleX_ECI

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
Reductionstd::string(RED_FK5)%~%RED_2000~~RED_2000—
Year2013—
MonthmonthCombo()—
Day1—
Hour0—
Minutes0—
Seconds0—
Time IncrementDay%~%Hour%~%Min%~%Sec~~Day—
FlatteningICoreEciEcef::fmt(WGS84_F)—
Equatorial RadiusICoreEciEcef::fmt(WGS84_R)—

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 pathaerolibtransform2/LLA to ECI Position
port-count rulePortsParam::None
SampleTime parameterno — the counterpart defines none; the rate stays on the ICore side
always seterrorflag = None, extraparamflag = on, earthmodel = Custom, eunits = Metric (MKS)
ICore configSimulink parameterValue translation
CONFIG_RED.c_str()redRED_2000 → RED_2000, RED_FK5 → RED_FK5
CONFIG_YEAR.c_str()yearpasses through
CONFIG_MONTH.c_str()monthpasses through
CONFIG_DAY.c_str()daypasses through
CONFIG_HOUR.c_str()hourpasses through
CONFIG_MIN.c_str()minpasses through
CONFIG_SEC.c_str()secpasses through
CONFIG_INC.c_str()deltaTDay → Day, Hour → Hour, Min → Min, Sec → Sec
CONFIG_F.c_str()flatpasses through
CONFIG_R.c_str()eqradiuspasses through

Caveat (shown to the user): the position crosses on the FIRST port and the four corrections and the time increment follow, exactly as the Simulink block is drawn; the date is a parameter on both sides. 'extraparamflag' is always written as on, which is what gives the Simulink block those four correction ports. 'errorflag' is always None: this block never stops a run over the increment's range. 'earthmodel' is always Custom and 'eunits' always Metric (MKS) -- Custom is not cosmetic, because a block left on its WGS84 setting accepts a written flattening or radius and DISCARDS it (measured on the sibling ECEF blocks in R2026a). Simulink's deltaT value 'None' removes the input port and is not offered. No SampleTime parameter, so the rate stays on the ICore side. \u26a0 'Reduction' crosses both ways but only IAU-2000/2006 RUNS: IAU-76/FK5 reads its nutation angles from the JPL DE405 ephemeris, which ships in a separate data package rather than in the toolbox, so an imported model that selects it is carried faithfully and refused at run time with that reason

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 10 Simulink params rule(s) this tool cannot resolve
  • 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).

LLA To ECI Position -- geodetic coordinates to an inertial position N = R / sqrt(1 - e2 sin^2 lat), rho = (N + h) cos(lat) p_ECEF = [rho cos(lon); rho sin(lon); (N (1 - e2) + h) sin(lat)] p_ECI = DCM(t)' * p_ECEF the IAU-2000/2006 reduction, TRANSPOSED

The cheap direction of the geodesy -- four lines and no iteration -- against the expensive direction of the rotation, which is ICoreEciEcefSupport's and is shared with the other three blocks of this group.

⚠ THE ROTATION IS TRANSPOSED, NOT RE-DERIVED. The matrix is orthogonal, so the inverse IS the transpose, and the masked Simulink subsystem does exactly that: one Math Function 'transpose' between the same reduction and the product.

⚠ THE OTHER REDUCTION IS REFUSED BY NAME: IAU-76/FK5 needs the JPL DE405 nutation ephemeris, which ships in a separate data package rather than with the toolbox.

ALGEBRAIC and STATELESS.

Sample results#

No stimulus produced a sampled output in this rig — Invalid input size at LLA To ECI Position block: ICore Blocks/Home/LLA To ECI Position. 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 875fdbf564cf31a145283edf6a75dc1d64d1090a · produced by docsSample --out <folder> --blocks Wigner_Ville_Distribution Cross_Wigner_Ville_Distribution Inverse_STFT Fourier_Synchrosqueezed_Transform Time_Frequency_Ridges Frequency_Domain_Filter_Identification Fill_Gaps EOM_6DOF_ECEF_Quaternion EOM_6DOF_Custom_Variable_Mass_ECEF_Quaternion EOM_6DOF_Simple_Variable_Mass_ECEF_Quaternion ECI_To_ECEF_Rotation_Matrix ECI_Position_To_LLA LLA_To_ECI_Position ECI_Position_To_AER --steps 60

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