astrodynx.twobody.lagrange_Gt

Contents

astrodynx.twobody.lagrange_Gt#

astrodynx.twobody.lagrange_Gt(U2, r_mag)[source]#

The Lagrange Gt function

Parameters:
  • U2 (ArrayLike) – The universal function U2.

  • r_mag (ArrayLike) – The radius at the current time.

Return type:

ArrayLike

Returns:

The value of the Lagrange Gt function.

Notes

The Lagrange Gt function is defined as:

\[ G_t = 1 - \frac{U_2}{r} \]
where \(U_2\) is the universal function U2 and \(r\) is the radius at the current time.

References

Battin, 1999, pp.179.

Examples

A simple example:

>>> import jax.numpy as jnp
>>> import astrodynx as adx
>>> U2 = 1.0
>>> r = 1.0
>>> adx.twobody.lagrange_Gt(U2, r)
0.0

With broadcasting:

>>> U2 = jnp.array([1.0, 2.0])
>>> r = jnp.array([1.0, 1.0])
>>> adx.twobody.lagrange_Gt(U2, r)
Array([ 0., -1.], dtype=float32)