1. Bplane#
- class Bplane(epoch: EpochArray, bplane_name: str, bplane_spice_id: int | str, sc_name: str, sc_spice_id: int | str, target_name: str, target_spice_id: int | str, fk_file: str, v_hat: bool = True, new_bplane: bool = True)#
Bases:
object
Bplane and Bvector definition and targeting.
Represents a Bplane and Bvector used for targeting purposes. Provides methods to compute the b-vector from spacecraft state and create a b-plane frame kernel.
Attributes
The name of Bplane.
The SPICE ID of the Bplane.
The \(B_r\) component of the B vector.
The \(B_t\) component of the B vector.
The current epoch.
The filepath to the given fk file.
The inearized time of flight expressed in seconds.
Name corresponding to the b-plane.
The new Bplane
Rotation matrix from J2000 to the b-plane.
Rotation matrix from the b-plane to J2000.
DCM to the Bplane.
DCM from the current frame to J2000.
The name of the spacecraft.
The SPICE ID of the spacecraft.
Spice ID corresponding to the b-plane.
The name of the target.
The SPICE ID of the target.
The current epoch plus the ltof expressed in seconds.
The unit vector pointing in the direction of the velocity.
Methods
compute_jacobian
(sc_rel_state_j2000)Given a perturbed state in J2000, compute Jacobian with respect to velocity and linearized time of flight.
compute_parameters
(sc_rel_state_j2000)Compute from a spacecraft state relative to the target and in J2000, the b-vector and the linearized time-of-flight.
If not already given, creates the b-plane frame kernel.
linear_targeting
(sc_rel_state_j2000[, err, ...])Given a perturbed state in J2000, compute TCM to correct trajectory through STMs.
nonlinear_targeting
(sc_rel_state_j2000[, err])Given a perturbed state in J2000, compute TCM to correct trajectory through Prediction-Correction.
target_covariance
(sc_cov, sc_rel_state_j2000)Given a state and its covariance (at the time of close approach) in J2000, compute B-plane parameters covariance.
target_spacecraft_covariance
(sc_targ_cov, ...)Given a spacecraft, a target and their covariance (at the time of close approach, in J2000, compute B-plane parameters covariance.
- compute_jacobian(sc_rel_state_j2000: ndarray) ArrayWUnits #
Given a perturbed state in J2000, compute Jacobian with respect to velocity and linearized time of flight.
- Parameters:
sc_rel_state_j2000 (
numpy.ndarray
) – The perturbed state in J2000.- Returns:
jacobian – The Jacobian matrix.
- Return type:
- compute_parameters(sc_rel_state_j2000: ndarray)#
Compute from a spacecraft state relative to the target and in J2000, the b-vector and the linearized time-of-flight.
- Parameters:
sc_rel_state_j2000 (
numpy.ndarray
) – Spacecraft state relative to the target in J2000.- Returns:
b_vec – The b-vector and the linearized time-of-flight.
- Return type:
- linear_targeting(sc_rel_state_j2000: ndarray, err: float = 1e-08, max_iterations: int = 100) ndarray #
Given a perturbed state in J2000, compute TCM to correct trajectory through STMs.
- Parameters:
sc_rel_state_j2000 (
numpy.ndarray
) – The perturbed state in J2000.err (
float
, optional) – Error tolerance for convergence. Defaults to1e-8
.max_iterations (
int
, optional) – The maximum number of iterations for computing the error. Defaults to100
.
- Returns:
tcm_vec – The TCM vector.
- Return type:
- nonlinear_targeting(sc_rel_state_j2000: ndarray, err: float = 1e-10) ndarray #
Given a perturbed state in J2000, compute TCM to correct trajectory through Prediction-Correction.
- Parameters:
sc_rel_state_j2000 (
numpy.ndarray
) – The erturbed state in J2000.err (
float
, optional) – Tolerance for the optimization algorithm. Defaults1e-10
.
- Returns:
tcm_vec – The TCM vector.
- Return type:
- target_covariance(sc_cov: ndarray, sc_rel_state_j2000: ndarray) ndarray #
Given a state and its covariance (at the time of close approach) in J2000, compute B-plane parameters covariance.
Assumes no correlation between position in the B-plane and linearized time of flight.
- Parameters:
sc_cov (
numpy.ndarray
) – The covariance matrix of the spacecraft state in J2000.sc_rel_state_j2000 (
numpy.ndarray
) – The relative state of the spacecraft in J2000.
- Returns:
covar – Covariance B-plane parameters matrix.
- Return type:
- target_spacecraft_covariance(sc_targ_cov: ndarray, sc_rel_state_j2000: ndarray) ndarray #
Given a spacecraft, a target and their covariance (at the time of close approach, in J2000, compute B-plane parameters covariance.
Assumes no correlation between position in the B-plane and linearized time of flight.
- Parameters:
sc_targ_cov (
numpy.ndarray
) – Covariance matrix of the spacecraft and target.sc_rel_state_j2000 (
numpy.ndarray
) – Relative state of the spacecraft and target in J2000.
- Returns:
covar – Covariance B-plane parameters matrix.
- Return type:
- property epoch: EpochArray#
The current epoch.
- property ltof_ref: ArrayWUnits#
The inearized time of flight expressed in seconds.
- property new_bplane#
The new Bplane
- property time_close_approach_ref: ArrayWUnits#
The current epoch plus the ltof expressed in seconds.