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
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.
Python runs directly on this page through Pyodide. However, users should be familiar with variables, mathematical operations, functions, lists, and basic Python syntax.
Python for Beginners
Discover introductory resources for learning Python and writing your first programs.
Visit Python.org →Official Python Tutorial
Learn Python syntax, data structures, control flow, functions, modules, and other essential concepts.
Open Tutorial →Python Documentation
Consult the official documentation, language reference, standard library, and frequently asked questions.
View Documentation →Download Python
Download Python if you would like to create and run programs outside this website.
Download Python →Simulation Library
Choose a Simulation
Select a simulation, adjust its Python parameters, and compare the numerical and graphical results.
Python Library
Available Functions
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.
from SOL import Earth, RotX, KeplerSolver, COE_to_SV, OrbitPropagation_2BK
Select a simulation from the menu above to display it here.
Simulation 01
Circular Orbit
Change altitude_km to observe how altitude
affects orbital velocity and period.
Python Output
Waiting for execution…
Simulation 02
Elliptical Orbit
Change semi_major_axis_km and
eccentricity to modify the orbit.
Python Output
Waiting for execution…