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

bplane_name

The name of Bplane.

bplane_spice_id

The SPICE ID of the Bplane.

br_ref

The \(B_r\) component of the B vector.

bt_ref

The \(B_t\) component of the B vector.

epoch

The current epoch.

fk_file

The filepath to the given fk file.

ltof_ref

The inearized time of flight expressed in seconds.

name

Name corresponding to the b-plane.

new_bplane

The new Bplane

rot_to_bplane

Rotation matrix from J2000 to the b-plane.

rot_to_j2000

Rotation matrix from the b-plane to J2000.

rotmat_to_bplane

DCM to the Bplane.

rotmat_to_j2000

DCM from the current frame to J2000.

sc_name

The name of the spacecraft.

sc_spice_id

The SPICE ID of the spacecraft.

spice_id

Spice ID corresponding to the b-plane.

target_name

The name of the target.

target_spice_id

The SPICE ID of the target.

time_close_approach_ref

The current epoch plus the ltof expressed in seconds.

v_hat

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.

create_kernel()

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:

ArrayWUnits

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:

numpy.ndarray

create_kernel() None#

If not already given, creates the b-plane frame kernel.

Return type:

None

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 to 1e-8.

  • max_iterations (int, optional) – The maximum number of iterations for computing the error. Defaults to 100.

Returns:

tcm_vec – The TCM vector.

Return type:

numpy.ndarray

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. Defaults 1e-10.

Returns:

tcm_vec – The TCM vector.

Return type:

numpy.ndarray

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:

numpy.ndarray

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:

numpy.ndarray

property bplane_name: str#

The name of Bplane.

property bplane_spice_id: int | str#

The SPICE ID of the Bplane.

property br_ref: float#

The \(B_r\) component of the B vector.

property bt_ref: float#

The \(B_t\) component of the B vector.

property epoch: EpochArray#

The current epoch.

property fk_file: str#

The filepath to the given fk file.

property ltof_ref: ArrayWUnits#

The inearized time of flight expressed in seconds.

property name: str#

Name corresponding to the b-plane.

property new_bplane#

The new Bplane

property rot_to_bplane: str#

Rotation matrix from J2000 to the b-plane.

property rot_to_j2000: str#

Rotation matrix from the b-plane to J2000.

property rotmat_to_bplane: ndarray#

DCM to the Bplane.

property rotmat_to_j2000: ndarray#

DCM from the current frame to J2000.

property sc_name: str#

The name of the spacecraft.

property sc_spice_id: int | str#

The SPICE ID of the spacecraft.

property spice_id: int#

Spice ID corresponding to the b-plane.

property target_name: str#

The name of the target.

property target_spice_id: int | str#

The SPICE ID of the target.

property time_close_approach_ref: ArrayWUnits#

The current epoch plus the ltof expressed in seconds.

property v_hat: ndarray#

The unit vector pointing in the direction of the velocity.