Integrated Example Scripts¶
To learn how to use Basilisk it is often convenient to study sample scripts and see how they were implemented. Below are a series of example Basilisk scripts grouped by topics and complexity. In each script the primary simulation is executed by the run
method. The reader can learn from this implementation and the numerous associated in-line comments. The first sections illustrate how to setup simple spacecraft simulations and then the following sections begin to add more complexity.
The example script source code can be viewed directly within the browser by clicking on the Source link next to the run
method name as shown in the image below:

The python code contains additional comments to explain what is being setup and tested here. The example instructions are all stored as extensive comments within the python script. Read the script source to study how this example functions.
Orbital Simulations¶
- Basic Orbit Simulations
- Delta_v Orbit Maneuvers
- Hyperbolic Jupiter Arrival Orbit
- Multiple Gravitational Bodies
- Lagrange Point Orbits
- Defining Motion Relative to Planet
- Simulating Trajectory about Multiple Celestial Bodies
- Including Custom Gravitational Bodies
- Small Body Waypoint-to-Waypoint Control
- Near-Halo Orbit Simulation
Attitude Simulations¶
Attitude Regulation Control¶
- Inertial Attitude Pointing
- Using Separate Task Group for Control
- Basic Attitude Pointing in Deep Space
- Complex Attitude Pointing in Deep Space
- Sun-Pointing Constraint Violation in Space
- Inertial Pointing with Spice prescribed translational motion
- Basic attitude pointing flight mode with Hohmann transfer
Attitude Guidance¶
Attitude Control with Actuators¶
Attitude Steering Control¶
Orbit Control¶
Planetary Environments¶
Magnetic Field Models¶
Gravity Gradient Torque¶
Atmospheric Drag¶
Access to Communication Locations¶
Planet Albedo¶
Spacecraft Sensors¶
Coarse Sun Sensors¶
Three-Axis Magnetometers¶
Spacecraft Sub-Systems¶
Power Sub-System¶
Data Sub-System¶
Thermal Sub-System¶
Complex Spacecraft Dynamics Simulations¶
Mission Simulations¶
bskSim()-Based Simulation¶
Monte Carlo Simulations¶
Spacecraft Formation Flying¶
Stand Alone Architecture¶
- Basic Servicer/Debris Simulation
- Mean orbit element based relative motion control
- Impulsive feedback control of relative motion
- Electrostatic Tractor Debris Reorbiting
- Attitude-Driven differential drag control
- Servicer approaching a debris object with 3 flight modes
- Walker-Delta Satellite Constellation