Synodic Map Example

This example demonstrates how to compute synodic maps in the Circular Restricted Three-Body Problem (CR3BP).

Computing synodic maps in the CR3BP
 1"""Example script: Generating a Poincare map for the synodic section of a vertical orbit manifold.
 2
 3Run with
 4    python examples/heteroclinic_connection.py
 5"""
 6
 7import os
 8import sys
 9
10sys.path.append(os.path.join(os.path.dirname(__file__), "..", "src"))
11
12from hiten.system import SynodicMap, System, VerticalOrbit
13
14
15def main() -> None:
16    system = System.from_bodies("earth", "moon")
17    l_point = system.get_libration_point(1)
18
19    cm = l_point.get_center_manifold(degree=6)
20    cm.compute()
21
22    ic_seed = cm.to_synodic([0.0, 0.0], 0.6, "q3") # Good initial guess from CM
23
24    orbit = VerticalOrbit(l_point, initial_state=ic_seed)
25    orbit.correct(max_attempts=100, finite_difference=True)
26    orbit.propagate(steps=1000)
27
28    manifold = orbit.manifold(stable=True, direction="positive")
29    manifold.compute(step=0.005)
30    manifold.plot()
31
32    synodic_map = SynodicMap(manifold)
33    overrides = {
34        "interp_kind": "cubic",
35        "segment_refine": 30,
36        "newton_max_iter": 10,
37    }
38    synodic_map.compute(section_axis="y", section_offset=0.0, plane_coords=("x", "z"), overrides=overrides)
39    synodic_map.plot()
40
41
42if __name__ == "__main__":
43    main()