About Sphaera
Sphaera 4 is a positional-astronomy application: it computes the full chain ICRF → GCRS → ITRS → topocentric (azimuth/altitude, right ascension/declination, ecliptic coordinates) from JPL/NAIF SPICE ephemerides and IAU time scales, and renders it through several interactive pages (Visible Sky, Star Atlas, Ephemeris, Time, Observer, Charts).
__________________
author:
Nicola Scarpel
nicola.scarpel@sphaeramundi.org
Rete di Eratostene
__________________
Sphaera 3 was written in Python on top of the Skyfield library; version 4 is a ground-up reimplementation in Julia with its own astronomy engine and a web interface.
Languages & stack
| Layer | Technology |
|---|---|
| Computation engine | Julia (astronomy library + dynamics) |
| Web server / API | Julia — HTTP.jl + JSON3.jl (JSON over HTTP) |
| Frontend | JavaScript (vanilla, no framework), HTML5, CSS |
| Graphics | Hand-drawn SVG (sky maps, charts, planetary disks & rings) |
Three-layer architecture: sky.jl (engine, loaded once) → web/report.jl
(computation reports) → web/server.jl (routing + JSON). All rendering happens
client-side; the server sends numbers, not images.
Julia packages
- SPICE.jl — NAIF/JPL SPICE toolkit (ephemerides, orientation kernels)
- HTTP.jl, JSON3.jl — web server & JSON
- Arrow.jl, DataFrames.jl — star/constellation catalogs (
.arrow) - TimeZones.jl — time-zone handling (local time, DST)
- Plots.jl — optional, server-side planetary rendering
- StaticArrays, LinearAlgebra, Dates, Printf — numerics & formatting
Data
- SPICE kernels:
de440s.bsp(DE440 planetary ephemeris),jup365.bsp/sat441.bsp(Galilean & Saturn satellites),pck00011.tpc(orientation/shape),gm_de440.tpc(GM), leap-second kernel - Star data:
hip.arrow(unified catalog at epoch J2000.0: Hipparcos + Tycho-2 (main + Supplement 1) to V ≤ 11, ~960k stars),cnames.arrow(88 constellation names),clines_stellarium.json(constellation line topology) - Constellation boundaries:
data.dat— the IAU boundaries traced by E. Delporte (1930), referenced to equinox B1875; machine-readable identification table by N. G. Roman (1987, CDS/VizieR VI/42), used to name the constellation containing any RA/Dec point - Milky Way:
mw.json(GeoJSON isophotes, d3-celestial)
Frontend & external services
- Vanilla JavaScript with hand-drawn SVG; state persisted in
localStorage; per-visitor server session via cookie - Leaflet 1.9.4 (vendored) + OpenStreetMap tiles — clickable map on the Observer page
- Nominatim / OpenStreetMap — geocoding (place ↔ coordinates)
- Open-Topo Data / Open-Elevation — elevation above sea level
- JPL SBDB — on-demand orbital elements & physical parameters for asteroids and comets
- SIMBAD / CDS — remote resolution of objects outside the local catalogs
Astronomical models
- IAU 2006 precession (Fukushima-Williams) + IAU 2000A/2000B nutation (10 or 77 terms)
- Earth Rotation Angle, GMST/GAST (IAU 2006), equation of the equinoxes
- Annual + diurnal aberration, annual parallax, proper motion (from J1991.25)
- Atmospheric refraction (Bennett 1982 with temperature/pressure correction)
- Planetary magnitudes (Mallama & Hilton 2018), disk phase, oblateness, Saturn-ring geometry
Minor bodies (asteroids & comets)
Asteroids and comets are resolved on demand from JPL's
Small-Body Database (SBDB):
type a name, IAU number or designation — Eros, 433, Halley,
C/1987 T1 — and when the name matches several objects (e.g. Levy) a list of
choices appears. The position is computed by two-body Keplerian propagation of the
osculating orbital elements (ecliptic J2000), through the same light-time and aberration chain as the
planets — validated against JPL Horizons to sub-arcsecond. Brightness uses the H–G
system for asteroids and the M1/K1 model for comets (best-effort, unreliable far from
the Sun). A reliability flag reflects how far the requested date is from the epoch of
the orbital elements. Minor bodies work on every page — Ephemeris, Visible Sky, Star Atlas, Tracks and
Charts.
Validated against Skyfield, JPL Horizons and Sphaera (the author's earlier program).
Recent updates
- New "Astrolabe": the planispheric instrument built step by step — mater, plate, alidade and rete — with the geometric construction of every one of its circles and the rete complete with stars, in both the northern and southern form and in the ancient openwork style as well.
- New "Solar algorithm comparison": the Sun's coordinates computed three ways — SPICE, simplified Meeus and Meeus VSOP87 — side by side.
- New "Gnomonic solar table": relates date, solar longitude (modern and ancient) and declination for a chosen epoch — the basis for graduating scales and engravings.
- New "Equatorial armillary" sundial: a 3D ring instrument (hours read on the equatorial ring, the calendar on the meridian ring) with engraved scales and an explanatory diagram.
- Jupiter's Great Red Spot: shown at its real longitude on the globe, with data and transit times in the Ephemeris table and dedicated events.
Preset links (URL parameters)
Any page can carry its state in the address bar, so a link opens straight into a chosen configuration for whoever clicks it. The full reference of keys and aliases (core, time, sundials, 3D views, fullscreen) lives on a dedicated page: