Interactive Learning

Python Simulations

Modify and run Python code directly in your browser to explore the principles of orbital mechanics.

Before You Begin

Python Prerequisites

Basic Python Knowledge Recommended

These simulations allow you to modify and execute Python code directly in your browser. A basic understanding of Python syntax will help you change parameters, understand calculations, and interpret the results.

No local installation is required

Python runs directly on this page through Pyodide. However, users should be familiar with variables, mathematical operations, functions, lists, and basic Python syntax.

Simulation Library

Choose a Simulation

Select a simulation, adjust its Python parameters, and compare the numerical and graphical results.

Loading the Python environment…

Python Library

Available Functions

The following constants and functions are already implemented in the SpaceOrbitLAB Python library and can be used directly in the simulations.

Earth.mu

Earth's standard gravitational parameter in km³/s².

sind(angle)

Computes the sine of an angle expressed in degrees.

cosd(angle)

Computes the cosine of an angle expressed in degrees.

tand(angle)

Computes the tangent of an angle expressed in degrees.

RotX(angle)

Creates a rotation matrix around the X-axis. The angle is expressed in degrees.

RotY(angle)

Creates a rotation matrix around the Y-axis. The angle is expressed in degrees.

RotZ(angle)

Creates a rotation matrix around the Z-axis. The angle is expressed in degrees.

KeplerSolver(M, e)

Solves Kepler's equation from the mean anomaly and eccentricity. Returns the eccentric anomaly and true anomaly.

COE_to_SV(a, e, i, RAAN, argp, nu, mu)

Converts classical orbital elements into inertial position and velocity vectors.

OrbitPropagation_2BN(SV, time_s)

Propagates an orbit by numerically solving Newton's two-body equations of motion.

OrbitPropagation_2BK(a, e, i, RAAN, w, nu0, t_array, mu)

Propagates an elliptical orbit from classical orbital elements using the two-body Keplerian model.

Example from SOL import Earth, RotX, KeplerSolver, COE_to_SV, OrbitPropagation_2BK

Select a simulation from the menu above to display it here.