.. _examples: 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: .. image:: /_images/static/scenarioSourceLink.png :width: 1316px :height: 106px :scale: 50% :alt: scenario python source link :align: center 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 ------------------- .. toctree:: :maxdepth: 1 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 ^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. toctree:: :maxdepth: 1 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 ^^^^^^^^^^^^^^^^^ .. toctree:: :maxdepth: 1 Hill Frame Pointing on Elliptic Orbit Velocity Frame Pointing on Hyperbolic Orbit Pointing at Earth Location Prescribing the spacecraft orientation Layered spiral attitude guidance Constrained Attitude Maneuver Guidance Attitude Control with Actuators ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. toctree:: :maxdepth: 1 Pointing with Reaction Wheels Pointing with Attitude State Effector Thrusters Pointing with Attitude Dynamic Effector Thrusters Reaction Wheel Momentum Dumping using Thrusters Continuous Momentum Management using Dual-Gimbaled Electric Thruster Attitude Steering Control ^^^^^^^^^^^^^^^^^^^^^^^^^ .. toctree:: :maxdepth: 1 MRP Steering Law Orbit Control ------------- .. toctree:: :maxdepth: 1 Small Body Waypoint-to-Waypoint Control Planetary Environments ---------------------- Magnetic Field Models ^^^^^^^^^^^^^^^^^^^^^ .. toctree:: :maxdepth: 1 Centered Dipole Model World Magnetic Model WMM Gravity Gradient Torque ^^^^^^^^^^^^^^^^^^^^^^^ .. toctree:: :maxdepth: 1 Gravity Gradient Perturbed Hill Pointing Atmospheric Drag ^^^^^^^^^^^^^^^^^^^^^^^ .. toctree:: :maxdepth: 1 Satellite Drag Deorbit about Earth Access to Communication Locations ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. toctree:: :maxdepth: 1 Satellite communicating to Earth ground station Satellite checking communication access to another satellite Planet Albedo ^^^^^^^^^^^^^ .. toctree:: :maxdepth: 1 Albedo CSS simulation about Multiple Celestial Objects Spacecraft Sensors ------------------ Coarse Sun Sensors ^^^^^^^^^^^^^^^^^^ .. toctree:: :maxdepth: 1 Adding CSS Sensors Estimating Sun Heading with CSS Three-Axis Magnetometers ^^^^^^^^^^^^^^^^^^^^^^^^ .. toctree:: :maxdepth: 1 Adding a Three-Axis Magnetometer (TAM) RW Momentum Management using TAMs and MTBs RW Momentum Management using TAMs and MTBs Using desired Nominal RW Speed TAM Comparison Spacecraft Sub-Systems ---------------------- Power Sub-System ^^^^^^^^^^^^^^^^ .. toctree:: :maxdepth: 1 Basic Power Usage and Tracking Power Usage with RW-Based ADCS Data Sub-System ^^^^^^^^^^^^^^^^ .. toctree:: :maxdepth: 1 Basic Data Generation and Transmission Ground Target Imaging and Downlink Mapping A Body Thermal Sub-System ^^^^^^^^^^^^^^^^^^ .. toctree:: :maxdepth: 1 Thermal Modeling of a Sensor Complex Spacecraft Dynamics Simulations --------------------------------------- .. toctree:: :maxdepth: 1 Fuel Slosh Flexible (Hinged) Panels Sensors Attached to a Rotating Panel Hinged Panel Deployment MSM Simulation of Charged Spacecraft Spacecraft with 1- or 2-DOF Panel using single effector Prescribed Motion Rotational Solar Array Deployment Mission Simulations --------------------------------------- .. toctree:: :maxdepth: 1 Heliocentric Translation Using Custom Spice Files Planetary Flybys Using Custom Spice File Asteroid Arrival Aerocapture Scenario bskSim()-Based Simulation ------------------------- .. toctree:: :maxdepth: 1 Basic Orbital Simulation Attitude Detumble Control Hill Pointing Attitude Control Velocity Frame Pointing Control MRP Steering Attitude Control Sun Pointing Mode Include Eclipse Evaluation Alternating FSW Attitude Pointing Modes Reaction Wheel Fault Scenario Simulation bskSim Scenarios Folder Optical Navigation Simulations ------------------------------ .. toctree:: :maxdepth: 1 BSK OpNav Sim Hough Circles for Pointing and Orbit Determination Limb-based method for Pointing and Orbit Determination CNN for Pointing and Orbit Determination Perform fault detection with two OpNav methods Orbit Determination with Hough Circles Orbit Determination with Limb-based method Pointing with Hough Circles Pointing with Limb-based method Filter Heading measurements OpNav Scenarios Folder Small Body Navigation Simulations --------------------------------- .. toctree:: :maxdepth: 1 Proximity Operations Hybrid EKF Non-Keplerian Acceleration Estimation using UKF Landmarks-based Navigation Monte Carlo Simulations ----------------------- .. toctree:: :maxdepth: 1 MC run with RW control MC run using Python Spice setup MC run using BSK Sim Framework MC rerun using prior MC run parameters MC Plotting using datashaders and bokeh MC example Folder Sensitivity Analysis of a differential drag spacecraft control Spacecraft Formation Flying --------------------------- Stand Alone Architecture ^^^^^^^^^^^^^^^^^^^^^^^^ .. toctree:: :maxdepth: 1 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 ``FormationBskSim`` Architecture ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. toctree:: :maxdepth: 1 Two-Spacecraft Formation using BskSim Relative Pointing Control ``MultiSatBskSim`` Architecture ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. toctree:: :maxdepth: 1 Three-Spacecraft Formation using MultiSat architecture Attitude Guidance Modes Scheduling Formation Flying Control MultiSatBskSim Folder Advanced Simulation Options --------------------------- .. toctree:: :maxdepth: 1 Setting Type of Integrator Using a Variable Time Step Integrator Comparison of different integrators Using a Python BSK Module Inherited from SysModel Class Using a Python BSK Module (depreciated) Changing the bskLog Verbosity from Python Multi-Threading Basilisk Simulations ------------------------------------ .. toctree:: :maxdepth: 1 Simulation of Multiple independent spacecraft Advanced Visualizations ----------------------- Interfacing with Vizard ^^^^^^^^^^^^^^^^^^^^^^^ .. toctree:: :maxdepth: 1 Live Streaming to Vizard Pointing a Vizard Camera Convert Simulation Data file to Vizard File