Basilisk.simulation) model physical spacecraft components and environments. FSW algorithm modules (Basilisk.fswAlgorithms) implement the onboard flight software that processes sensor data and commands actuators.
Every module — regardless of category — connects to the rest of the simulation through typed input and output messages. You mix and match modules from both families in the same simulation.
Simulation modules
Dynamics
Rigid body spacecraft, reaction wheels, thrusters, fuel tanks, hinged panels, flexible appendages, constraint effectors, and gravity gradient.
Environment
Gravity (SPICE ephemeris), atmosphere models (exponential, MSIS), magnetic field (centered dipole, WMM), eclipse, albedo, solar flux, and ground locations.
Sensors
IMU, coarse sun sensors (CSS), star trackers, magnetometers, GPS receivers, and optical sensors. All sensor modules support configurable noise.
Power
Solar panels, battery storage, power consumption tracking, and power node network modeling.
Communication
Ground station contacts, access windows, transmitters and receivers, and inter-satellite link modeling.
Thermal
Nodal thermal network modeling for spacecraft thermal management analysis.
Dynamics modules in depth
Thesimulation/dynamics package contains the core mechanical simulation:
Spacecraft and rigid body
Spacecraft and rigid body
The
spacecraft module (Basilisk.simulation.spacecraft) is the central dynamics object for most simulations. It integrates the translational and rotational equations of motion and accepts effectors (forces and torques) from attached modules.Related modules include spacecraftSystem for multi-body configurations, prescribedMotion for kinematically-driven appendages, and spinningBodies for rotating components.Reaction wheels
Reaction wheels
reactionWheels models reaction wheel arrays. It accepts motor torque command messages and outputs angular velocity and friction state messages. The module handles both simple wheel models and detailed jitter models including imbalance effects.Thrusters
Thrusters
The
Thrusters module accepts on/off pulse commands and computes impulsive and continuous thrust force and torque contributions to the spacecraft dynamics.Flexible structures
Flexible structures
HingedRigidBodies, NHingedRigidBodies, and dualHingedRigidBodies model solar panel flexing and other hinged appendages. LinearSpringMassDamper and sphericalPendulum model fuel slosh.Gravity and radiation
Gravity and radiation
gravityEffector integrates SPICE-based point-mass gravity from multiple bodies. RadiationPressure and facetSRPDynamicEffector model solar radiation pressure with configurable spacecraft geometry.Environment modules in depth
Ephemeris and SPICE
Ephemeris and SPICE
spiceInterface wraps NASA NAIF SPICE to provide high-fidelity planet state data. ephemerisConverter converts between SPICE output and Basilisk’s internal message types. planetEphemeris provides simple analytic planet positions.Atmosphere
Atmosphere
ExponentialAtmosphere gives a simple density-altitude model. MsisAtmosphere implements the NRLMSISE-00 empirical atmospheric model for drag calculations at low Earth orbit altitudes.Magnetic field
Magnetic field
magneticFieldCenteredDipole models Earth’s field as an offset dipole. magneticFieldWMM uses the World Magnetic Model for higher-fidelity calculations.Ground locations
Ground locations
groundLocation computes access windows and range/azimuth/elevation between a spacecraft and a fixed ground site. spacecraftLocation does the same between two spacecraft.FSW algorithm modules
Attitude determination
Sunline filters, coarse sun sensor (CSS) estimation, Kalman filters (MEKF, UKF), and sensor fusion for attitude estimation.
Attitude guidance
Reference attitude generation for sun-safe pointing, nadir pointing, velocity-frame pointing, target tracking, and orbital maneuver sequences.
Attitude control
MRP feedback control, rate damping, momentum dumping, thruster null-motion management, and variable-speed CMG steering laws.
Orbit control
Delta-V targeting, station-keeping maneuver planning, formation flying control, and small-body proximity operations.
FSW modules in depth
attDetermination
attDetermination
Modules in this package estimate the spacecraft’s attitude from sensor measurements. Key modules include:
sunlineEKF/sunlineUKF— extended and unscented Kalman filters for sunline estimation from CSS dataokeefeEKF— O’Keefe filter for sun-heading estimationheadingSuKF— sigma-point filter for general heading estimationinertialUKF— full inertial attitude UKF using star tracker and rate gyro data
attGuidance
attGuidance
Guidance modules generate
AttRefMsgPayload messages that specify the desired reference attitude, reference angular rate, and reference angular acceleration. Key modules include:sunSafePoint— points a body axis toward the sun using CSS measurementslocationPointing— points a body axis toward a ground or celestial targetvelocityPoint— aligns a body axis with the velocity vector (nadir-pointing variant:naivePlanetPoint)mrpRotation— generates smooth MRP attitude reference maneuversattTrackingError— computes the tracking error between current and reference attitude
attControl
attControl
Attitude control modules read tracking error messages and produce torque command messages for actuators. Key modules include:
mrpFeedback— nonlinear MRP-based feedback control law; optionally incorporates reaction wheel gyroscopic termsmrpSteering— steering law using MRP kinematics directlyrateServoFullNonlinear— full nonlinear rate servo for reaction wheel speed managementthrForceMapping— maps a desired torque to thruster on-time pulses
dvGuidance / orbit control
dvGuidance / orbit control
Orbit control and targeting modules (located in
fswAlgorithms/dvGuidance):lambertPlanner— propagates current state to maneuver time and packages the Lambert problemlambertSolver— Lambert problem solver for two-impulse orbit transfer designlambertValidator— validates the Lambert solution and outputs the first delta-V commandlambertSecondDV— computes the second delta-V at the end of the Lambert arcorbElemOffset— computes a reference position offset from a chief by orbital element differencessmallBodyWaypointFeedback— proximity operations waypoint guidance for small body missions
effectorInterfaces
effectorInterfaces
Modules that translate high-level commands into actuator-specific commands (located in
fswAlgorithms/effectorInterfaces):rwMotorTorque— distributes a desired control torque across the reaction wheel arrayrwMotorVoltage— maps wheel torque commands to motor voltagethrForceMapping— maps a desired force/torque vector to thruster on-time fractionsthrFiringSchmitt— Schmitt trigger logic for thruster pulse-width modulationthrFiringRemainder— remainder thruster firing to minimize accumulated errordipoleMapping— maps a desired magnetic dipole to magnetorquer commands
Selecting modules for your simulation
For a basic attitude control simulation you typically need:- Dynamics:
spacecraft,reactionWheels,gravityEffector,spiceInterface - Navigation:
simpleNav(passes through truth state with optional noise; located insimulation/navigation) - Guidance: one
attGuidancemodule matching your pointing mode - Control:
attTrackingError+mrpFeedback+rwMotorTorque
- Environment:
eclipse,groundLocation - Power:
simpleSolarPanel,simpleBattery,simplePowerSink - Communication:
spaceToGroundTransmitter,groundStation