ADCS.satellite_hardware.disturbances.disturbance module

class ADCS.satellite_hardware.disturbances.disturbance.Disturbance(estimate_dist=False, estimated_vector_length=0, parameter_std_rate=0.0)[source]

Bases: object

Parameters:
  • estimate_dist (bool)

  • estimated_vector_length (int)

  • parameter_std_rate (ndarray | float)

force(*args, **kwargs)[source]

Net force this disturbance applies to the spacecraft, in the body frame.

Every disturbance applies a torque, and some of them (aerodynamic drag, solar radiation pressure, thrust) also push the centre of mass. Subclasses that model a force override this method; the base class returns zero so a torque-only disturbance needs no change.

The call signature mirrors torque(): force(sat, x, os) for disturbances that need the satellite, force(x, os) otherwise. dist_forces() sums these over every disturbance.

Returns:

Force in body coordinates, shape (3,) [N].

Return type:

numpy.ndarray

force_qjac(*args, **kwargs)[source]

Jacobian of force() with respect to the attitude quaternion.

Layout matches torque_qjac(): row i is the derivative with respect to quaternion component i, shape (4, 3). Zero in the base class.

Return type:

ndarray

force_qqhess(*args, **kwargs)[source]

Hessian of force() with respect to the attitude quaternion.

Layout matches torque_qqhess(): (q_i, q_j, force component), shape (4, 4, 3). Zero in the base class.

Return type:

ndarray

parameter_process_psd(*, form='full')[source]

Return the continuous PSD of estimated disturbance parameters.

parameter_std_rate is configuration, while std reports the current estimator uncertainty. A disturbance with no estimated parameters naturally returns a zero-dimensional PSD.

Parameters:

form (str)

Return type:

Covariance

update()[source]

Refresh the values held over the next plant step.

Disturbances with a noise model draw a fresh sample here; the base class has nothing to refresh. Called by update_errors().

Return type:

None

update_errors(j2000)[source]

Advance the stochastic error models by one plant step.

The estimated parameters (main_param) take one step of their random walk, with standard deviation parameter_std_rate times the square root of the elapsed time in seconds, the same model the estimator assumes through parameter_process_psd(); then update() draws the step’s noise sample. The simulation calls this once per step before integrating the plant, so the integrator sees one frozen realisation per step, never a draw inside the solver.

Parameters:

j2000 (float) – Current epoch in Julian centuries since J2000.

Return type:

None

property main_param: ndarray