Orbit Services

Services for orbit objects in the Hiten framework.

Orbit Persistence Service

_OrbitPersistenceService()

Handle persistence for orbit objects.

class hiten.algorithms.types.services.orbits._OrbitPersistenceService[source]

Bases: _PersistenceServiceBase

Thin wrapper around orbit persistence helpers.

Parameters:
  • save_fn (Callable[..., Any]) – The function to save the object.

  • load_fn (Callable[..., Any]) – The function to load the object.

  • load_inplace_fn (Callable[..., Any]) – The function to load the object in place.

Orbit Correction Service

_OrbitCorrectionService()

Provide correction services for orbit objects.

class hiten.algorithms.types.services.orbits._OrbitCorrectionService(domain_obj)[source]

Bases: _DynamicsServiceBase

Drive Newton-based differential correction for periodic orbits.

Parameters:

domain_obj (PeriodicOrbit) – The domain object.

corrector

The corrector.

Type:

CorrectorPipeline

property corrector: CorrectorPipeline

The corrector.

Lazily creates a corrector pipeline with the appropriate interface and backend based on the config type (single shooting vs multiple shooting).

correct(*, options=None)[source]

Differential correction wrapper.

Parameters:

options (OrbitCorrectionOptions, optional) – Runtime options for correction. If None, uses default options from the orbit’s correction_options property.

Returns:

Corrected state, full period, and the full correction result object.

Return type:

tuple[np.ndarray, float, CorrectionResult]

apply_correction(update)[source]

Apply a correction update to the orbit dynamics and return the payload.

Parameters:

update (OrbitCorrectionDomainPayload)

Return type:

OrbitCorrectionDomainPayload

property correction_options

Get the correction options for this orbit.

Returns the stored options, lazily initializing with defaults if needed.

Returns:

The correction options.

Return type:

OrbitCorrectionOptions

property correction_config: OrbitCorrectionConfig

Provides the differential correction configuration for this orbit family.

Returns the stored config, lazily initializing with defaults if needed.

Orbit Continuation Service

_OrbitContinuationService()

Provide continuation services for orbit objects.

class hiten.algorithms.types.services.orbits._OrbitContinuationService(domain_obj)[source]

Bases: _DynamicsServiceBase

Drive continuation for periodic orbits.

Parameters:

domain_obj (PeriodicOrbit) – The domain object.

generator

The generator.

Type:

ContinuationPipeline

property initial_state: ndarray

The initial state from the dynamics service.

property generator: ContinuationPipeline

The continuation pipeline.

generate(*, options=None)[source]

Generate a family of periodic orbits.

Parameters:

options (OrbitContinuationOptions, optional) – Runtime options for continuation. If None, uses default options from the orbit’s continuation_options property.

Returns:

The continuation result.

Return type:

ContinuationResult

apply_continuation(payload)[source]
Parameters:

payload (ContinuationDomainPayload)

Return type:

ContinuationDomainPayload

property continuation_config: OrbitContinuationConfig

Get the continuation configuration for this orbit family.

Returns the stored config, lazily initializing with defaults if needed.

property continuation_options: OrbitContinuationOptions

Get the continuation options for this orbit family.

Returns the stored options, lazily initializing with defaults if needed.

Orbit Dynamics Service

_OrbitDynamicsService()

Provide dynamics services for orbit objects.

class hiten.algorithms.types.services.orbits._OrbitDynamicsService(orbit)[source]

Bases: _DynamicsServiceBase

Integrate periodic orbits using the system dynamics.

Parameters:

orbit (PeriodicOrbit) – The orbit.

property orbit: PeriodicOrbit

The orbit.

property libration_point: LibrationPoint

The libration point.

property system: System

The system.

property mu: float

The mass ratio.

property is_stable: bool

Check if the orbit is linearly stable.

Returns:

True if all stability indices have magnitude <= 1, False otherwise.

Return type:

bool

property stability_indices: Tuple | None

The stability indices.

property eigenvalues: Tuple | None

The eigenvalues.

property eigenvectors: Tuple | None

The eigenvectors.

property energy: float

Compute the energy of the orbit at the initial state.

Returns:

The energy value in nondimensional units.

Return type:

float

property jacobi_constant: float

Compute the Jacobi constant of the orbit.

Returns:

The Jacobi constant value (dimensionless).

Return type:

float

property dynsys: _DynamicalSystem

Underlying vector field instance.

Returns:

The underlying vector field instance.

Return type:

_DynamicalSystemProtocol

property var_dynsys: _DynamicalSystem

Underlying variational equations system.

Returns:

The underlying variational equations system.

Return type:

_DynamicalSystemProtocol

property jacobian_dynsys: _DynamicalSystem

Underlying Jacobian evaluation system.

Returns:

The underlying Jacobian evaluation system.

Return type:

_DynamicalSystemProtocol

property initial_state: ndarray

The initial state.

property period: float

The period.

property trajectory: Trajectory | None

Get the computed trajectory points.

Returns:

Array of shape (steps, 6) containing state vectors at each time step, or None if the trajectory hasn’t been computed yet.

Return type:

Trajectory or None

property trajectories: List[Trajectory]

Compatibility helper for SynodicMap - returns list with single trajectory.

property monodromy

The monodromy.

propagate(*, steps, method, order)[source]

Propagate the orbit.

Parameters:
  • steps (int) – The number of steps to take.

  • method (str) – The method to use for propagation.

  • order (int) – The order of the method to use for propagation.

Return type:

Trajectory

manifold(stable=True, direction='positive')[source]

Create a manifold for the orbit.

Parameters:
  • stable (bool) – Whether to create a stable manifold.

  • direction (Literal["positive", "negative"]) – The direction of the manifold.

Returns:

The manifold.

Return type:

Manifold

compute_stability()[source]

Compute the stability of the orbit.

Returns:

The stability of the orbit.

Return type:

Tuple[np.ndarray, np.ndarray, np.ndarray]

property amplitude: float

The amplitude of the orbit.

abstractmethod initial_guess()[source]

Generate an initial guess for the orbit.

Returns:

The initial guess for the orbit.

Return type:

np.ndarray

Generic Orbit Services

_GenericOrbitCorrectionService()

Provide correction services for generic orbit objects.

class hiten.algorithms.types.services.orbits._GenericOrbitCorrectionService(orbit)[source]

Bases: _OrbitCorrectionService

Drive Newton-based differential correction for generic orbits.

Parameters:

orbit (GenericOrbit) – The orbit.

_GenericOrbitContinuationService()

Provide continuation services for generic orbit objects.

class hiten.algorithms.types.services.orbits._GenericOrbitContinuationService(orbit)[source]

Bases: _OrbitContinuationService

Drive continuation for generic orbits.

Parameters:

orbit (GenericOrbit) – The orbit.

_GenericOrbitDynamicsService()

Provide dynamics services for generic orbit objects.

class hiten.algorithms.types.services.orbits._GenericOrbitDynamicsService(orbit)[source]

Bases: _OrbitDynamicsService

Dynamics service for generic orbits with custom amplitude handling.

Parameters:

orbit (GenericOrbit) – The orbit.

initial_guess()[source]

Generate initial guess for GenericOrbit.

Parameters:

**kwargs – Additional keyword arguments (unused).

Returns:

The initial state vector in nondimensional units.

Return type:

numpy.ndarray, shape (6,)

Raises:

ValueError – If no initial state is provided.

Halo Orbit Services

_HaloOrbitCorrectionService()

Provide correction services for halo orbit objects.

class hiten.algorithms.types.services.orbits._HaloOrbitCorrectionService(orbit)[source]

Bases: _OrbitCorrectionService

Drive Newton-based differential correction for halo orbits.

Parameters:

orbit (HaloOrbit) – The orbit.

_HaloOrbitContinuationService()

Provide continuation services for halo orbit objects.

class hiten.algorithms.types.services.orbits._HaloOrbitContinuationService(orbit)[source]

Bases: _OrbitContinuationService

Drive continuation for halo orbits.

Parameters:

orbit (HaloOrbit) – The orbit.

_HaloOrbitDynamicsService()

Provide dynamics services for halo orbit objects.

class hiten.algorithms.types.services.orbits._HaloOrbitDynamicsService(orbit)[source]

Bases: _OrbitDynamicsService

Dynamics service for halo orbits.

Parameters:

orbit (HaloOrbit) – The orbit.

property zenith: Literal['northern', 'southern']

(Read-only) Current zenith of the orbit.

Returns:

The orbit zenith.

Return type:

Literal[“northern”, “southern”]

property n: int

(Read-only) Current n value of the orbit.

Returns:

The orbit n value.

Return type:

int

initial_guess()[source]

Generate an initial guess for the orbit. using Richardson’s third-order analytical approximation.

Returns:

The initial guess for the orbit.

Return type:

np.ndarray

References

[Richardson1980]

Richardson, D. L. (1980). “Analytic construction of periodic orbits about the

collinear libration points”.

Lyapunov Orbit Services

_LyapunovOrbitCorrectionService()

Provide correction services for Lyapunov orbit objects.

class hiten.algorithms.types.services.orbits._LyapunovOrbitCorrectionService(orbit)[source]

Bases: _OrbitCorrectionService

Dynamics service for Lyapunov orbits.

Parameters:

orbit (LyapunovOrbit) – The orbit.

_LyapunovOrbitContinuationService()

Provide continuation services for Lyapunov orbit objects.

class hiten.algorithms.types.services.orbits._LyapunovOrbitContinuationService(orbit)[source]

Bases: _OrbitContinuationService

Dynamics service for Lyapunov orbits.

Parameters:

orbit (LyapunovOrbit) – The orbit.

_LyapunovOrbitDynamicsService()

Provide dynamics services for Lyapunov orbit objects.

class hiten.algorithms.types.services.orbits._LyapunovOrbitDynamicsService(orbit)[source]

Bases: _OrbitDynamicsService

Dynamics service for Lyapunov orbits.

Parameters:

orbit (LyapunovOrbit) – The orbit.

initial_guess()[source]

Generate an initial guess for the orbit using the analytical approximation.

Returns:

The initial guess for the orbit.

Return type:

np.ndarray

References

[Richardson1980]

Richardson, D. L. (1980). “Analytic construction of periodic orbits about the

collinear libration points”.

Vertical Orbit Services

_VerticalOrbitCorrectionService()

Provide correction services for vertical orbit objects.

class hiten.algorithms.types.services.orbits._VerticalOrbitCorrectionService(orbit)[source]

Bases: _OrbitCorrectionService

Dynamics service for Vertical orbits.

Parameters:

orbit (VerticalOrbit) – The orbit.

_VerticalOrbitContinuationService()

Provide continuation services for vertical orbit objects.

class hiten.algorithms.types.services.orbits._VerticalOrbitContinuationService(orbit)[source]

Bases: _OrbitContinuationService

Dynamics service for Vertical orbits.

Parameters:

orbit (VerticalOrbit) – The orbit.

_VerticalOrbitDynamicsService()

Provide dynamics services for vertical orbit objects.

class hiten.algorithms.types.services.orbits._VerticalOrbitDynamicsService(orbit)[source]

Bases: _OrbitDynamicsService

Dynamics service for Vertical orbits.

Parameters:

orbit (VerticalOrbit) – The orbit.

initial_guess()[source]

Generate an initial guess for the orbit using Richardson’s third-order analytical approximation.

For vertical Lyapunov orbits, the x-amplitude (Ax) is set to zero, meaning the orbit oscillates primarily in the z-direction with minimal motion in the x-y plane.

Returns:

The initial guess for the orbit.

Return type:

np.ndarray

References

[Richardson1980]

Richardson, D. L. (1980). “Analytic construction of periodic orbits about the

collinear libration points”. Celestial Mechanics 22 (3):241-253.

Orbit Services

_OrbitServices()

Encapsulate services for orbit objects.

class hiten.algorithms.types.services.orbits._OrbitServices(domain_obj, correction, continuation, dynamics, persistence)[source]

Bases: _ServiceBundleBase

Bundle all orbit services together.

Parameters:
classmethod default(domain_obj)[source]

Create a default service bundle.

Parameters:

domain_obj (PeriodicOrbit) – The domain object.

Returns:

The service bundle.

Return type:

_OrbitServices

classmethod with_shared_dynamics(dynamics)[source]

Create a service bundle with a shared dynamics service.

Parameters:

dynamics (_OrbitDynamicsService) – The dynamics service.

Returns:

The service bundle.

Return type:

_OrbitServices