orbix.equations.propagation#

Methods to propagate the positions of planets.

Functions#

system_r_v(A_mat_b, B_mat_b, e_vec_b, sinE_mat, ...)

Calculate position and velocity vectors for n planets over m time steps.

system_r(A_mat_b, B_mat_b, e_vec_b, sinE_mat, cosE_mat)

Calculate position vectors for n planets over m time steps.

single_r(A, B, e, sinE, cosE)

Calculate position vectors for a single planet over ntimes times.

single_r_v(A, B, e, sinE, cosE, n_orb)

Calculate position and velocity vectors for a single planet at a single time.

Module Contents#

orbix.equations.propagation.system_r_v(A_mat_b, B_mat_b, e_vec_b, sinE_mat, cosE_mat, n_orb_vec_b)[source]#

Calculate position and velocity vectors for n planets over m time steps.

Propagation is computed as: r = A * (cosE - e) + B * sinE v = n_orb / (1 - e * cosE) * (-A * sinE + B * cosE) where A, B, e, n_orb are pre-broadcasted outside the function. The sinE and cosE are managed inside the function for vectorization reasons.

Some effort has been made to ensure there isn’t division by zero.

Parameters:
  • A_mat_b (jax.Array) – Pre-broadcasted A vectors. Shape (3, n, 1).

  • B_mat_b (jax.Array) – Pre-broadcasted B vectors. Shape (3, n, 1).

  • e_vec_b (jax.Array) – Pre-broadcasted eccentricity. Shape (n, 1).

  • sinE_mat (jax.Array) – Sine(Eccentric Anomaly). Shape (n, m).

  • cosE_mat (jax.Array) – Cosine(Eccentric Anomaly). Shape (n, m).

  • n_orb_vec_b (jax.Array) – Pre-broadcasted mean orbital motion. Shape (n, 1).

Returns:

A tuple containing:
  • r (jax.Array): Position vectors. Shape (3, n, m).

  • v (jax.Array): Velocity vectors. Shape (3, n, m).

Return type:

tuple[jax.Array, jax.Array]

orbix.equations.propagation.system_r(A_mat_b, B_mat_b, e_vec_b, sinE_mat, cosE_mat)[source]#

Calculate position vectors for n planets over m time steps.

Propagation is computed as: r = A * (cosE - e) + B * sinE where A, B, e, n_orb are pre-broadcasted outside the function. The sinE and cosE are managed inside the function for vectorization reasons.

Some effort has been made to ensure there isn’t division by zero.

Parameters:
  • A_mat_b (jax.Array) – Pre-broadcasted A vectors. Shape (3, n, 1).

  • B_mat_b (jax.Array) – Pre-broadcasted B vectors. Shape (3, n, 1).

  • e_vec_b (jax.Array) – Pre-broadcasted eccentricity. Shape (n, 1).

  • sinE_mat (jax.Array) – Sine(Eccentric Anomaly). Shape (n, m).

  • cosE_mat (jax.Array) – Cosine(Eccentric Anomaly). Shape (n, m).

Returns:

Position vectors. Shape (3, n, m).

Return type:

r (jax.Array)

orbix.equations.propagation.single_r(A, B, e, sinE, cosE)[source]#

Calculate position vectors for a single planet over ntimes times.

Parameters:
  • A (jax.Array) – A matrix. Shape (3,).

  • B (jax.Array) – B matrix. Shape (3,).

  • e (float) – eccentricity (scalar).

  • sinE (jax.Array) – sine of the eccentric anomaly. Shape (ntimes,).

  • cosE (jax.Array) – cosine of the eccentric anomaly. Shape (ntimes,).

Returns:

position vectors. Shape (3, ntimes).

Return type:

r (jax.Array)

orbix.equations.propagation.single_r_v(A, B, e, sinE, cosE, n_orb)[source]#

Calculate position and velocity vectors for a single planet at a single time.

Parameters:
  • A (jax.Array) – A matrix (3)

  • B (jax.Array) – B matrix (3)

  • e (float) – eccentricity ()

  • sinE (float) – sine of the eccentric anomaly (ntimes)

  • cosE (float) – cosine of the eccentric anomaly (ntimes)

  • n_orb (float) – mean orbital motion (ntimes)

Returns:

position vector (3, 1) v (jax.Array): velocity vector (3, 1)

Return type:

r (jax.Array)