orbitr is a work in progress. This page is a running
list of features I’m thinking about adding in future versions. Nothing
here is promised, and the priority order is loose — it mostly reflects
what I personally find interesting or what users have asked for. If any
of these sound useful (or terrible), let me know. Suggestions, feedback,
and pull requests are all very welcome.
radius argument on add_body()Right now bodies are treated as point masses. This is fine for most
orbital distances — gravity outside a sphere behaves exactly as if all
the mass were concentrated at its center (the shell theorem) — but it
means there’s no concept of two bodies physically touching. Adding an
optional radius parameter would enable collision detection,
merging on contact, and more realistic close-encounter behavior.
I’d probably add it to add_body() as an optional
parameter with a sensible default, something like:
If r is supplied for any body in the system, the
integrator would check for overlaps on each step and handle them
according to a user-chosen policy (elastic bounce, inelastic merge,
simulation halt, etc.).
In the meantime, the existing softening parameter on
simulate_system() partly works around the missing-radius
problem by preventing the gravitational force from blowing up at very
small separations — see The Physics for
details.
Optional support for forces beyond pure Newtonian gravity:
A small post-Newtonian correction term would let orbitr
reproduce real GR effects like the precession of Mercury’s perihelion.
Probably opt-in via an argument on simulate_system(), since
most users wouldn’t need it.
Implemented as add_body_keplerian(). See
?add_body_keplerian for details.
load_solar_system() convenienceImplemented as load_solar_system(). Builds the Sun, all
eight planets, the Moon, and Pluto using real Keplerian elements from
JPL DE440. See ?load_solar_system for details.
Implemented as save_system() /
load_system(), which write a full orbit_system
to an .rds file and restore it later, and
export_bodies(), which writes the body table to CSV for use
outside R. See ?save_system for details.
A simple progress indicator on simulate_system() for
runs that take more than a few seconds, with an option to disable it for
scripted use.
Implemented as get_energy(),
get_momentum(), and get_angular_momentum(),
which compute the system totals at every time step, and
conserved_quantities(), which joins them with relative
errors against the initial values. See Checking a Simulation.
simulate_system() still integrates with a fixed step,
but continue_simulation() lets you run in segments with
different steps — large steps where nothing is happening, small ones
through a close approach — and system_from_simulation()
rebuilds a system from any snapshot of a run. A true adaptive-step
integrator that keeps Verlet’s energy behavior is a harder problem and
remains on the list.
If any of these sound useful, if you’d like to see something not on
this list, or if you have a use case that orbitr doesn’t
currently handle well, please open an issue on GitHub. I’d love
to hear about how people are using the package and what would make it
more useful. Pull requests are also very welcome.