ADCS.CONOPS.goals.vector_goals.bfield_goal module

class ADCS.CONOPS.goals.vector_goals.bfield_goal.BField_Goal(boresight_name=None)[source]

Bases: Vector_Goal

Magnetic field (B-field) vector goal.

This goal commands alignment with the local geomagnetic field direction expressed in the inertial frame, \(\mathbf{B}_{ECI}\):

\[\hat{\mathbf{B}} = \frac{\mathbf{B}_{ECI}}{\|\mathbf{B}_{ECI}\|}, \qquad \mathbf{r}_{goal} = \hat{\mathbf{B}}.\]

If a time derivative \(\dot{\mathbf{B}}_{ECI}\) is available (e.g. from a model or finite difference), a feed-forward angular rate can be formed as the angular velocity of the direction vector:

\[\boldsymbol{\omega}_{ref} = \frac{\mathbf{B}_{ECI} \times \dot{\mathbf{B}}_{ECI}}{\|\mathbf{B}_{ECI}\|^2}.\]

If \(\dot{\mathbf{B}}_{ECI}\) is not available, \(\boldsymbol{\omega}_{ref}\) may be set to \(\mathbf{0}\) as a conservative default.

Parameters:

boresight_name (str | None)

to_ref(os0)[source]

Generate a reference inertial direction and angular velocity.

Subclasses must implement this method to compute a desired inertial reference vector

\[\mathbf{v}_{\mathrm{ref}} \in \mathbb{R}^3\]

based on the current orbital state. The returned vector is expected to be nonzero and will typically be normalized by the downstream error computation.

Parameters:

os0 (Orbital_State) – Current orbital state.

Returns:

Reference inertial direction and reference angular velocity.

Return type:

Tuple[numpy.ndarray, numpy.ndarray]