astrodynx.twobody.lagrange_F

Contents

astrodynx.twobody.lagrange_F#

astrodynx.twobody.lagrange_F(U2, r0_mag=1)[source]#

The Lagrange F function

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

  • r0_mag (ArrayLike) – The radius at the initial time.

Return type:

ArrayLike

Returns:

The value of the Lagrange F function.

Notes

The Lagrange F function is defined as:

\[ F = 1 - \frac{U_2}{r_0} \]
where \(U_2\) is the universal function U2 and \(r_0\) is the radius at the initial time.

References

Battin, 1999, pp.179.

Examples

A simple example:

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

With broadcasting:

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