Generated reference › Solar Flux And Geomagnetic Index — Robotics/Celestial Phenomena
kind: generated#block#robotics-celestial-phenomena

Solar Flux And Geomagnetic Index — Robotics/Celestial Phenomena

Robotics/Celestial_Phenomena/Solar_Flux_And_Geomagnetic_Index · 3 input / 3 output port(s) at insert · exports to Python, MATLAB, Java, Rust, C, C++, 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.

Solar Flux and Geomagnetic Index

Robotics / Celestial Phenomena

The solar radio flux F10.7 and the geomagnetic indices Ap for a UTC instant, read out of the space-weather table – the three drivers the NRLMSISE-00 atmosphere takes, in the shapes it takes them. With u the instant in days since 1 October 1957 and d = floor(u):

  • F107 = F10.7 of the previous day, F(d − 1)
  • F107a = the 81-day centred average of F10.7 at d
  • aph = the daily Ap of day d, the 3-hour ap of the current slot floor(8u) and of the three before it, and the means of the eight 3-hour values 12–33 and 36–57 hours before

The table (the CelesTrak consolidated file as MATLAB R2026a ships it, aeroSpaceWeatherData.mat) has daily rows from 1 October 1957 to 16 March 2025, then monthly predicted rows to 1 October 2041 that carry F10.7 and no geomagnetic data. F10.7 is interpolated linearly between rows, y₁ + (x − x₁)(y₂ − y₁)/(x₂ − x₁), which reads every daily row exactly. Outside the table the extrapolation settings decide:

  • F10.7, before 1 October 1957 and from 1 November 2041 (the end of the last row's month): the first or last row (None - clip), a Constant, or the Least squares fit 128.2351780622538 + 54.3285872213434·cos(0.0015460708364·t + 0.2429462096495·sin(0.0015563188188·t)), t in days since 1 October 1957. Between the last row and 1 November 2041 the last row holds. There the 81-day average is no longer the table's: it is the mean of F10.7 over d − 40 to d + 40, summed in order.
  • Ap, outside the daily rows (the monthly ones included): the nearest daily row (None - clip, keeping the 3-hour slot, so before the table the first day's eight values repeat) or a Constant, slot by slot.

Ports

  • year – the UTC year, a scalar [1,1]; a fraction is dropped.
  • doy – the day of year, 1 for 1 January, a scalar [1,1]. A fraction counts as part of a day, and a value past the year's end carries into the next.
  • sec – the UTC seconds of the day, a scalar [1,1]; 86400 or more carries into the next day.
  • F107a – the 81-day centred average of F10.7, in solar flux units (10−22 W m−2 Hz−1), [1,1].
  • F107 – the previous day's F10.7, in the same units, [1,1].
  • aph – the seven magnetic indices above, [7,1]: the NRLMSISE-00 Atmosphere block's aph input.

Parameters

  • F10.7 Extrapolation Method – how F10.7 and its average are carried outside the table:
    • None - clip (default) – the first row before it, the last row after it.
    • Constant – the F10.7 Extrapolation Value.
    • Least squares fit – the trigonometric fit above.
  • F10.7 Extrapolation Value – the constant for Constant, a scalar of zero or more (default 150).
  • Magnetic Index Extrapolation Method – how the indices are carried outside the daily rows:
    • None - clip (default) – the nearest daily row, slot for slot.
    • Constant – the Magnetic Index Extrapolation Value.
  • Magnetic Index Extrapolation Value – the constant for Constant, a scalar of zero or more (default 4).
  • Sampling Time (s) – zero or less inherits the solver's rate; a positive value runs the block at that period.

Code export

Seven targets: Python, MATLAB, Java, Rust, C, C++ and PLC Structured Text. Each carries the whole table – about 270000 numbers, the 3-hour indices as integers – and the lookup, with the extrapolation settings baked in, so every target answers what the block's own simulation answers. Java receives the table as text parsed once, because array literals that long exceed a Java method's size limit.

The three HDL targets (VHDL, Verilog, SystemVerilog) are not offered – an export to one of them stops and names this block – because the UTC seconds (to 86400) cannot sit on a Q16.16 port, whose range ends at ±32768.

Simulink bridge

Import and export, mapped to Aerospace Blockset's aerolibcelestial/Solar Flux and Geomagnetic Index. Four configuration values cross, one for one: F10.7 Extrapolation Method → F107ExtrapMethod, F10.7 Extrapolation Value → F107ExtrapValue, Magnetic Index Extrapolation Method → MagneticIndexExtrapMethod and Magnetic Index Extrapolation Value → MagneticIndexExtrapValue. Simulink's third index method, IGRF, is not offered here, and an import that names it is reported. Two Simulink parameters are always implied: SpaceWeatherDataFile is aeroSpaceWeatherData.mat, the table this block carries, and InputSpec is Year, day, sec, since its Julian date setting gives the Simulink block one input rather than three and no configuration here can change the ports. The Simulink block defines no SampleTime parameter, measured, so the rate stays on the ICore side. The global Sampling Time (s) → SampleTime pair therefore does not cross.

Notes

  • Algebraic and stateless: the outputs depend on this sample's instant alone.
  • Not linear, so the block carries no state space and model reduction correctly reports it as unmergeable.
  • The table is a snapshot, republished daily by CelesTrak; dates past it read the extrapolation until the block's table is refreshed.
  • Verified against R2026a's block: the arithmetic of every region – the daily rows, the monthly interpolation, both ends and all three flux settings – agrees bit for bit, the least-squares cosine to within a unit in the last place.

Code facts#

FactValue
registered typeRobotics/Celestial_Phenomena/Solar_Flux_And_Geomagnetic_Index
familyRobotics/Celestial_Phenomena
solver environment classICoreBlock_0_Robotics_1_Celestial_Phenomena_2_Solar_Flux_And_Geomagnetic_Index
sourcesrc/ICoreBlocks/ICoreBlockLibrary/Blocks/Robotics/Celestial_Phenomena/Solar_Flux_And_Geomagnetic_Index/ICoreBlock_0_Robotics_1_Celestial_Phenomena_2_Solar_Flux_And_Geomagnetic_Index.cpp
headersrc/ICoreBlocks/ICoreBlockLibrary/Blocks/Robotics/Celestial_Phenomena/Solar_Flux_And_Geomagnetic_Index/ICoreBlock_0_Robotics_1_Celestial_Phenomena_2_Solar_Flux_And_Geomagnetic_Index.h
default size on canvas170 × 100 px
ports at insert3 in, 3 out
code generators implementedPython, MATLAB, Java, Rust, C, C++, PLC Structured Text

Ports#

#DirectionSignal typeDescription label
1inICoreDoubleyear
2inICoreDoubledoy
3inICoreDoublesec
4outICoreDoubleF107a
5outICoreDoubleF107
6outICoreDoubleaph

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
F10.7 Extrapolation MethodNone - clip%~%Constant%~%Least squares fit~~None - clipF107ExtrapMethod
F10.7 Extrapolation Value150F107ExtrapValue
Magnetic Index Extrapolation MethodNone - clip%~%Constant~~None - clipMagneticIndexExtrapMethod
Magnetic Index Extrapolation Value4MagneticIndexExtrapValue

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/Solar Flux and Geomagnetic Index
port-count rulePortsParam::None
SampleTime parameterno — the counterpart defines none; the rate stays on the ICore side
always setSpaceWeatherDataFile = aeroSpaceWeatherData.mat, InputSpec = Year, day, sec
ICore configSimulink parameterValue translation
F10.7 Extrapolation MethodF107ExtrapMethodNone - clip → None - clip, Constant → Constant, Least squares fit → Least squares fit
F10.7 Extrapolation ValueF107ExtrapValuepasses through
Magnetic Index Extrapolation MethodMagneticIndexExtrapMethodNone - clip → None - clip, Constant → Constant
Magnetic Index Extrapolation ValueMagneticIndexExtrapValuepasses through

Caveat (shown to the user): three inputs -- the UTC year, day of year and seconds -- and three outputs: the 81-day average F10.7, the previous day's F10.7 and the seven-element aph. 'SpaceWeatherDataFile' is always aeroSpaceWeatherData.mat (the table this block carries) and 'InputSpec' always 'Year, day, sec' (its Julian date setting is one input port, and no configuration here moves ports). The index method IGRF is not offered and is reported on import. The Simulink block has no SampleTime, so the rate stays on the ICore side

Catalog contract: src/ICoreBlocks/ICoreCoder/ICoreCommandSystem/SimulinkBridge/ICoreSimulinkBlockCatalog.h

Description vs code#

The lists agree. check_block_descriptions.py finds no disagreement between the description's Ports, Parameters, Code export and Simulink bridge lists and the code's.

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

Solar Flux and Geomagnetic Index -- F10.7 and Ap from the space-weather table u = the UTC instant in days since 1957-10-01, d = floor(u) F107 = F10.7(d - 1) the table interpolated linearly over its rows F107a = the 81-day centred average at d, or the mean of F10.7(d-40 .. d+40) outside aph = [Ap(d); ap at the 3-hour slots floor(8u), -1, -2, -3; the two 8-slot means]

The table is the one MATLAB R2026a ships as aeroSpaceWeatherData.mat, the Simulink block's default data file, so at its defaults the Simulink block reads exactly these numbers. What happens outside the table is the two extrapolation settings -- see ICoreSpaceWeatherSupport, where every rule is written down with the measurement that pinned it.

ALGEBRAIC and STATELESS, and nonlinear in its inputs, so no state space.

Sample results#

Solar Flux And Geomagnetic Index — Repeating Sequence Stair: [-2 -1 -0.5 0 0.5 1 2 3], one entry per sampleSolar Flux And Geomagnetic Index — Repeating Sequence Stair: [-2 -1 -0.5 0 0.5 1 2 3], one entry per sample0100200012345t (s)in ICoreDouble-Out-0in ICoreDouble-Out-0in ICoreDouble-Out-0out ICoreDouble-Out-0out ICoreDouble-Out-1out ICoreDouble-Out-2 [7x1] entry 0
tin ICoreDouble-Out-0in ICoreDouble-Out-0in ICoreDouble-Out-0out ICoreDouble-Out-0out ICoreDouble-Out-1out ICoreDouble-Out-2 [7x1] entry 0
0-2-2-2269.3269.3[21, 22, 32, 9]…
0.40.50.50.5269.3269.3[21, 22, 7, 15]…
0.8-2-2-2269.3269.3[21, 22, 32, 9]…
1.20.50.50.5269.3269.3[21, 22, 7, 15]…
1.6-2-2-2269.3269.3[21, 22, 32, 9]…
20.50.50.5269.3269.3[21, 22, 7, 15]…
2.4-2-2-2269.3269.3[21, 22, 32, 9]…
2.80.50.50.5269.3269.3[21, 22, 7, 15]…
3.2-2-2-2269.3269.3[21, 22, 32, 9]…
3.60.50.50.5269.3269.3[21, 22, 7, 15]…
4-2-2-2269.3269.3[21, 22, 32, 9]…
4.40.50.50.5269.3269.3[21, 22, 7, 15]…
4.8-2-2-2269.3269.3[21, 22, 32, 9]…
5.20.50.50.5269.3269.3[21, 22, 7, 15]…

Every 4th of 60 samples, from the table stimulus.

The same rig also ran:

StimulusWhat it isOutput range
impulseImpulse: one sample of 1 at k = 5, 0 elsewhere (Repeating Sequence Stair)269.3 … 269.3
rampRamp: slope 1 from t = 0269.3 … 269.3
sineSine Wave: amplitude 1, 2 rad/s, no phase, no bias269.3 … 269.3
stepStep: 0 -> 1 at t = 1 s269.3 … 269.3

Plotted: table — Repeating Sequence Stair: [-2 -1 -0.5 0 0.5 1 2 3], one entry per sample

Category static · sample time 0.1 · 60 steps · commit b49c05f40672865c8bb77754993746c91a24cec9 · produced by docsSample --out <folder> --blocks Solar_Flux_And_Geomagnetic_Index --steps 60 · data docs/generated/samples/Robotics__Celestial_Phenomena__Solar_Flux_And_Geomagnetic_Index.json · the SVG is generated from those numbers by tools/docs/plot_svg.py, so it is a run and not a drawing (R-D10).