astrodynx.twobody.lagrange_G#
- astrodynx.twobody.lagrange_G(U1, U2, sigma0=0, r0_mag=1, mu=1)[source]#
The Lagrange G function
- Parameters:
- Return type:
- Returns:
The value of the Lagrange G function.
Notes
The Lagrange G function is defined as:
\[ G = \frac{r_0 U_1 + \sigma_0 U_2}{\sqrt{\mu}} \]where \(U_1\) is the universal function U1, \(U_2\) is the universal function U2, \(\sigma_0\) is the sigma function at the initial time, \(r_0\) is the radius at the initial time, and \(\mu\) is the gravitational parameter.References
Battin, 1999, pp.179.
Examples
A simple example:
>>> import jax.numpy as jnp >>> import astrodynx as adx >>> U1 = 1.0 >>> U2 = 1.0 >>> sigma0 = 0.0 >>> r0 = 1.0 >>> mu = 1.0 >>> adx.twobody.lagrange_G(U1, U2, sigma0, r0, mu) Array(1., dtype=float32, weak_type=True)
With broadcasting:
>>> U1 = jnp.array([1.0, 2.0]) >>> U2 = jnp.array([1.0, 1.0]) >>> sigma0 = jnp.array([0.0, 0.0]) >>> r0 = jnp.array([1.0, 1.0]) >>> mu = jnp.array([1.0, 1.0]) >>> adx.twobody.lagrange_G(U1, U2, sigma0, r0, mu) Array([1., 2.], dtype=float32)