Generated reference › Planetary Ephemeris — Robotics/Celestial Phenomena
kind: generated#block#robotics-celestial-phenomena

Planetary Ephemeris — Robotics/Celestial Phenomena

Robotics/Celestial_Phenomena/Planetary_Ephemeris · 1 input / 2 output port(s) at insert · exports to Python, MATLAB, Java, Rust, C, C++

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.

Planetary Ephemeris

Robotics / Celestial Phenomena

Where one body is relative to another: the position of Target relative to Center at the input Julian date, in the ICRF frame, and its velocity – read from JPL's Development Ephemeris (the DE file you supply) and evaluated by JPL's own algorithm.

Ports

  • JD (TDB) – the Julian date in Barycentric Dynamical Time, [1,1]. A UTC date is about 69 s off.
  • position – Target relative to Center, [3,1], ICRF, in km, m or AU by Units.
  • velocity – its rate, [3,1], in km/s, m/s or AU/day by Units.

Parameters

  • Ephemeris Model – which JPL Development Ephemeris: DE405, DE421, DE423, DE430 or DE432t (default DE405, Simulink's). Each covers its own span of dates.
  • Ephemeris Folder – the folder holding JPL's published ASCII files for that model, header.4xx and the asc*.4xx data files, exactly as they download from ssd.jpl.nasa.gov/ftp/eph/planets/ascii/ (for DE432t, name them .432). Absolute, or relative to the project folder. The block reads them once and shares them. ICore ships no ephemeris: you supply the file, as MATLAB's support package does, and the files need cover only the dates you run.
  • Center / Target – Sun, Mercury, Venus, Earth, Moon, Mars, Jupiter, Saturn, Uranus, Neptune, Pluto, Solar system barycenter or Earth-Moon barycenter; default Earth and Moon.
  • Units – km and km/s (default), m and m/s or AU and AU/day. JPL answers km and km/day: km/s divides the rate by 86400, m and m/s multiply by 1000 first, and AU uses the ephemeris's own astronomical unit.
  • Use Date Range – Off (default) or On. On, a date outside Start Date..End Date has no answer, as one outside the loaded data has; and an export carries only that range's records, so an export needs it On.
  • Start Date / End Date – the range's Julian dates (TDB), default 2458849.5 and 2469807.5 (2020-01-01 and 2050-01-01, Simulink's).
  • Action – what a date with no answer does: Error (default) stops the run naming the date; Warning reports it once per run; None says nothing. With Warning and None the outputs are NaN.
  • Sampling Time (s) – zero or less inherits the solver's rate; a positive value runs the block at that period.

Notes

  • Stateless: each date is answered on its own.
  • Simulink's None and Warning actions answer a date outside the data by extending the nearest record's polynomial, measured on R2026a; that is not an ephemeris, and this block answers NaN there instead.

Code export

Python, MATLAB, Java, Rust, C and C++. Each carries only the 32-day records the date range falls in, packed to the coefficients its answer reads, and JPL's own evaluation of them, operation for operation as the block computes it – so Use Date Range must be On, and an export with it Off stops and says so. A date outside the range or the carried records answers NaN: a deployed core cannot stop, so Action Error answers NaN there too. The three HDL targets (VHDL, Verilog, SystemVerilog) and PLC Structured Text are not offered – an export to one of them stops and names this block – because a Julian date (about 2.4 million) cannot sit on a Q16.16 port, whose range ends at ±32768, and the records are thousands of constants.

Simulink bridge

Import and export, mapped to Aerospace Blockset's aerolibcelestial/Planetary Ephemeris: Ephemeris Model ↔ ephemerisModel, Center ↔ center, Target ↔ target, Units ↔ units (km,km/s, m,m/s, AU,AU/day), Use Date Range ↔ useDateRange, Start Date ↔ startDate, End Date ↔ endDate and Action ↔ action, all 1:1. Ephemeris Folder does not cross: Simulink reads MATLAB's support package. epochFormat is always Julian date and outputVelocity always on, because the other settings move Simulink's ports; an import that sets either otherwise is reported. The Simulink block has no SampleTime, so the rate stays on the ICore side.

Code facts#

FactValue
registered typeRobotics/Celestial_Phenomena/Planetary_Ephemeris
familyRobotics/Celestial_Phenomena
solver environment classICoreBlock_0_Robotics_1_Celestial_Phenomena_2_Planetary_Ephemeris
sourcesrc/ICoreBlocks/ICoreBlockLibrary/Blocks/Robotics/Celestial_Phenomena/Planetary_Ephemeris/ICoreBlock_0_Robotics_1_Celestial_Phenomena_2_Planetary_Ephemeris.cpp
headersrc/ICoreBlocks/ICoreBlockLibrary/Blocks/Robotics/Celestial_Phenomena/Planetary_Ephemeris/ICoreBlock_0_Robotics_1_Celestial_Phenomena_2_Planetary_Ephemeris.h
ports at insert1 in, 2 out
code generators implementedPython, MATLAB, Java, Rust, C, C++

Ports#

#DirectionSignal typeDescription label
1inICoreDoubleJD (TDB)
2outICoreDoubleposition
3outICoreDoublevelocity

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
Ephemeris ModelDE405%~%DE421%~%DE423%~%DE430%~%DE432t~~DE405ephemerisModel
Ephemeris Folder—not crossed
CenterSun%~%Mercury%~%Venus%~%Earth%~%Moon%~%Mars%~%Jupiter%~%S…center
TargetSun%~%Mercury%~%Venus%~%Earth%~%Moon%~%Mars%~%Jupiter%~%S…target
Unitskm and km/s%~%m and m/s%~%AU and AU/day~~km and km/sunits
Use Date RangeOff%~%On~~OffuseDateRange
Start Date2458849.5startDate
End Date2469807.5endDate
ActionNone%~%Warning%~%Error~~Erroraction

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 pathaerolibcelestial/Planetary Ephemeris
port-count rulePortsParam::None
SampleTime parameterno — the counterpart defines none; the rate stays on the ICore side
deliberately not crossedEphemeris Folder
always setepochFormat = Julian date, outputVelocity = on
ICore configSimulink parameterValue translation
Ephemeris ModelephemerisModelDE405 → DE405, DE421 → DE421, DE423 → DE423, DE430 → DE430, DE432t → DE432t
CentercenterSun → Sun, Mercury → Mercury, Venus → Venus, Earth → Earth, Moon → Moon, Mars → Mars, Jupiter → Jupiter, Saturn → Saturn, Uranus → Uranus, Neptune → Neptune, Pluto → Pluto, Solar system barycenter → Solar system barycenter, Earth-Moon barycenter → Earth-Moon barycenter
TargettargetSun → Sun, Mercury → Mercury, Venus → Venus, Earth → Earth, Moon → Moon, Mars → Mars, Jupiter → Jupiter, Saturn → Saturn, Uranus → Uranus, Neptune → Neptune, Pluto → Pluto, Solar system barycenter → Solar system barycenter, Earth-Moon barycenter → Earth-Moon barycenter
Unitsunitskm and km/s → km,km/s, m and m/s → m,m/s, AU and AU/day → AU,AU/day
Use Date RangeuseDateRangeOff → off, On → on
Start DatestartDatepasses through
End DateendDatepasses through
ActionactionNone → None, Warning → Warning, Error → Error

Caveat (shown to the user): One Julian date (TDB) in, the position and velocity of Target relative to Center out. 'epochFormat' is always 'Julian date' and 'outputVelocity' always 'on': the other settings move Simulink's ports, so an import setting them otherwise is reported. Ephemeris Folder is ICore's own (Simulink reads MATLAB's support package). Out of the data, Simulink's None and Warning extend the nearest record's polynomial; this block answers NaN. No SampleTime

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 no sample under docs/generated/samples/ — nothing to cross-check (P8.1)

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

Planetary Ephemeris -- where one body is relative to another, from JPL's DE ephemeris Aerospace Blockset, aerolibcelestial/Planetary Ephemeris, measured on R2026a with the Ephemeris Data support package installed (FEATURES_TO_ADD.md BF6.1/BF6.2, and 2026-10-02): a COMPILED block (BlockType=PlanetaryEphem, no mask), one input and two outputs, no SampleTime. ephemerisModel DE405 (default) / DE421 / DE423 / DE430 / DE432t; center Earth and target Moon by default, 13 choices each; units km,km/s (default), m,m/s or AU,AU/day; an optional date range (2020-01-01 to 2050-01-01) and an out-of-range action (Error by default). Measured: the velocity is JPL's km/day divided by 86400 (km/s) and AU is the DE's own constant; a date outside the data with action None or Warning EXTRAPOLATES the nearest record's polynomial silently, which this block declines (NaN); Error stops the run, as here. epochFormat "T0 and elapsed Julian time" and outputVelocity off move Simulink's ports, so this block always takes one Julian date and gives both outputs (fixed on the bridge).

Sample results#

No sample run is committed for this block. Samples come from the headless harness (DOCS_PLAN.md P8.1) into docs/generated/samples/; until one exists this block's behaviour is witnessed by the parity and export-verification suites, not by a plot here.