ADCS.simulate module

ADCS.simulate.simulate(x, satellite, est_satellite=None, controller=None, estimator=None, orbit_estimator=None, goal=None, os0=None, dt=1.0, tf=500.0)[source]

Run a time-domain simulation of the spacecraft Attitude Determination and Control System (ADCS), including dynamics propagation, sensor simulation, state estimation, orbit estimation, goal management, and control execution.

This function advances the true satellite state forward in time using numerical integration, while optionally running attitude and orbit estimators and a control law. Goals may be specified as a single goal or a time-varying goal list. All simulation data are logged and returned as a SimulationResults object.

The simulation uses scipy.integrate.solve_ivp() with RK45 integration and propagates the orbit using Orbit.

Parameters:
  • x (numpy.ndarray) – Initial true satellite state vector. The length must match satellite.state_len and is expected to follow the satellite state convention (angular velocity, quaternion, reaction wheel states, etc.).

  • satellite (Satellite) – The true satellite model, including dynamics, sensors, and actuators.

  • est_satellite (EstimatedSatellite or None) – Estimated satellite model used by estimators and controllers. If None and either an estimator or controller is provided, it is constructed automatically from satellite.

  • controller (Controller or None) – Control law used to compute actuator commands. If the controller is a PlanAndTrackBase, an initial trajectory is computed before simulation.

  • estimator (Attitude_Estimator or None) – Attitude estimator used to estimate the spacecraft state from sensor measurements.

  • orbit_estimator (Orbit_Estimator or None) – Orbit estimator used to estimate the orbital state from GPS measurements.

  • goal (Goal, GoalList, or None) – Desired attitude or pointing objective. This may be None (no goal), a single Goal, or a GoalList defining time-varying goals.

  • os0 (Orbital_State) – Initial orbital state at the start of the simulation.

  • dt (float) – Simulation time step in seconds.

  • tf (float) – Total simulation duration in seconds.

Returns:

Container holding all recorded simulation data, including true and estimated states, controls, sensor readings, biases, and targets for the entire run.

Return type:

SimulationResults