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.4xxand theasc*.4xxdata files, exactly as they download fromssd.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/sorAU 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) orOn. 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;Warningreports it once per run;Nonesays 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#
| Fact | Value |
|---|---|
| registered type | Robotics/Celestial_Phenomena/Planetary_Ephemeris |
| family | Robotics/Celestial_Phenomena |
| solver environment class | ICoreBlock_0_Robotics_1_Celestial_Phenomena_2_Planetary_Ephemeris |
| source | src/ICoreBlocks/ICoreBlockLibrary/Blocks/Robotics/Celestial_Phenomena/Planetary_Ephemeris/ICoreBlock_0_Robotics_1_Celestial_Phenomena_2_Planetary_Ephemeris.cpp |
| header | src/ICoreBlocks/ICoreBlockLibrary/Blocks/Robotics/Celestial_Phenomena/Planetary_Ephemeris/ICoreBlock_0_Robotics_1_Celestial_Phenomena_2_Planetary_Ephemeris.h |
| ports at insert | 1 in, 2 out |
| code generators implemented | Python, MATLAB, Java, Rust, C, C++ |
Ports#
| # | Direction | Signal type | Description label |
|---|---|---|---|
| 1 | in | ICoreDouble | JD (TDB) |
| 2 | out | ICoreDouble | position |
| 3 | out | ICoreDouble | velocity |
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 |
|---|---|---|
Ephemeris Model | DE405%~%DE421%~%DE423%~%DE430%~%DE432t~~DE405 | ephemerisModel |
Ephemeris Folder | — | not crossed |
Center | Sun%~%Mercury%~%Venus%~%Earth%~%Moon%~%Mars%~%Jupiter%~%S… | center |
Target | Sun%~%Mercury%~%Venus%~%Earth%~%Moon%~%Mars%~%Jupiter%~%S… | target |
Units | km and km/s%~%m and m/s%~%AU and AU/day~~km and km/s | units |
Use Date Range | Off%~%On~~Off | useDateRange |
Start Date | 2458849.5 | startDate |
End Date | 2469807.5 | endDate |
Action | None%~%Warning%~%Error~~Error | action |
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 | aerolibcelestial/Planetary Ephemeris |
| port-count rule | PortsParam::None |
SampleTime parameter | no — the counterpart defines none; the rate stays on the ICore side |
| deliberately not crossed | Ephemeris Folder |
| always set | epochFormat = Julian date, outputVelocity = on |
| ICore config | Simulink parameter | Value translation |
|---|---|---|
Ephemeris Model | ephemerisModel | DE405 → DE405, DE421 → DE421, DE423 → DE423, DE430 → DE430, DE432t → DE432t |
Center | center | Sun → 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 |
Target | target | Sun → 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 |
Units | units | km and km/s → km,km/s, m and m/s → m,m/s, AU and AU/day → AU,AU/day |
Use Date Range | useDateRange | Off → off, On → on |
Start Date | startDate | passes through |
End Date | endDate | passes through |
Action | action | None → 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:
B0no 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.