Quick Start¶
Install¶
The Community package provides the full core API: orbital mechanics, SPICE integration, propagation (Velocity-Verlet), maneuvers, attitude control, geometry searches, and CCSDS OMM/OPM support.
The Pro package includes the Community API plus advanced integrators (RK78), conjunction assessment, Monte Carlo analysis, batch propagation, and CDM support. The community package IO.Astrodynamics is pulled in automatically as a dependency.
License required
The Professional Edition requires a valid license key set via the IOASTRO_LICENSE environment variable. Builds will fail without it.
Load SPICE Kernels¶
Most calculations require kernels before any ephemeris, frame, or geometry work:
You can also load an individual file:
Compute A Basic Ephemeris¶
using IO.Astrodynamics;
using IO.Astrodynamics.Body;
using IO.Astrodynamics.TimeSystem;
using IO.Astrodynamics.SolarSystemObjects;
SpiceAPI.Instance.LoadKernels(new DirectoryInfo("Data/SolarSystem"));
var earth = PlanetsAndMoons.EARTH_BODY;
var sun = new CelestialBody(Stars.Sun);
var epoch = new Time(2024, 6, 21, 12, 0, 0);
var stateVector = earth.GetEphemeris(epoch, sun, Frames.Frame.ICRF, Aberration.None)
.ToStateVector();
Console.WriteLine($"Position: {stateVector.Position}");
Console.WriteLine($"Velocity: {stateVector.Velocity}");
Create An Orbit¶
using IO.Astrodynamics.OrbitalParameters;
var earth = PlanetsAndMoons.EARTH_BODY;
var epoch = new Time(2024, 1, 1, 0, 0, 0);
var orbit = new KeplerianElements(
a: 7000000.0,
e: 0.001,
i: 51.6 * Constants.Deg2Rad,
raan: 100.0 * Constants.Deg2Rad,
aop: 90.0 * Constants.Deg2Rad,
m: 0.0,
observer: earth,
epoch: epoch,
frame: Frames.Frame.ICRF
);
Console.WriteLine($"Period: {orbit.Period().TotalHours:F2} hours");
Parse A TLE¶
using IO.Astrodynamics.OrbitalParameters.TLE;
var tle = new TLE("ISS (ZARYA)",
"1 25544U 98067A 21020.53488036 .00016717 00000-0 10270-3 0 9054",
"2 25544 51.6423 353.0312 0000493 320.8755 39.2360 15.49309423 25703");
var epoch = new Time(2021, 1, 21, 12, 0, 0);
var sv = tle.ToStateVector(epoch);
Propagate An Orbit¶
The Community Edition uses the Velocity-Verlet fixed-step integrator:
using IO.Astrodynamics.Body.Spacecraft;
using IO.Astrodynamics.Propagator;
// Define spacecraft with initial orbital parameters
var spacecraft = new Spacecraft(
id: -1001,
name: "MySat",
mass: 500.0,
initialOrbitalParameters: orbit,
fuelTank: fuelTank,
engine: engine);
// Propagate with Velocity-Verlet
var propagator = new CentralBodyPropagator(
spacecraft: spacecraft,
integrator: new VVIntegrator(
stepSize: TimeSpan.FromSeconds(10),
forces: forces,
observer: earth,
frame: Frames.Frame.ICRF));
var solution = propagator.Propagate(propagationWindow, celestialBodies);
var finalState = solution.InterpolateAt(propagationWindow.EndDate);
The Professional Edition provides the adaptive RK7(8) integrator with sub-step event refinement:
using IO.Astrodynamics.Pro.Propagator;
var propagator = new CentralBodyPropagatorBuilder(spacecraft)
.WithGeopotential(degree: 10)
.WithThirdBodies(sun, moon)
.WithAtmosphericDrag()
.WithSolarRadiationPressure()
.WithAbsoluteTolerance(1e-10)
.WithRelativeTolerance(1e-10)
.Build();
var solution = propagator.Propagate(propagationWindow, celestialBodies);
var finalState = solution.InterpolateAt(propagationWindow.EndDate);
Next Steps¶
- Ephemeris Queries — query positions of planets, moons, and spacecraft
- Coordinate Conversions — frame transforms and Earth orientation
- Orbit Creation — Keplerian, equinoctial, and Cartesian representations
- TLE & OMM — TLE parsing, OMM interchange, and SGP4 propagation
- Numerical Propagation — high-accuracy orbit propagation with force models
- API Reference — systematic type documentation